Exemple #1
0
        public static SongInfo GetSong(ScoreSaberSong song, bool searchOnline = true)
        {
            bool foundOnline = TryGetSongByHash(song.hash, out SongInfo songInfo, searchOnline);

            if (songInfo != null)
            {
                songInfo.ScoreSaberInfo.AddOrUpdate(song.uid, song);
            }
            return(songInfo);
        }
Exemple #2
0
        public static SongInfo GetOrCreateSong(ScoreSaberSong song, bool searchOnline = true)
        {
            bool foundOnline = TryGetSongByHash(song.hash, out SongInfo songInfo, searchOnline);

            if (foundOnline)
            {
                BeatSaverSongs.AddOrUpdate(songInfo.BeatSaverInfo);
            }
            ScoreSaberSongs.AddOrUpdate(song);
            if (songInfo == null)
            {
                songInfo = song.GenerateSongInfo();
                TryAddToScrapedData(songInfo);
            }
            songInfo.ScoreSaberInfo.AddOrUpdate(song.uid, song);
            return(songInfo);
        }