fix timestamp heuristic (year 2200+)

This commit is contained in:
George Hahn 2023-01-03 22:38:54 -07:00
parent c2c31247b5
commit ce4be71719

View file

@ -130,8 +130,7 @@ impl TryFrom<&<Playlist as Metadata>::Message> for SelectedListContent {
type Error = librespot_core::Error; type Error = librespot_core::Error;
fn try_from(playlist: &<Playlist as Metadata>::Message) -> Result<Self, Self::Error> { fn try_from(playlist: &<Playlist as Metadata>::Message) -> Result<Self, Self::Error> {
let timestamp = playlist.get_timestamp(); let timestamp = playlist.get_timestamp();
let timestamp = if timestamp > 9295169800000 {
let timestamp = if timestamp > 1672809484000 {
// timestamp is way out of range for milliseconds. Some seem to be in microseconds? // timestamp is way out of range for milliseconds. Some seem to be in microseconds?
// Observed on playlists where: // Observed on playlists where:
// format: "artist-mix-reader" // format: "artist-mix-reader"