using System.Collections.Generic; using System.Threading.Tasks; using Newtonsoft.Json; namespace Tesses.CMS { public interface IContentProvider { UserAccount GetFirstUser(); IEnumerable GetUsers(); IEnumerable GetMovies(string user); IEnumerable GetMovies(long user); UserAccount GetUserAccount(string user); Movie CreateMovie(string user,string movie,string properName,string description); Movie GetMovie(string user,string movie); void UpdateMovie(Movie movie); void CreateUser(CMSConfiguration configuration,string user,string properName,string email,string password); void UpdateUser(UserAccount account); UserAccount GetUserById(long account); void CreateSession(string session,long account); void ChangeSession(string session,long account); void DeleteSession(string session); long? GetSession(string session); bool ContainsSession(string cookie); void CreateVerificationCode(string code,long account); void DeleteVerificationCode(string code); long? GetVerificationAccount(string code); bool ContainsVerificationCode(string code); IEnumerable GetShows(string user); void UpdateShow(Show show); void UpdateEpisode(Episode episode); void UpdateSeason(Season season); Show CreateShow(string user, string show, string properName, string description); Show GetShow(string user, string show); int SeasonCount(string user,string show); Season GetSeason(string user,string show,int season); Season CreateSeason(string user,string show,int season,string properName,string description); int EpisodeCount(string user,string show,int season); Episode GetEpisode(string user,string show,int season,int episode); Episode CreateEpisode(string user,string show,int season,int episode,string episodename,string properName,string description); } public class MovieContentMetaData { [JsonProperty("movie_torrent_url")] public string MovieTorrentUrl {get;set;} [JsonProperty("movie_with_extras_torrent_url")] public string MovieWithExtrasTorrentUrl {get;set;} [JsonProperty("browser_stream")] public string BrowserStream {get;set;} [JsonProperty("download_stream")] public string DownloadStream {get;set;} [JsonProperty("poster_url")] public string PosterUrl {get;set;} [JsonProperty("thumbnail_url")] public string ThumbnailUrl {get;set;} [JsonProperty("subtitle_streams")] public List SubtitlesStreams {get;set;}=new List(); [JsonProperty("extra_streams")] public List ExtraStreams {get;set;}=new List(); } public class ExtraDataStream { [JsonProperty("is_dir")] public bool IsDir {get;set;} [JsonProperty("name")] public string Name {get;set;} [JsonProperty("items")] public List Items {get;set;}=new List(); [JsonProperty("url")] public string Url {get;set;} } public class SubtitleStream { [JsonProperty("language_code")] public string LanguageCode {get;set;}=""; [JsonProperty("srt_url")] public string SrtUrl {get;set;}=""; [JsonProperty("vtt_url")] public string VttUrl {get;set;}=""; } }