-
Notifications
You must be signed in to change notification settings - Fork 201
Feature/lyrics updates #324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Ivyson
wants to merge
9
commits into
bjarneo:main
Choose a base branch
from
Ivyson:feature/lyrics-updates
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+74
−8
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
019a34d
feat: Progressive playlist loading for youtube music
Ivyson 1357781
Merge branch 'bjarneo:main' into main
Ivyson bce1661
Merge branch 'bjarneo:main' into main
Ivyson d7009a0
added the test suite for the player vs audio race condition
Ivyson 33b25af
Added the Support for lyrics on yt music
Ivyson 3406d32
Merge branch 'bjarneo:main' into main
Ivyson 992175c
Merge branch 'bjarneo:main' into main
Ivyson ea1d8f7
Merge branch 'bjarneo:main' into main
Ivyson c1bb08d
Merge remote-tracking branch 'upstream/main' into feature/lyrics-updates
Ivyson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| package model | ||
|
|
||
| import ( | ||
| "testing" | ||
|
|
||
| "github.com/bjarneo/cliamp/playlist" | ||
| ) | ||
|
|
||
| func TestLyricsSyncable(t *testing.T) { | ||
| tests := []struct { | ||
| name string | ||
| track playlist.Track | ||
| want bool | ||
| }{ | ||
| { | ||
| name: "local file", | ||
| track: playlist.Track{Title: "Local", Path: "/tmp/a.mp3", DurationSecs: 180}, | ||
| want: true, | ||
| }, | ||
| { | ||
| name: "youtube music finite track", | ||
| track: playlist.Track{Title: "Song", Path: "https://music.youtube.com/watch?v=abc", Stream: true, DurationSecs: 240}, | ||
| want: true, | ||
| }, | ||
| { | ||
| name: "youtube finite track", | ||
| track: playlist.Track{Title: "Song", Path: "https://www.youtube.com/watch?v=abc", Stream: true, DurationSecs: 240}, | ||
| want: true, | ||
| }, | ||
| { | ||
| name: "yt-dlp track (soundcloud) finite", | ||
| track: playlist.Track{Title: "SC", Path: "https://soundcloud.com/x/y", Stream: true, DurationSecs: 120}, | ||
| want: true, | ||
| }, | ||
| { | ||
| name: "youtube live (no duration)", | ||
| track: playlist.Track{Title: "Live", Path: "https://music.youtube.com/watch?v=live", Stream: true, DurationSecs: 0}, | ||
| want: false, | ||
| }, | ||
| { | ||
| name: "icy radio stream without provider metadata", | ||
| track: playlist.Track{Title: "Radio", Path: "https://radio.example/stream", Stream: true}, | ||
| want: false, | ||
| }, | ||
| { | ||
| name: "navidrome provider stream", | ||
| track: playlist.Track{Title: "Nav", Path: "https://nav.example/stream", Stream: true, DurationSecs: 200, ProviderMeta: map[string]string{"navidrome": "id"}}, | ||
| want: true, | ||
| }, | ||
| } | ||
| for _, tt := range tests { | ||
| t.Run(tt.name, func(t *testing.T) { | ||
| p := playlist.New() | ||
| p.Replace([]playlist.Track{tt.track}) | ||
| p.SetIndex(0) | ||
| m := Model{playlist: p} | ||
| if got := m.lyricsSyncable(); got != tt.want { | ||
| t.Fatalf("lyricsSyncable() = %v, want %v", got, tt.want) | ||
| } | ||
| }) | ||
| } | ||
| } |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Hyphenate “auto-scroll”.
Line 7 uses “auto scroll” as a verb phrase modifier. Change it to “auto-scroll”.
🧰 Tools
🪛 LanguageTool
[grammar] ~7-~7: Use a hyphen to join words.
Context: ...racks with a known duration, lyrics auto scroll and highlight the active line in ...
(QB_NEW_EN_HYPHEN)
🤖 Prompt for AI Agents
Source: Linters/SAST tools