feat: add History view with YouTube Music API#171
Merged
sozercan merged 4 commits intosozercan:mainfrom Apr 7, 2026
Merged
Conversation
18d3eec to
99ff97f
Compare
Owner
|
@pukuba can we use YouTube’s history here instead of local only? |
Contributor
Author
|
That's a great idea! Using the YouTube Music |
Add `FEmusic_history` to PaginatedContentType and expose getHistory(), getHistoryContinuation(), and hasMoreHistorySections on YTMusicClient. History requests skip the API cache (ttl: nil) since history changes with every song played. The fetchPaginatedContent TTL parameter is now configurable with a default of APICache.TTL.home, so existing endpoints are unaffected. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
58f72dc to
f110d9c
Compare
db7121b to
0618fbe
Compare
Display listening history fetched from YouTube Music's FEmusic_history endpoint in a new sidebar section. Songs are grouped by time period (Today, Yesterday, This Week, etc.) with SongThumbnailView and playQueue integration. - HistoryViewModel follows HomeViewModel pattern with background continuation loading and smart refresh (skips update when unchanged) - HistoryView with LikedMusicView-style header, refresh button (spinning animation), auto-refresh on tab entry when track changed, and 3s delayed refresh after song click - Localized History, Refresh, songs today in en, ko, ar, tr - 4 unit tests for ViewModel Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0618fbe to
46ab65e
Compare
sozercan
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FEmusic_historyAPI endpointChanges
YTMusicClient.swift—PaginatedContentType.history,getHistory()withttl: nil(no cache)Protocols.swift— history methods added toYTMusicClientProtocolHistoryViewModel.swift— followsHomeViewModelpattern with background continuation loadingHistoryView.swift— song list withSongThumbnailView,playQueue, refresh buttonMainWindow.swift,Sidebar.swift—NavigationItem.historyMockUITestYTMusicClient.swift,MockYTMusicClient.swift— history stubsDiagnosticsLogger.swift,AccessibilityIdentifiers.swiftLocalizable.xcstrings+ 4x.strings— "History" in en/ko/ar/trHistoryViewModelTests.swift— 4 tests🤖 Generated with Claude Code