Zingabopp / SyncSaberService

Automatically downloads Beat Saber maps
MIT License
42 stars 4 forks source link

Some error on DownloadSongsFromFeed #11

Closed JamDaBam closed 5 years ago

JamDaBam commented 5 years ago

[Program.cs_Main(148) @ 14:23 - Info] Exception downloading BeastSaberFeed: Following - System.NullReferenceException-Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt. bei SyncSaberLib.Playlist.<>c__DisplayClass1_0.b__0(PlaylistSong s) bei System.Collections.Generic.List1.FindIndex(Int32 startIndex, Int32 count, Predicate1 match) bei SyncSaberLib.Playlist.TryAdd(String songHash, String songIndex, String songName) bei System.Collections.Generic.List1.ForEach(Action1 action) bei SyncSaberLib.SyncSaber.DownloadSongsFromFeed(String feedType, IFeedSettings _settings) bei SyncSaberConsole.Program.Main(String[] args) in C:\Users\Jared\source\repos\SyncSaberService\SyncSaberConsole\Program.cs:Zeile 142.

Hope that helps

Zingabopp commented 5 years ago

Thanks, looks like it's happening when it reads in old playlists that didn't have a hash field. Deleting the old playlist should fix it for now, I'll have a better fix sometime soon. SyncSaberService will rebuild playlists for all the matched songs in the feed as long as they weren't deleted (in history, but not in your song folder), so theoretically you shouldn't lose anything in the playlist by rebuilding it.

Zingabopp commented 5 years ago

Will be fixed in the next version. Songs without hashes in the playlist will be replaced when a song with the same key is added to the playlist so you won't have duplicates.