Exemple #1
0
        public bool ReadPlaylist()
        {
            string oldFormatPath = Config.BeatSaberPath + "\\Playlists\\" + this.fileName + ".json";
            string newFormatPath = Config.BeatSaberPath + "\\Playlists\\" + this.fileName + ".bplist";

            this.oldFormat = !File.Exists(newFormatPath);
            Logger.Info(string.Concat(new string[]
            {
                "Playlist \"",
                this.Title,
                "\" found in ",
                this.oldFormat ? "old" : "new",
                " playlist format."
            }), "C:\\Users\\brian\\Documents\\GitHub\\SyncSaber\\SyncSaber\\Playlist.cs", "ReadPlaylist", 126);
            if (File.Exists(this.oldFormat ? oldFormatPath : newFormatPath))
            {
                Playlist playlist = PlaylistIO.ReadPlaylistSongs(this);
                if (playlist != null)
                {
                    this.Title   = playlist.Title;
                    this.Author  = playlist.Author;
                    this.Image   = playlist.Image;
                    this.Songs   = playlist.Songs;
                    this.fileLoc = playlist.fileLoc;
                    Logger.Info("Success loading playlist!", "C:\\Users\\brian\\Documents\\GitHub\\SyncSaber\\SyncSaber\\Playlist.cs", "ReadPlaylist", 139);
                    return(true);
                }
            }
            return(false);
        }
Exemple #2
0
 public void WritePlaylist()
 {
     PlaylistIO.WritePlaylist(this);
 }