瀏覽代碼

Allow calling GetSongHash string missing any underscores.

Stephen Damm 5 年之前
父節點
當前提交
eb65302a74
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      SongBrowserPlugin/Internals/CustomHelpers.cs

+ 2 - 1
SongBrowserPlugin/Internals/CustomHelpers.cs

@@ -76,7 +76,8 @@ namespace SongBrowser.Internals
 
 
         public static string GetSongHash(string levelId)
         public static string GetSongHash(string levelId)
         {
         {
-            return levelId.Split('_')[2];
+            var split = levelId.Split('_');
+            return split.Length > 2 ? split[2] : levelId;
         }
         }
     }
     }
 }
 }