public string ReadSongSourcePath() { try { this.LoadToCache(); return(LibraryDeserializer.DeserializeSongSourcePath(this.cache)); } catch (Exception ex) if (ex is JsonException || ex is IOException) { throw new LibraryReadException("Failed to read song source path.", ex); } }
public IReadOnlyList <Playlist> ReadPlaylists() { try { this.LoadToCache(); return(LibraryDeserializer.DeserializePlaylists(this.cache, this.songCache)); } catch (Exception ex) if (ex is JsonException || ex is IOException) { throw new LibraryReadException("Failed to read playlists.", ex); } }
public IReadOnlyList <LocalSong> ReadSongs() { IReadOnlyList <LocalSong> songs; try { this.LoadToCache(); songs = LibraryDeserializer.DeserializeSongs(this.cache); } catch (Exception ex) if (ex is JsonException || ex is IOException) { throw new LibraryReadException("Failed to read songs.", ex); } this.songCache = songs; return(songs); }