Fix playlist descriptions and pirate bug

This commit is contained in:
Slendy 2022-09-27 21:52:56 -05:00
parent d192060ef4
commit f46bd4fc87
No known key found for this signature in database
GPG key ID: 7288D68361B91428
2 changed files with 2 additions and 2 deletions

View file

@ -249,7 +249,7 @@ public class CollectionController : ControllerBase
this.Request.Body.Position = 0;
string bodyString = await new StreamReader(this.Request.Body).ReadToEndAsync();
string rootElement = bodyString.Contains("levels") ? "levels" : "playlist";
string rootElement = bodyString.StartsWith("<playlist>") ? "playlist" : "levels";
XmlSerializer serializer = new(typeof(Playlist), new XmlRootAttribute(rootElement));
Playlist? playlist = (Playlist?)serializer.Deserialize(new StringReader(bodyString));