public static IPlaylist CreatePlaylist(PlaylistPOCO poco, SiteType site) { if (poco == null) { return(null); } switch (site) { case SiteType.YouTube: var pl = new YouPlaylist { ID = poco.ID, Title = poco.Title, SubTitle = poco.SubTitle, Thumbnail = poco.Thumbnail, ChannelId = poco.ChannelID, PlItems = poco.PlaylistItems, IsDefault = false }; return(pl); default: return(null); } }
public static IPlaylist CreateUploadPlaylist(IChannel ch, List <string> channel, byte[] thumbnail) { var pl = new YouPlaylist { Title = "Uploads", PlItems = channel, Thumbnail = thumbnail, ChannelId = ch.ID, ID = YouChannel.MakePlaylistUploadId(ch.ID), SubTitle = "All items", IsDefault = true }; return(pl); }