Skip to content

Commit

Permalink
Local API: Support the author-less auto-generated album playlists in …
Browse files Browse the repository at this point in the history
…video lists
  • Loading branch information
absidue committed Nov 22, 2023
1 parent 22fed89 commit 97086ce
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/renderer/helpers/api/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
getUserDataPath,
toLocalePublicationString
} from '../utils'
import { isNullOrEmpty } from '../strings'

const TRACKING_PARAM_NAMES = [
'utm_source',
Expand Down Expand Up @@ -482,9 +483,13 @@ export function parseLocalListPlaylist(playlist, author = undefined) {
channelName = playlist.author.name
channelId = playlist.author.id
}
} else {
} else if (author) {
channelName = author.name
channelId = author.id
} else if (!isNullOrEmpty(playlist.author?.name)) {
// auto-generated album playlists don't have an author
// so in search results, the author text is "Playlist" and doesn't have a link or channel ID
channelName = playlist.author.name
}

return {
Expand Down

0 comments on commit 97086ce

Please sign in to comment.