Ordering songs and artists

This way the order won't keep changing
This commit is contained in:
Norbi Peti 2019-06-13 22:20:18 +02:00
parent 869192da61
commit 75cf86b363
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56

View file

@ -79,8 +79,9 @@ namespace HiddenUpdater
} }
//Console.WriteLine(artistJson.ToString(Formatting.None)); //Console.WriteLine(artistJson.ToString(Formatting.None));
File.WriteAllText("songs.json", playlistJson.ToString()); File.WriteAllText("songs.json", new JArray(playlistJson.OrderBy(song=>song["sid"])).ToString());
File.WriteAllText("artists.json", new JArray(artistJson.Children().Select(tk=>tk.Last)).ToString()); File.WriteAllText("artists.json", new JArray(artistJson.Children().Select(tk=>tk.Last)
.OrderBy(artist=>artist["sname"])).ToString());
} }
} }
} }