Add settings to show the current time (#155)

Closes #154 

Adds a settings to show the current time in the upper right corner.

If enabled, it will also show the end time for the playback on the
overlay.
This commit is contained in:
damontecres 2025-11-04 15:27:38 -05:00 committed by GitHub
parent 40a8249469
commit 77c787b51f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 118 additions and 15 deletions

View file

@ -89,4 +89,11 @@ suspend fun upgradeApp(
}
}
}
if (previous.isEqualOrBefore(Version.fromString("0.2.5-11-g0"))) {
appPreferences.updateData {
it.updateInterfacePreferences {
showClock = AppPreference.ShowClock.defaultValue
}
}
}
}

View file

@ -18,8 +18,11 @@ import org.jellyfin.sdk.model.api.MediaStreamType
import java.time.LocalDate
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
import java.time.format.FormatStyle
import java.util.Locale
val TimeFormatter = DateTimeFormatter.ofLocalizedTime(FormatStyle.SHORT)
/**
* Format a [LocalDateTime] as `Aug 24, 2000`
*/