From dc9030c2cea60d6656a569eb4a56d2ecc432422d Mon Sep 17 00:00:00 2001 From: "Jamie.Rees" Date: Mon, 10 Jul 2017 12:55:36 +0100 Subject: [PATCH] Extended the Emby API --- src/Ombi.Api.Emby/EmbyApi.cs | 61 +++++++++++++++- src/Ombi.Api.Emby/IEmbyApi.cs | 10 +++ src/Ombi.Api.Emby/Models/EmbyItemContainer.cs | 10 +++ src/Ombi.Api.Emby/Models/EmbyMediaType.cs | 10 +++ src/Ombi.Api.Emby/Models/Media/EmbyChapter.cs | 8 +++ .../Models/Media/EmbyExternalurl.cs | 8 +++ .../Models/Media/EmbyImagetags.cs | 11 +++ .../Models/Media/EmbyMediasource.cs | 30 ++++++++ .../Models/Media/EmbyMediastream.cs | 36 ++++++++++ src/Ombi.Api.Emby/Models/Media/EmbyPerson.cs | 11 +++ .../Models/Media/EmbyProviderids.cs | 13 ++++ .../Models/Media/EmbyRemotetrailer.cs | 8 +++ src/Ombi.Api.Emby/Models/Media/EmbyStudio.cs | 8 +++ .../Models/Media/EmbyUserdata.cs | 15 ++++ .../Models/Media/Movie/EmbyMovie.cs | 32 +++++++++ .../Models/Media/Movie/MovieInformation.cs | 60 ++++++++++++++++ .../Models/Media/Tv/EmbyEpisodes.cs | 43 +++++++++++ .../Models/Media/Tv/EmbyRemotetrailer.cs | 8 +++ .../Models/Media/Tv/EmbySeries.cs | 30 ++++++++ .../Models/Media/Tv/EmbySeriesstudioinfo.cs | 8 +++ .../Models/Media/Tv/EpisodeInformation.cs | 72 +++++++++++++++++++ .../Models/Media/Tv/SeriesInformation.cs | 59 +++++++++++++++ .../Jobs/Emby/EmbyContentCacher.cs | 7 ++ src/Ombi.Schedule/Ombi.Schedule.csproj | 4 -- .../ClientApp/app/search/search.module.ts | 1 - .../usermanagement-edit.component.ts | 1 - 26 files changed, 555 insertions(+), 9 deletions(-) create mode 100644 src/Ombi.Api.Emby/Models/EmbyItemContainer.cs create mode 100644 src/Ombi.Api.Emby/Models/EmbyMediaType.cs create mode 100644 src/Ombi.Api.Emby/Models/Media/EmbyChapter.cs create mode 100644 src/Ombi.Api.Emby/Models/Media/EmbyExternalurl.cs create mode 100644 src/Ombi.Api.Emby/Models/Media/EmbyImagetags.cs create mode 100644 src/Ombi.Api.Emby/Models/Media/EmbyMediasource.cs create mode 100644 src/Ombi.Api.Emby/Models/Media/EmbyMediastream.cs create mode 100644 src/Ombi.Api.Emby/Models/Media/EmbyPerson.cs create mode 100644 src/Ombi.Api.Emby/Models/Media/EmbyProviderids.cs create mode 100644 src/Ombi.Api.Emby/Models/Media/EmbyRemotetrailer.cs create mode 100644 src/Ombi.Api.Emby/Models/Media/EmbyStudio.cs create mode 100644 src/Ombi.Api.Emby/Models/Media/EmbyUserdata.cs create mode 100644 src/Ombi.Api.Emby/Models/Media/Movie/EmbyMovie.cs create mode 100644 src/Ombi.Api.Emby/Models/Media/Movie/MovieInformation.cs create mode 100644 src/Ombi.Api.Emby/Models/Media/Tv/EmbyEpisodes.cs create mode 100644 src/Ombi.Api.Emby/Models/Media/Tv/EmbyRemotetrailer.cs create mode 100644 src/Ombi.Api.Emby/Models/Media/Tv/EmbySeries.cs create mode 100644 src/Ombi.Api.Emby/Models/Media/Tv/EmbySeriesstudioinfo.cs create mode 100644 src/Ombi.Api.Emby/Models/Media/Tv/EpisodeInformation.cs create mode 100644 src/Ombi.Api.Emby/Models/Media/Tv/SeriesInformation.cs create mode 100644 src/Ombi.Schedule/Jobs/Emby/EmbyContentCacher.cs diff --git a/src/Ombi.Api.Emby/EmbyApi.cs b/src/Ombi.Api.Emby/EmbyApi.cs index aaab3a5a8..2f85051ac 100644 --- a/src/Ombi.Api.Emby/EmbyApi.cs +++ b/src/Ombi.Api.Emby/EmbyApi.cs @@ -1,8 +1,10 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Net.Http; using System.Threading.Tasks; +using Newtonsoft.Json; using Ombi.Api.Emby.Models; +using Ombi.Api.Emby.Models.Media.Tv; +using Ombi.Api.Emby.Models.Movie; using Ombi.Helpers; namespace Ombi.Api.Emby @@ -24,7 +26,7 @@ namespace Ombi.Api.Emby public async Task> GetUsers(string baseUri, string apiKey) { var request = new Request("emby/users", baseUri, HttpMethod.Get); - + AddHeaders(request, apiKey); var obj = await Api.Request>(request); @@ -64,6 +66,59 @@ namespace Ombi.Api.Emby return obj; } + public async Task> GetAllMovies(string apiKey, string userId, string baseUri) + { + return await GetAll("Movie", apiKey, userId, baseUri); + } + + public async Task> GetAllEpisodes(string apiKey, string userId, string baseUri) + { + return await GetAll("Episode", apiKey, userId, baseUri); + } + + public async Task> GetAllShows(string apiKey, string userId, string baseUri) + { + return await GetAll("Series", apiKey, userId, baseUri); + } + + public async Task GetSeriesInformation(string mediaId, string apiKey, string userId, string baseUrl) + { + return await GetInformation(mediaId, apiKey, userId, baseUrl); + } + public async Task GetMovieInformation(string mediaId, string apiKey, string userId, string baseUrl) + { + return await GetInformation(mediaId, apiKey, userId, baseUrl); + } + public async Task GetEpisodeInformation(string mediaId, string apiKey, string userId, string baseUrl) + { + return await GetInformation(mediaId, apiKey, userId, baseUrl); + } + + private async Task GetInformation(string mediaId, string apiKey, string userId, string baseUrl) + { + var request = new Request($"emby/users/{userId}/items/{mediaId}", baseUrl, HttpMethod.Get); + AddHeaders(request, apiKey); + var response = await Api.RequestContent(request); + + return JsonConvert.DeserializeObject(response); + } + + + + private async Task> GetAll(string type, string apiKey, string userId, string baseUri) + { + var request = new Request($"emby/users/{userId}/items", baseUri, HttpMethod.Get); + + request.AddQueryString("Recursive", true.ToString()); + request.AddQueryString("IncludeItemTypes", type); + + AddHeaders(request, apiKey); + + + var obj = await Api.Request>(request); + return obj; + } + private static void AddHeaders(Request req, string apiKey) { if (!string.IsNullOrEmpty(apiKey)) diff --git a/src/Ombi.Api.Emby/IEmbyApi.cs b/src/Ombi.Api.Emby/IEmbyApi.cs index bfc9770cc..8cf31fca8 100644 --- a/src/Ombi.Api.Emby/IEmbyApi.cs +++ b/src/Ombi.Api.Emby/IEmbyApi.cs @@ -2,6 +2,8 @@ using System.Collections.Generic; using System.Threading.Tasks; using Ombi.Api.Emby.Models; +using Ombi.Api.Emby.Models.Media.Tv; +using Ombi.Api.Emby.Models.Movie; namespace Ombi.Api.Emby { @@ -10,5 +12,13 @@ namespace Ombi.Api.Emby Task GetSystemInformation(string apiKey, string baseUrl); Task> GetUsers(string baseUri, string apiKey); Task LogIn(string username, string password, string apiKey, string baseUri); + + Task> GetAllMovies(string apiKey, string userId, string baseUri); + Task> GetAllEpisodes(string apiKey, string userId, string baseUri); + Task> GetAllShows(string apiKey, string userId, string baseUri); + + Task GetSeriesInformation(string mediaId, string apiKey, string userId, string baseUrl); + Task GetMovieInformation(string mediaId, string apiKey, string userId, string baseUrl); + Task GetEpisodeInformation(string mediaId, string apiKey, string userId, string baseUrl); } } \ No newline at end of file diff --git a/src/Ombi.Api.Emby/Models/EmbyItemContainer.cs b/src/Ombi.Api.Emby/Models/EmbyItemContainer.cs new file mode 100644 index 000000000..eda2760cd --- /dev/null +++ b/src/Ombi.Api.Emby/Models/EmbyItemContainer.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; + +namespace Ombi.Api.Emby.Models +{ + public class EmbyItemContainer + { + public List Items { get; set; } + public int TotalRecordCount { get; set; } + } +} \ No newline at end of file diff --git a/src/Ombi.Api.Emby/Models/EmbyMediaType.cs b/src/Ombi.Api.Emby/Models/EmbyMediaType.cs new file mode 100644 index 000000000..7b33f8972 --- /dev/null +++ b/src/Ombi.Api.Emby/Models/EmbyMediaType.cs @@ -0,0 +1,10 @@ +namespace Ombi.Api.Emby.Models +{ + public enum EmbyMediaType + { + Movie = 0, + Series = 1, + Music = 2, + Episode = 3 + } +} \ No newline at end of file diff --git a/src/Ombi.Api.Emby/Models/Media/EmbyChapter.cs b/src/Ombi.Api.Emby/Models/Media/EmbyChapter.cs new file mode 100644 index 000000000..d08e2fc57 --- /dev/null +++ b/src/Ombi.Api.Emby/Models/Media/EmbyChapter.cs @@ -0,0 +1,8 @@ +namespace Ombi.Api.Emby.Models.Movie +{ + public class EmbyChapter + { + public long StartPositionTicks { get; set; } + public string Name { get; set; } + } +} \ No newline at end of file diff --git a/src/Ombi.Api.Emby/Models/Media/EmbyExternalurl.cs b/src/Ombi.Api.Emby/Models/Media/EmbyExternalurl.cs new file mode 100644 index 000000000..9337f2949 --- /dev/null +++ b/src/Ombi.Api.Emby/Models/Media/EmbyExternalurl.cs @@ -0,0 +1,8 @@ +namespace Ombi.Api.Emby.Models.Movie +{ + public class EmbyExternalurl + { + public string Name { get; set; } + public string Url { get; set; } + } +} \ No newline at end of file diff --git a/src/Ombi.Api.Emby/Models/Media/EmbyImagetags.cs b/src/Ombi.Api.Emby/Models/Media/EmbyImagetags.cs new file mode 100644 index 000000000..c75e96373 --- /dev/null +++ b/src/Ombi.Api.Emby/Models/Media/EmbyImagetags.cs @@ -0,0 +1,11 @@ +namespace Ombi.Api.Emby.Models.Movie +{ + public class EmbyImagetags + { + public string Primary { get; set; } + public string Logo { get; set; } + public string Thumb { get; set; } + + public string Banner { get; set; } + } +} \ No newline at end of file diff --git a/src/Ombi.Api.Emby/Models/Media/EmbyMediasource.cs b/src/Ombi.Api.Emby/Models/Media/EmbyMediasource.cs new file mode 100644 index 000000000..f951aed95 --- /dev/null +++ b/src/Ombi.Api.Emby/Models/Media/EmbyMediasource.cs @@ -0,0 +1,30 @@ +namespace Ombi.Api.Emby.Models.Movie +{ + public class EmbyMediasource + { + public string Protocol { get; set; } + public string Id { get; set; } + public string Path { get; set; } + public string Type { get; set; } + public string Container { get; set; } + public string Name { get; set; } + public bool IsRemote { get; set; } + public string ETag { get; set; } + public long RunTimeTicks { get; set; } + public bool ReadAtNativeFramerate { get; set; } + public bool SupportsTranscoding { get; set; } + public bool SupportsDirectStream { get; set; } + public bool SupportsDirectPlay { get; set; } + public bool IsInfiniteStream { get; set; } + public bool RequiresOpening { get; set; } + public bool RequiresClosing { get; set; } + public bool SupportsProbing { get; set; } + public string VideoType { get; set; } + public EmbyMediastream[] MediaStreams { get; set; } + public object[] PlayableStreamFileNames { get; set; } + public object[] Formats { get; set; } + public int Bitrate { get; set; } + public int DefaultAudioStreamIndex { get; set; } + + } +} \ No newline at end of file diff --git a/src/Ombi.Api.Emby/Models/Media/EmbyMediastream.cs b/src/Ombi.Api.Emby/Models/Media/EmbyMediastream.cs new file mode 100644 index 000000000..01032e0e7 --- /dev/null +++ b/src/Ombi.Api.Emby/Models/Media/EmbyMediastream.cs @@ -0,0 +1,36 @@ +namespace Ombi.Api.Emby.Models.Movie +{ + public class EmbyMediastream + { + public string Codec { get; set; } + public string Language { get; set; } + public string TimeBase { get; set; } + public string CodecTimeBase { get; set; } + public string NalLengthSize { get; set; } + public bool IsInterlaced { get; set; } + public bool IsAVC { get; set; } + public int BitRate { get; set; } + public int BitDepth { get; set; } + public int RefFrames { get; set; } + public bool IsDefault { get; set; } + public bool IsForced { get; set; } + public int Height { get; set; } + public int Width { get; set; } + public float AverageFrameRate { get; set; } + public float RealFrameRate { get; set; } + public string Profile { get; set; } + public string Type { get; set; } + public string AspectRatio { get; set; } + public int Index { get; set; } + public bool IsExternal { get; set; } + public bool IsTextSubtitleStream { get; set; } + public bool SupportsExternalStream { get; set; } + public string PixelFormat { get; set; } + public int Level { get; set; } + public bool IsAnamorphic { get; set; } + public string DisplayTitle { get; set; } + public string ChannelLayout { get; set; } + public int Channels { get; set; } + public int SampleRate { get; set; } + } +} \ No newline at end of file diff --git a/src/Ombi.Api.Emby/Models/Media/EmbyPerson.cs b/src/Ombi.Api.Emby/Models/Media/EmbyPerson.cs new file mode 100644 index 000000000..5acd9415b --- /dev/null +++ b/src/Ombi.Api.Emby/Models/Media/EmbyPerson.cs @@ -0,0 +1,11 @@ +namespace Ombi.Api.Emby.Models.Movie +{ + public class EmbyPerson + { + public string Name { get; set; } + public string Id { get; set; } + public string Role { get; set; } + public string Type { get; set; } + public string PrimaryImageTag { get; set; } + } +} \ No newline at end of file diff --git a/src/Ombi.Api.Emby/Models/Media/EmbyProviderids.cs b/src/Ombi.Api.Emby/Models/Media/EmbyProviderids.cs new file mode 100644 index 000000000..8302ee3ee --- /dev/null +++ b/src/Ombi.Api.Emby/Models/Media/EmbyProviderids.cs @@ -0,0 +1,13 @@ +namespace Ombi.Api.Emby.Models.Movie +{ + public class EmbyProviderids + { + public string Tmdb { get; set; } + public string Imdb { get; set; } + public string TmdbCollection { get; set; } + + public string Tvdb { get; set; } + public string Zap2It { get; set; } + public string TvRage { get; set; } + } +} \ No newline at end of file diff --git a/src/Ombi.Api.Emby/Models/Media/EmbyRemotetrailer.cs b/src/Ombi.Api.Emby/Models/Media/EmbyRemotetrailer.cs new file mode 100644 index 000000000..86be2a22e --- /dev/null +++ b/src/Ombi.Api.Emby/Models/Media/EmbyRemotetrailer.cs @@ -0,0 +1,8 @@ +namespace Ombi.Api.Emby.Models.Movie +{ + public class EmbyRemotetrailer + { + public string Url { get; set; } + public string Name { get; set; } + } +} \ No newline at end of file diff --git a/src/Ombi.Api.Emby/Models/Media/EmbyStudio.cs b/src/Ombi.Api.Emby/Models/Media/EmbyStudio.cs new file mode 100644 index 000000000..0670939ae --- /dev/null +++ b/src/Ombi.Api.Emby/Models/Media/EmbyStudio.cs @@ -0,0 +1,8 @@ +namespace Ombi.Api.Emby.Models.Movie +{ + public class EmbyStudio + { + public string Name { get; set; } + public string Id { get; set; } + } +} \ No newline at end of file diff --git a/src/Ombi.Api.Emby/Models/Media/EmbyUserdata.cs b/src/Ombi.Api.Emby/Models/Media/EmbyUserdata.cs new file mode 100644 index 000000000..0a02b7eb4 --- /dev/null +++ b/src/Ombi.Api.Emby/Models/Media/EmbyUserdata.cs @@ -0,0 +1,15 @@ +using System; + +namespace Ombi.Api.Emby.Models.Movie +{ + public class EmbyUserdata + { + public double PlaybackPositionTicks { get; set; } + public int PlayCount { get; set; } + public bool IsFavorite { get; set; } + public bool Played { get; set; } + public string Key { get; set; } + public DateTime LastPlayedDate { get; set; } + public int UnplayedItemCount { get; set; } + } +} \ No newline at end of file diff --git a/src/Ombi.Api.Emby/Models/Media/Movie/EmbyMovie.cs b/src/Ombi.Api.Emby/Models/Media/Movie/EmbyMovie.cs new file mode 100644 index 000000000..34038edd8 --- /dev/null +++ b/src/Ombi.Api.Emby/Models/Media/Movie/EmbyMovie.cs @@ -0,0 +1,32 @@ +using System; + +namespace Ombi.Api.Emby.Models.Movie +{ + public class EmbyMovie + { + public string Name { get; set; } + public string ServerId { get; set; } + public string Id { get; set; } + public string Container { get; set; } + public DateTime PremiereDate { get; set; } + public object[] ProductionLocations { get; set; } + public string OfficialRating { get; set; } + public float CommunityRating { get; set; } + public long RunTimeTicks { get; set; } + public string PlayAccess { get; set; } + public int ProductionYear { get; set; } + public bool IsPlaceHolder { get; set; } + public bool IsHD { get; set; } + public bool IsFolder { get; set; } + public string Type { get; set; } + public int LocalTrailerCount { get; set; } + public EmbyUserdata UserData { get; set; } + public string VideoType { get; set; } + public EmbyImagetags ImageTags { get; set; } + public string[] BackdropImageTags { get; set; } + public string LocationType { get; set; } + public string MediaType { get; set; } + public bool HasSubtitles { get; set; } + public int CriticRating { get; set; } + } +} \ No newline at end of file diff --git a/src/Ombi.Api.Emby/Models/Media/Movie/MovieInformation.cs b/src/Ombi.Api.Emby/Models/Media/Movie/MovieInformation.cs new file mode 100644 index 000000000..0a6735375 --- /dev/null +++ b/src/Ombi.Api.Emby/Models/Media/Movie/MovieInformation.cs @@ -0,0 +1,60 @@ +using System; + +namespace Ombi.Api.Emby.Models.Movie +{ + public class MovieInformation + { + public string Name { get; set; } + public string OriginalTitle { get; set; } + public string ServerId { get; set; } + public string Id { get; set; } + public string Etag { get; set; } + public DateTime DateCreated { get; set; } + public bool CanDelete { get; set; } + public bool CanDownload { get; set; } + public bool SupportsSync { get; set; } + public string Container { get; set; } + public string SortName { get; set; } + public DateTime PremiereDate { get; set; } + public EmbyExternalurl[] ExternalUrls { get; set; } + public EmbyMediasource[] MediaSources { get; set; } + public string[] ProductionLocations { get; set; } + public string Path { get; set; } + public string OfficialRating { get; set; } + public string Overview { get; set; } + public string[] Taglines { get; set; } + public string[] Genres { get; set; } + public float CommunityRating { get; set; } + public int VoteCount { get; set; } + public long RunTimeTicks { get; set; } + public string PlayAccess { get; set; } + public int ProductionYear { get; set; } + public bool IsPlaceHolder { get; set; } + public EmbyRemotetrailer[] RemoteTrailers { get; set; } + public EmbyProviderids ProviderIds { get; set; } + public bool IsHD { get; set; } + public bool IsFolder { get; set; } + public string ParentId { get; set; } + public string Type { get; set; } + public EmbyPerson[] People { get; set; } + public EmbyStudio[] Studios { get; set; } + public int LocalTrailerCount { get; set; } + public EmbyUserdata UserData { get; set; } + public string DisplayPreferencesId { get; set; } + public object[] Tags { get; set; } + public string[] Keywords { get; set; } + public EmbyMediastream[] MediaStreams { get; set; } + public string VideoType { get; set; } + public EmbyImagetags ImageTags { get; set; } + public string[] BackdropImageTags { get; set; } + public object[] ScreenshotImageTags { get; set; } + public EmbyChapter[] Chapters { get; set; } + public string LocationType { get; set; } + public string MediaType { get; set; } + public string HomePageUrl { get; set; } + public int Budget { get; set; } + public int Revenue { get; set; } + public object[] LockedFields { get; set; } + public bool LockData { get; set; } + } +} \ No newline at end of file diff --git a/src/Ombi.Api.Emby/Models/Media/Tv/EmbyEpisodes.cs b/src/Ombi.Api.Emby/Models/Media/Tv/EmbyEpisodes.cs new file mode 100644 index 000000000..d02c99e41 --- /dev/null +++ b/src/Ombi.Api.Emby/Models/Media/Tv/EmbyEpisodes.cs @@ -0,0 +1,43 @@ +using Ombi.Api.Emby.Models.Movie; +using System; + +namespace Ombi.Api.Emby.Models.Media.Tv +{ + public class EmbyEpisodes + { + public string Name { get; set; } + public string ServerId { get; set; } + public string Id { get; set; } + public string Container { get; set; } + public DateTime PremiereDate { get; set; } + public float CommunityRating { get; set; } + public long RunTimeTicks { get; set; } + public string PlayAccess { get; set; } + public int ProductionYear { get; set; } + public bool IsPlaceHolder { get; set; } + public int IndexNumber { get; set; } + public int ParentIndexNumber { get; set; } + public bool IsHD { get; set; } + public bool IsFolder { get; set; } + public string Type { get; set; } + public string ParentLogoItemId { get; set; } + public string ParentBackdropItemId { get; set; } + public string[] ParentBackdropImageTags { get; set; } + public int LocalTrailerCount { get; set; } + public EmbyUserdata UserData { get; set; } + public string SeriesName { get; set; } + public string SeriesId { get; set; } + public string SeasonId { get; set; } + public string SeriesPrimaryImageTag { get; set; } + public string SeasonName { get; set; } + public string VideoType { get; set; } + public EmbyImagetags ImageTags { get; set; } + public object[] BackdropImageTags { get; set; } + public string ParentLogoImageTag { get; set; } + public string ParentThumbItemId { get; set; } + public string ParentThumbImageTag { get; set; } + public string LocationType { get; set; } + public string MediaType { get; set; } + public bool HasSubtitles { get; set; } + } +} \ No newline at end of file diff --git a/src/Ombi.Api.Emby/Models/Media/Tv/EmbyRemotetrailer.cs b/src/Ombi.Api.Emby/Models/Media/Tv/EmbyRemotetrailer.cs new file mode 100644 index 000000000..b387195ea --- /dev/null +++ b/src/Ombi.Api.Emby/Models/Media/Tv/EmbyRemotetrailer.cs @@ -0,0 +1,8 @@ +namespace Ombi.Api.Emby.Models.Media.Tv +{ + public class EmbyRemotetrailer + { + public string Url { get; set; } + public string Name { get; set; } + } +} \ No newline at end of file diff --git a/src/Ombi.Api.Emby/Models/Media/Tv/EmbySeries.cs b/src/Ombi.Api.Emby/Models/Media/Tv/EmbySeries.cs new file mode 100644 index 000000000..853c64d10 --- /dev/null +++ b/src/Ombi.Api.Emby/Models/Media/Tv/EmbySeries.cs @@ -0,0 +1,30 @@ +using Ombi.Api.Emby.Models.Movie; +using System; + +namespace Ombi.Api.Emby.Models.Media.Tv +{ + public class EmbySeries + { + public string Name { get; set; } + public string ServerId { get; set; } + public string Id { get; set; } + public DateTime PremiereDate { get; set; } + public string OfficialRating { get; set; } + public float CommunityRating { get; set; } + public long RunTimeTicks { get; set; } + public string PlayAccess { get; set; } + public int ProductionYear { get; set; } + public bool IsFolder { get; set; } + public string Type { get; set; } + public int LocalTrailerCount { get; set; } + public EmbyUserdata UserData { get; set; } + public int ChildCount { get; set; } + public string Status { get; set; } + public string AirTime { get; set; } + public string[] AirDays { get; set; } + public EmbyImagetags ImageTags { get; set; } + public string[] BackdropImageTags { get; set; } + public string LocationType { get; set; } + public DateTime EndDate { get; set; } + } +} \ No newline at end of file diff --git a/src/Ombi.Api.Emby/Models/Media/Tv/EmbySeriesstudioinfo.cs b/src/Ombi.Api.Emby/Models/Media/Tv/EmbySeriesstudioinfo.cs new file mode 100644 index 000000000..d53259f7f --- /dev/null +++ b/src/Ombi.Api.Emby/Models/Media/Tv/EmbySeriesstudioinfo.cs @@ -0,0 +1,8 @@ +namespace Ombi.Api.Emby.Models.Media.Tv +{ + public class EmbySeriesstudioinfo + { + public string Name { get; set; } + public string Id { get; set; } + } +} \ No newline at end of file diff --git a/src/Ombi.Api.Emby/Models/Media/Tv/EpisodeInformation.cs b/src/Ombi.Api.Emby/Models/Media/Tv/EpisodeInformation.cs new file mode 100644 index 000000000..cb0a16086 --- /dev/null +++ b/src/Ombi.Api.Emby/Models/Media/Tv/EpisodeInformation.cs @@ -0,0 +1,72 @@ +using System; +using Ombi.Api.Emby.Models.Movie; + +namespace Ombi.Api.Emby.Models.Media.Tv +{ + public class EpisodeInformation + { + public string Name { get; set; } + public string ServerId { get; set; } + public string Id { get; set; } + public string Etag { get; set; } + public DateTime DateCreated { get; set; } + public bool CanDelete { get; set; } + public bool CanDownload { get; set; } + public bool SupportsSync { get; set; } + public string Container { get; set; } + public string SortName { get; set; } + public DateTime PremiereDate { get; set; } + public EmbyExternalurl[] ExternalUrls { get; set; } + public EmbyMediasource[] MediaSources { get; set; } + public string Path { get; set; } + public string Overview { get; set; } + public object[] Taglines { get; set; } + public object[] Genres { get; set; } + public string[] SeriesGenres { get; set; } + public float CommunityRating { get; set; } + public int VoteCount { get; set; } + public long RunTimeTicks { get; set; } + public string PlayAccess { get; set; } + public int ProductionYear { get; set; } + public bool IsPlaceHolder { get; set; } + public int IndexNumber { get; set; } + public int ParentIndexNumber { get; set; } + public object[] RemoteTrailers { get; set; } + public EmbyProviderids ProviderIds { get; set; } + public bool IsHD { get; set; } + public bool IsFolder { get; set; } + public string ParentId { get; set; } + public string Type { get; set; } + public object[] People { get; set; } + public object[] Studios { get; set; } + public string ParentLogoItemId { get; set; } + public string ParentBackdropItemId { get; set; } + public string[] ParentBackdropImageTags { get; set; } + public int LocalTrailerCount { get; set; } + public EmbyUserdata UserData { get; set; } + public string SeriesName { get; set; } + public string SeriesId { get; set; } + public string SeasonId { get; set; } + public string DisplayPreferencesId { get; set; } + public object[] Tags { get; set; } + public object[] Keywords { get; set; } + public string SeriesPrimaryImageTag { get; set; } + public string SeasonName { get; set; } + public EmbyMediastream[] MediaStreams { get; set; } + public string VideoType { get; set; } + public EmbyImagetags ImageTags { get; set; } + public object[] BackdropImageTags { get; set; } + public object[] ScreenshotImageTags { get; set; } + public string ParentLogoImageTag { get; set; } + public string SeriesStudio { get; set; } + public EmbySeriesstudioinfo SeriesStudioInfo { get; set; } + public string ParentThumbItemId { get; set; } + public string ParentThumbImageTag { get; set; } + public EmbyChapter[] Chapters { get; set; } + public string LocationType { get; set; } + public string MediaType { get; set; } + public object[] LockedFields { get; set; } + public bool LockData { get; set; } + + } +} \ No newline at end of file diff --git a/src/Ombi.Api.Emby/Models/Media/Tv/SeriesInformation.cs b/src/Ombi.Api.Emby/Models/Media/Tv/SeriesInformation.cs new file mode 100644 index 000000000..25b4a2620 --- /dev/null +++ b/src/Ombi.Api.Emby/Models/Media/Tv/SeriesInformation.cs @@ -0,0 +1,59 @@ +using System; +using Ombi.Api.Emby.Models.Movie; + +namespace Ombi.Api.Emby.Models.Media.Tv +{ + public class SeriesInformation + { + + public string Name { get; set; } + public string ServerId { get; set; } + public string Id { get; set; } + public string Etag { get; set; } + public DateTime DateCreated { get; set; } + public DateTime DateLastMediaAdded { get; set; } + public bool CanDelete { get; set; } + public bool CanDownload { get; set; } + public bool SupportsSync { get; set; } + public string SortName { get; set; } + public DateTime PremiereDate { get; set; } + public EmbyExternalurl[] ExternalUrls { get; set; } + public string Path { get; set; } + public string OfficialRating { get; set; } + public string Overview { get; set; } + public string ShortOverview { get; set; } + public object[] Taglines { get; set; } + public string[] Genres { get; set; } + public float CommunityRating { get; set; } + public int VoteCount { get; set; } + public long CumulativeRunTimeTicks { get; set; } + public long RunTimeTicks { get; set; } + public string PlayAccess { get; set; } + public int ProductionYear { get; set; } + public EmbyRemotetrailer[] RemoteTrailers { get; set; } + public EmbyProviderids ProviderIds { get; set; } + public bool IsFolder { get; set; } + public string ParentId { get; set; } + public string Type { get; set; } + public EmbyPerson[] People { get; set; } + public EmbyStudio[] Studios { get; set; } + public int LocalTrailerCount { get; set; } + public EmbyUserdata UserData { get; set; } + public int RecursiveItemCount { get; set; } + public int ChildCount { get; set; } + public string DisplayPreferencesId { get; set; } + public string Status { get; set; } + public string AirTime { get; set; } + public string[] AirDays { get; set; } + public object[] Tags { get; set; } + public object[] Keywords { get; set; } + public EmbyImagetags ImageTags { get; set; } + public string[] BackdropImageTags { get; set; } + public object[] ScreenshotImageTags { get; set; } + public string LocationType { get; set; } + public string HomePageUrl { get; set; } + public object[] LockedFields { get; set; } + public bool LockData { get; set; } + + } +} \ No newline at end of file diff --git a/src/Ombi.Schedule/Jobs/Emby/EmbyContentCacher.cs b/src/Ombi.Schedule/Jobs/Emby/EmbyContentCacher.cs new file mode 100644 index 000000000..25f6a61d0 --- /dev/null +++ b/src/Ombi.Schedule/Jobs/Emby/EmbyContentCacher.cs @@ -0,0 +1,7 @@ +namespace Ombi.Schedule.Jobs.Emby +{ + public class EmbyContentCacher + { + + } +} \ No newline at end of file diff --git a/src/Ombi.Schedule/Ombi.Schedule.csproj b/src/Ombi.Schedule/Ombi.Schedule.csproj index 72f7cfc16..ea37ee864 100644 --- a/src/Ombi.Schedule/Ombi.Schedule.csproj +++ b/src/Ombi.Schedule/Ombi.Schedule.csproj @@ -18,8 +18,4 @@ - - - - \ No newline at end of file diff --git a/src/Ombi/ClientApp/app/search/search.module.ts b/src/Ombi/ClientApp/app/search/search.module.ts index a1baa0bbe..47bae541e 100644 --- a/src/Ombi/ClientApp/app/search/search.module.ts +++ b/src/Ombi/ClientApp/app/search/search.module.ts @@ -40,6 +40,5 @@ const routes: Routes = [ SearchService, RequestService ], - }) export class SearchModule { } \ No newline at end of file diff --git a/src/Ombi/ClientApp/app/usermanagement/usermanagement-edit.component.ts b/src/Ombi/ClientApp/app/usermanagement/usermanagement-edit.component.ts index a6181953e..906081c19 100644 --- a/src/Ombi/ClientApp/app/usermanagement/usermanagement-edit.component.ts +++ b/src/Ombi/ClientApp/app/usermanagement/usermanagement-edit.component.ts @@ -6,7 +6,6 @@ import { NotificationService } from '../services/notification.service'; import { ActivatedRoute } from '@angular/router'; @Component({ - templateUrl: './usermanagement-edit.component.html' }) export class UserManagementEditComponent {