Example #1
0
 public TrackProvider(ArtistProvider artistProvider, ImagesProvider imageProvider, AlbumsProvider albumsProvider)
 {
     Collection = new Dictionary<Guid, PlayableBase>();
     Tracks = new ObservableCollection<PlayableBase>();
     _serializer = new XmlSerializer(typeof(LocalPlayable));
     _artistProvider = artistProvider;
     _imageProvider = imageProvider;
     _albumsProvider = albumsProvider;
 }
 public TrackProvider(ArtistProvider artistProvider, ImagesProvider imageProvider, AlbumsProvider albumsProvider)
 {
     Collection      = new Dictionary <Guid, PlayableBase>();
     Tracks          = new ObservableCollection <PlayableBase>();
     _serializer     = new XmlSerializer(typeof(LocalPlayable));
     _artistProvider = artistProvider;
     _imageProvider  = imageProvider;
     _albumsProvider = albumsProvider;
 }
Example #3
0
        public MusicDataManager()
        {
            _databaseFile =
                new FileInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
                    "Hurricane", "database.sqlite"));

            Images = new ImagesProvider();
            Artists = new ArtistProvider(Images);
            Albums = new AlbumsProvider(Artists);
            Tracks = new TrackProvider(Artists, Images, Albums);
            Playlists = new PlaylistProvider(Tracks);
            UserData = new UserDataProvider();

            LastfmApi = new LastfmApi(Artists);
            MusicManager = new MusicManager();
            MusicManager.TrackChanged += MusicManager_TrackChanged;
            MusicManager.NewTrackOpened += MusicManager_NewTrackOpened;
            MusicStreamingPluginManager = new MusicStreamingPluginManager();
        }