Show video title and channel in tvOS sidebar Now Playing

This commit is contained in:
Arkadiusz Fal
2026-04-15 20:27:30 +02:00
parent d4f8cade90
commit 6a45ed7d0f
2 changed files with 57 additions and 46 deletions

View File

@@ -9,6 +9,16 @@
},
"%@" : {
},
"%@\n%@" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "%1$@\n%2$@"
}
}
}
},
"%@ - %@" : {
"localizations" : {
@@ -3885,6 +3895,28 @@
}
}
},
"home.sections.layout.grid" : {
"comment" : "Grid layout option for library sections",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Grid"
}
}
}
},
"home.sections.layout.list" : {
"comment" : "List layout option for library sections",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "List"
}
}
}
},
"home.settings.availableSections.empty" : {
"comment" : "Empty state message for available sections section",
"localizations" : {
@@ -4014,17 +4046,6 @@
}
}
},
"home.settings.shortcuts.header" : {
"comment" : "Header for shortcuts section in library settings",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Shortcuts"
}
}
}
},
"home.settings.sections.layout" : {
"comment" : "Label for sections layout picker in library settings",
"localizations" : {
@@ -4036,6 +4057,17 @@
}
}
},
"home.settings.shortcuts.header" : {
"comment" : "Header for shortcuts section in library settings",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Shortcuts"
}
}
}
},
"home.settings.shortcuts.layout" : {
"comment" : "Label for shortcuts layout picker in library settings",
"localizations" : {
@@ -4047,28 +4079,6 @@
}
}
},
"home.sections.layout.grid" : {
"comment" : "Grid layout option for library sections",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Grid"
}
}
}
},
"home.sections.layout.list" : {
"comment" : "List layout option for library sections",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "List"
}
}
}
},
"home.settings.sourceDisabled" : {
},
@@ -6860,17 +6870,6 @@
}
}
},
"player.previous" : {
"comment" : "Previous track button",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Previous"
}
}
}
},
"player.noDescription" : {
"comment" : "Shown when video has no description",
"localizations" : {
@@ -6906,6 +6905,17 @@
},
"player.playPauseButton" : {
},
"player.previous" : {
"comment" : "Previous track button",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Previous"
}
}
}
},
"player.quality.audioFromVideo" : {
"comment" : "Message shown when audio tab is selected but current stream is muxed",

View File

@@ -640,7 +640,8 @@ struct UnifiedTabView: View {
@TabContentBuilder<SidebarItem>
private var mainTabs: some TabContent<SidebarItem> {
// Now Playing (only shown when video is playing and player collapsed)
if shouldShowNowPlaying {
if shouldShowNowPlaying,
let currentVideo = appEnvironment?.playerService.state.currentVideo {
Tab(value: SidebarItem.nowPlaying) {
Color.clear
.onAppear {
@@ -649,7 +650,7 @@ struct UnifiedTabView: View {
selection = .home
}
} label: {
Label(SidebarItem.nowPlaying.title, systemImage: SidebarItem.nowPlaying.systemImage)
Label("\(currentVideo.title)\n\(currentVideo.author.name)", systemImage: SidebarItem.nowPlaying.systemImage)
}
}