private PlaylistMetaData ReadPlaylistMetaData()
        {
            var metaData = new PlaylistMetaData();

            metaData.Title = reader.ReadString();
            return(metaData);
        }
Exemplo n.º 2
0
 private async void Load(PlaylistMetaData metaData)
 {
     await Progress.Do(async() =>
     {
         mainViewModel.LoadedPlaylist = await Database.ExportPlaylist(metaData.ID, Progress);
     });
 }
Exemplo n.º 3
0
 protected IOPlaylistContainer(PlaylistMetaData metaData, IEnumerable <SongDataEntry> songDataEntries)
 {
     Playlist = new Playlist
     {
         MetaData = metaData,
         Songs    = songDataEntries.Select(o => o.Song).ToList(),
     };
     this.songDataEntries = songDataEntries.ToDictionary(o => o.ID);
 }
Exemplo n.º 4
0
        private async void Export(PlaylistMetaData metaData)
        {
            Progress.Start();
            try
            {
                Progress.Report((null, "Selecting export location..."));
                var(result, path) = Dialogs.ShowSaveContainer();
                if (!result)
                {
                    Progress.Error("Exporting canceled.");
                    return;
                }

                var container = await Database.ExportPlaylist(metaData.ID, Progress);

                await PlaylistContainerWriter.Write(path, container, Progress);

                Progress.Stop();
            }
            catch (Exception e)
            {
                Progress.Error(e);
            }
        }
 public StreamPlaylistContainer(Stream baseStream, PlaylistMetaData metaData, IEnumerable <SongDataEntry> songDataEntries)
     : base(metaData, songDataEntries)
 {
     stream = baseStream;
 }
Exemplo n.º 6
0
 public FilePlaylistContainer(string filePath, PlaylistMetaData metaData, IEnumerable <SongDataEntry> songDataEntries)
     : base(metaData, songDataEntries)
 {
     this.filePath = filePath;
 }
Exemplo n.º 7
0
 public FilesPlaylistContainer(PlaylistMetaData metaData, IEnumerable <(Song Song, string)> songs)