public IMusicLibrary Create(LibraryInfo library) { switch (library.Type) { case LibraryType.SharedFolder: return new MusicHub.Implementation.FileSystemMusicLibrary( library.Location, _metadataService); case LibraryType.GoogleMusic: return new MusicHub.GooglePlay.GoogleMusicMusicLibrary( library.Username, library.Password); default: throw new NotImplementedException(); } }
public void QueueLibrary(LibraryInfo libraryInfo) { lock (_queue) _queue.Enqueue(libraryInfo); }
private object ConvertLibrary(LibraryInfo library) { return new { id = library.Id, name = library.Name, songCount = library.TotalSongs, }; }
public void updateLibraries(LibraryInfo[] libraries) { this._clients.updateLibraries(libraries.Select(ConvertLibrary)); }