-
-
Notifications
You must be signed in to change notification settings - Fork 495
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
Implement lyrics #4107
Implement lyrics #4107
Conversation
drawRect(Color.White, size = size.copy(width = size.width * progress)) | ||
drawRect( | ||
Color.White, | ||
size = size.copy(width = size.width * (playbackPosition.inWholeMilliseconds.toFloat() / playbackDuration.inWholeMilliseconds.toFloat())) |
Check warning
Code scanning / detekt
Line detected, which is longer than the defined maximum line length in the code style. Warning
import org.jellyfin.sdk.model.extensions.ticks | ||
import kotlin.time.Duration | ||
|
||
data class TimedLine( |
Check warning
Code scanning / detekt
If a source file contains only a single non-private top-level class or object, the file name should reflect the case-sensitive name plus the .kt extension. Warning
fun LyricsBox( | ||
lines: List<String>, | ||
modifier: Modifier = Modifier, | ||
currentTimestamp: Duration = Duration.ZERO, | ||
duration: Duration = Duration.ZERO, | ||
paused: Boolean = false, | ||
fontSize: TextUnit = LocalTextStyle.current.fontSize, | ||
color: Color = LocalTextStyle.current.color, | ||
) = Box(modifier) { |
Check warning
Code scanning / detekt
The more parameters a function has the more complex it is. Long parameter lists are often used to control complex algorithms and violate the Single Responsibility Principle. Prefer functions with short parameter lists. Warning
fun LyricsDtoBox( | ||
lyricDto: LyricDto, | ||
modifier: Modifier = Modifier, | ||
currentTimestamp: Duration = Duration.ZERO, | ||
duration: Duration = Duration.ZERO, | ||
paused: Boolean = false, | ||
fontSize: TextUnit = LocalTextStyle.current.fontSize, | ||
color: Color = LocalTextStyle.current.color, | ||
) = Box(modifier) { |
Check warning
Code scanning / detekt
The more parameters a function has the more complex it is. Long parameter lists are often used to control complex algorithms and violate the Single Responsibility Principle. Prefer functions with short parameter lists. Warning
|
||
@Preview | ||
@Composable | ||
private fun FadingEdgePreview() { |
Check warning
Code scanning / detekt
Private function is unused and should be removed. Warning
After months of
procrastinatingwork, we now have 🎤 Lyrics in the app!Supports both synced (highlight current line) and unsynced (continuous scroll) lyrics. It does introduce a tiny display bug with the seekbar in the screensaver, I'll fix that later.
Changes
Screenshots
No screenshots for now because we don't have lyrics on the demo server :(
Issues
Part of #1057
Closes #3742
Closes #2988