fix crashes on some DEs

This commit is contained in:
Royce551 2021-06-06 20:57:05 -05:00
parent 4ada8c19d1
commit 1f95d881fe

View file

@ -184,7 +184,7 @@ namespace FRESHMusicPlayer.Handlers.Integrations
var track = new Track(viewModel.Player.FilePath); var track = new Track(viewModel.Player.FilePath);
var x = new Dictionary<string, object>() var x = new Dictionary<string, object>()
{ {
{"mpris:length", (double)Math.Round(viewModel.Player.TotalTime.TotalMilliseconds * 1000) }, // {"mpris:length", (double)Math.Round(viewModel.Player?.TotalTime.TotalMilliseconds * 1000) },
{"xesam:artist", track.Artist.Split(Settings.DisplayValueSeparator) }, {"xesam:artist", track.Artist.Split(Settings.DisplayValueSeparator) },
{"xesam:album", track.Album }, {"xesam:album", track.Album },
{"xesam:asText", track.Lyrics.UnsynchronizedLyrics }, {"xesam:asText", track.Lyrics.UnsynchronizedLyrics },