-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add a terminal UI lyrics player #2
Conversation
suransea
commented
Jul 15, 2021
README.md
Outdated
| , | previous track | | ||
| . | next track | | ||
|
||
![play.png](https://i.loli.net/2021/07/12/4Zb36O5tANhoD8W.png) |
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.
commit this image? probably Resources/example_1.png
var onSeek: ((Int, Int) -> Void)? | ||
var onState: ((PlaybackState) -> Void)? | ||
|
||
private(set) var lines: [LyricsLine] = [] |
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.
why [LyricsLine]
instead of Lyrics
? note a Lyrics
instance also carries lyrics offset, which you didn't respect.
.store(in: &tickCancelBag) | ||
} | ||
|
||
private func index(of offset: TimeInterval) -> Int { |
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.
there is Lyrics.subscript
Sources/lyricsx-cli/LyricsXCli.swift
Outdated
#if os(macOS) | ||
typealias PlayingPlayer = MusicPlayers.SystemMedia | ||
#elseif os(Linux) | ||
typealias PlayingPlayer = MusicPlayers.MPRISNowPlaying | ||
#endif |
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.
create a new subclass of MusicPlayers.Agent
and conditionally set its designatedPlayer
.
Signed-off-by: sea <simpleslight@icloud.com>
Signed-off-by: sea <simpleslight@icloud.com>