Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/renderer/components/playlist-info/playlist-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default defineComponent({
title: '',
channelThumbnail: '',
channelName: '',
channelId: '',
channelId: null,
videoCount: 0,
viewCount: 0,
lastUpdated: '',
Expand Down
11 changes: 11 additions & 0 deletions src/renderer/components/playlist-info/playlist-info.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
class="channelShareWrapper"
>
<router-link
v-if="channelId"
class="playlistChannel"
:to="`/channel/${channelId}`"
>
Expand All @@ -55,6 +56,16 @@
{{ channelName }}
</h3>
</router-link>
<div
v-else
class="playlistChannel"
>
<h3
class="channelName"
>
{{ channelName }}
</h3>
</div>

<ft-share-button
v-if="!hideSharingActions"
Expand Down
13 changes: 12 additions & 1 deletion src/renderer/views/Playlist/Playlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,17 @@ export default defineComponent({
this.isLoading = true

getLocalPlaylist(this.playlistId).then((result) => {
let channelName

if (result.info.author) {
channelName = result.info.author.name
} else {
const subtitle = result.info.subtitle.toString()

const index = subtitle.lastIndexOf('•')
channelName = subtitle.substring(0, index).trim()
}

this.infoData = {
id: this.playlistId,
title: result.info.title,
Expand All @@ -92,7 +103,7 @@ export default defineComponent({
viewCount: extractNumberFromString(result.info.views),
videoCount: extractNumberFromString(result.info.total_items),
lastUpdated: result.info.last_updated ?? '',
channelName: result.info.author?.name ?? '',
channelName,
channelThumbnail: result.info.author?.best_thumbnail?.url ?? '',
channelId: result.info.author?.id,
infoSource: 'local'
Expand Down