Skip to content
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

Closed
wants to merge 25 commits into from
Closed

Conversation

suransea
Copy link
Collaborator

README.md Outdated
| , | previous track |
| . | next track |

![play.png](https://i.loli.net/2021/07/12/4Zb36O5tANhoD8W.png)
Copy link
Owner

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] = []
Copy link
Owner

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.

Sources/lyricsx-cli/LyricTicker.swift Outdated Show resolved Hide resolved
Sources/lyricsx-cli/LyricTicker.swift Outdated Show resolved Hide resolved
Sources/lyricsx-cli/LyricTicker.swift Outdated Show resolved Hide resolved
.store(in: &tickCancelBag)
}

private func index(of offset: TimeInterval) -> Int {
Copy link
Owner

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/LyricTicker.swift Outdated Show resolved Hide resolved
Sources/lyricsx-cli/LyricTicker.swift Outdated Show resolved Hide resolved
Comment on lines 33 to 37
#if os(macOS)
typealias PlayingPlayer = MusicPlayers.SystemMedia
#elseif os(Linux)
typealias PlayingPlayer = MusicPlayers.MPRISNowPlaying
#endif
Copy link
Owner

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.

Sources/lyricsx-cli/LyricsXCli.swift Outdated Show resolved Hide resolved
@suransea suransea closed this Jul 23, 2021
@suransea suransea reopened this Aug 2, 2021
suransea added 3 commits July 21, 2023 10:18
Signed-off-by: sea <simpleslight@icloud.com>
Signed-off-by: sea <simpleslight@icloud.com>
@suransea suransea closed this Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants