public IAttemptResult <ITreePlaylistInfo> GetSpecialPlaylist(SpecialPlaylistTypes types) { IAttemptResult <STypes::Playlist> result = types switch { SpecialPlaylistTypes.DLFailedHistory => this._playlistStoreHandler.GetPlaylist(p => p.IsDownloadFailedHistory), _ => this._playlistStoreHandler.GetPlaylist(p => p.IsDownloadSucceededHistory), }; if (!result.IsSucceeded || result.Data is null) { return(AttemptResult <ITreePlaylistInfo> .Fail(result.Message)); } ITreePlaylistInfo converted = this._converter.ConvertStorePlaylistToLocalPlaylist(result.Data); return(AttemptResult <ITreePlaylistInfo> .Succeeded(converted)); }
public IAttemptResult <ITreePlaylistInfo> GetSpecialPlaylist(SpecialPlaylistTypes types) { return(AttemptResult <ITreePlaylistInfo> .Succeeded(new BindableTreePlaylistInfo())); }