74 lines
2.2 KiB
C#
74 lines
2.2 KiB
C#
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace Tesses.CMS
|
|
{
|
|
public interface IContentProvider
|
|
{
|
|
UserAccount GetFirstUser();
|
|
IEnumerable<UserAccount> GetUsers();
|
|
IEnumerable<Movie> GetMovies(string user);
|
|
|
|
IEnumerable<Movie> 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);
|
|
|
|
MovieContentMetaData GetMovieContentMetaData(CMSConfiguration configuration,string user,string movie);
|
|
void CreateUser(CMSConfiguration configuration,string user,string properName,string email,string password);
|
|
}
|
|
|
|
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<SubtitleStream> SubtitlesStreams {get;set;}=new List<SubtitleStream>();
|
|
|
|
[JsonProperty("extra_streams")]
|
|
public List<ExtraDataStream> ExtraStreams {get;set;}=new List<ExtraDataStream>();
|
|
}
|
|
public class ExtraDataStream
|
|
{
|
|
[JsonProperty("is_dir")]
|
|
public bool IsDir {get;set;}
|
|
[JsonProperty("name")]
|
|
public string Name {get;set;}
|
|
|
|
[JsonProperty("items")]
|
|
|
|
public List<ExtraDataStream> Items {get;set;}=new List<ExtraDataStream>();
|
|
[JsonProperty("url")]
|
|
public string Url {get;set;}
|
|
}
|
|
public class SubtitleStream
|
|
{
|
|
[JsonProperty("language_code")]
|
|
public string LanguageCode {get;set;}="";
|
|
|
|
[JsonProperty("url")]
|
|
|
|
public string SubtitleUrl {get;set;}
|
|
}
|
|
} |