public void InitializeFromSong(Song result, ISubsonicService subsonicService) { Artist = result.Artist; Title = result.Title; Uri = result.Type == SubsonicModelTypeEnum.Video ? subsonicService.GetUriForVideoWithId(result.Id) : subsonicService.GetUriForFileWithId(result.Id); CoverArtUrl = subsonicService.GetCoverArtForId(result.CoverArt); PlayingState = PlaylistItemState.NotPlaying; Duration = result.Duration; Type = result.Type == SubsonicModelTypeEnum.Video ? PlaylistItemTypeEnum.Video : PlaylistItemTypeEnum.Audio; }
public PlaylistItem() { PlayingState = PlaylistItemState.NotPlaying; CoverArtUrl = SubsonicService.CoverArtPlaceholder; }