From 6a45ed7d0f13faf4a3b8d893544234e2380f3b1c Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Wed, 15 Apr 2026 20:27:30 +0200 Subject: [PATCH] Show video title and channel in tvOS sidebar Now Playing --- Yattee/Localizable.xcstrings | 98 +++++++++++--------- Yattee/Views/Navigation/UnifiedTabView.swift | 5 +- 2 files changed, 57 insertions(+), 46 deletions(-) diff --git a/Yattee/Localizable.xcstrings b/Yattee/Localizable.xcstrings index 69e7f5e3..b76474a2 100644 --- a/Yattee/Localizable.xcstrings +++ b/Yattee/Localizable.xcstrings @@ -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", diff --git a/Yattee/Views/Navigation/UnifiedTabView.swift b/Yattee/Views/Navigation/UnifiedTabView.swift index f8e40f54..aacf13f9 100644 --- a/Yattee/Views/Navigation/UnifiedTabView.swift +++ b/Yattee/Views/Navigation/UnifiedTabView.swift @@ -640,7 +640,8 @@ struct UnifiedTabView: View { @TabContentBuilder private var mainTabs: some TabContent { // 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) } }