Serialize playlists

This commit is contained in:
Flamefire committed 2014-10-27 18:40:47 +01:00
1 parent 206a6cda35
commit 1698c1b027
10 files changed
+76 -96

No files matched your search

+8
View File
@@ -46,6 +46,14 @@ namespace VocaluxeLib.Menu
{
GameMode = EGameMode.TR_GAMEMODE_NORMAL;
}
public SPlaylistSong ToStruct()
{
CSong song = CBase.Songs.GetSongByID(SongID);
if (song == null)
throw new Exception("Can't find Song. This should never happen!");
return new SPlaylistSong{Artist = song.Artist, Title = song.Title, GameMode = GameMode};
}
}
[XmlType("Playlist")]