diff --git a/Ombi/Assemblies/TraktApiSharp.dll b/Ombi/Assemblies/TraktApiSharp.dll deleted file mode 100644 index 34e1cbe72..000000000 Binary files a/Ombi/Assemblies/TraktApiSharp.dll and /dev/null differ diff --git a/Ombi/Ombi.Api.Trakt/ITraktApi.cs b/Ombi/Ombi.Api.Trakt/ITraktApi.cs index 17c4203cb..36e25e600 100644 --- a/Ombi/Ombi.Api.Trakt/ITraktApi.cs +++ b/Ombi/Ombi.Api.Trakt/ITraktApi.cs @@ -1,16 +1,16 @@ using System.Collections.Generic; using System.Threading.Tasks; -using TraktApiSharp.Enums; -using TraktApiSharp.Objects.Get.Shows; -using TraktApiSharp.Objects.Get.Shows.Common; +//using TraktApiSharp.Enums; +//using TraktApiSharp.Objects.Get.Shows; +//using TraktApiSharp.Objects.Get.Shows.Common; namespace Ombi.Api.Trakt { public interface ITraktApi { - Task> GetAnticipatedShows(int? page = default(int?), int? limitPerPage = default(int?)); - Task> GetMostWatchesShows(TraktTimePeriod period = null, int? page = default(int?), int? limitPerPage = default(int?)); - Task> GetPopularShows(int? page = default(int?), int? limitPerPage = default(int?)); - Task> GetTrendingShows(int? page = default(int?), int? limitPerPage = default(int?)); + //Task> GetAnticipatedShows(int? page = default(int?), int? limitPerPage = default(int?)); + //Task> GetMostWatchesShows(TraktTimePeriod period = null, int? page = default(int?), int? limitPerPage = default(int?)); + //Task> GetPopularShows(int? page = default(int?), int? limitPerPage = default(int?)); + //Task> GetTrendingShows(int? page = default(int?), int? limitPerPage = default(int?)); } } \ No newline at end of file diff --git a/Ombi/Ombi.Api.Trakt/Ombi.Api.Trakt.csproj b/Ombi/Ombi.Api.Trakt/Ombi.Api.Trakt.csproj index cc4ae2925..c173d1dd7 100644 --- a/Ombi/Ombi.Api.Trakt/Ombi.Api.Trakt.csproj +++ b/Ombi/Ombi.Api.Trakt/Ombi.Api.Trakt.csproj @@ -9,10 +9,4 @@ - - - ..\Assemblies\TraktApiSharp.dll - - - \ No newline at end of file diff --git a/Ombi/Ombi.Api.Trakt/TraktApi.cs b/Ombi/Ombi.Api.Trakt/TraktApi.cs index 975900256..8ee6fc20a 100644 --- a/Ombi/Ombi.Api.Trakt/TraktApi.cs +++ b/Ombi/Ombi.Api.Trakt/TraktApi.cs @@ -1,49 +1,49 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Ombi.Helpers; -using TraktApiSharp; -using TraktApiSharp.Enums; -using TraktApiSharp.Objects.Get.Shows; -using TraktApiSharp.Objects.Get.Shows.Common; -using TraktApiSharp.Requests.Parameters; +//using System; +//using System.Collections.Generic; +//using System.Threading.Tasks; +//using Ombi.Helpers; +//using TraktApiSharp; +//using TraktApiSharp.Enums; +//using TraktApiSharp.Objects.Get.Shows; +//using TraktApiSharp.Objects.Get.Shows.Common; +//using TraktApiSharp.Requests.Parameters; -namespace Ombi.Api.Trakt -{ - public class TraktApi : ITraktApi - { - private TraktClient Client { get; } +//namespace Ombi.Api.Trakt +//{ +// public class TraktApi : ITraktApi +// { +// private TraktClient Client { get; } - private static readonly string Encrypted = "MTM0ZTU2ODM1MGY3NDI3NTExZTI1N2E2NTM0MDI2NjYwNDgwY2Y5YjkzYzc3ZjczNzhmMzQwNjAzYjY3MzgxZA=="; - private readonly string _apiKey = StringCipher.DecryptString(Encrypted, "ApiKey"); - public TraktApi() - { - Client = new TraktClient(_apiKey); - } +// private static readonly string Encrypted = "MTM0ZTU2ODM1MGY3NDI3NTExZTI1N2E2NTM0MDI2NjYwNDgwY2Y5YjkzYzc3ZjczNzhmMzQwNjAzYjY3MzgxZA=="; +// private readonly string _apiKey = StringCipher.DecryptString(Encrypted, "ApiKey"); +// public TraktApi() +// { +// Client = new TraktClient(_apiKey); +// } - public async Task> GetPopularShows(int? page = null, int? limitPerPage = null) - { - var popular = await Client.Shows.GetPopularShowsAsync(new TraktExtendedInfo { Full = true }, null, page ?? 1, limitPerPage ?? 10); - return popular.Value; - } +// public async Task> GetPopularShows(int? page = null, int? limitPerPage = null) +// { +// var popular = await Client.Shows.GetPopularShowsAsync(new TraktExtendedInfo { Full = true }, null, page ?? 1, limitPerPage ?? 10); +// return popular.Value; +// } - public async Task> GetTrendingShows(int? page = null, int? limitPerPage = null) - { - var trendingShowsTop10 = await Client.Shows.GetTrendingShowsAsync(new TraktExtendedInfo { Full = true }, null, page ?? 1, limitPerPage ?? 10); - return trendingShowsTop10.Value; - } +// public async Task> GetTrendingShows(int? page = null, int? limitPerPage = null) +// { +// var trendingShowsTop10 = await Client.Shows.GetTrendingShowsAsync(new TraktExtendedInfo { Full = true }, null, page ?? 1, limitPerPage ?? 10); +// return trendingShowsTop10.Value; +// } - public async Task> GetAnticipatedShows(int? page = null, int? limitPerPage = null) - { - var anticipatedShows = await Client.Shows.GetMostAnticipatedShowsAsync(new TraktExtendedInfo { Full = true }, null, page ?? 1, limitPerPage ?? 10); - return anticipatedShows.Value; - } +// public async Task> GetAnticipatedShows(int? page = null, int? limitPerPage = null) +// { +// var anticipatedShows = await Client.Shows.GetMostAnticipatedShowsAsync(new TraktExtendedInfo { Full = true }, null, page ?? 1, limitPerPage ?? 10); +// return anticipatedShows.Value; +// } - public async Task> GetMostWatchesShows(TraktTimePeriod period = null, int? page = null, int? limitPerPage = null) - { - var anticipatedShows = await Client.Shows.GetMostWatchedShowsAsync(period ?? TraktTimePeriod.Monthly, new TraktExtendedInfo { Full = true }, null, page ?? 1, limitPerPage ?? 10); - return anticipatedShows.Value; - } - } -} +// public async Task> GetMostWatchesShows(TraktTimePeriod period = null, int? page = null, int? limitPerPage = null) +// { +// var anticipatedShows = await Client.Shows.GetMostWatchedShowsAsync(period ?? TraktTimePeriod.Monthly, new TraktExtendedInfo { Full = true }, null, page ?? 1, limitPerPage ?? 10); +// return anticipatedShows.Value; +// } +// } +//} diff --git a/Ombi/Ombi.Api.TvMaze/Ombi.Api.TvMaze.csproj b/Ombi/Ombi.Api.TvMaze/Ombi.Api.TvMaze.csproj index a8c3e7a4c..761bb6ee1 100644 --- a/Ombi/Ombi.Api.TvMaze/Ombi.Api.TvMaze.csproj +++ b/Ombi/Ombi.Api.TvMaze/Ombi.Api.TvMaze.csproj @@ -6,6 +6,13 @@ + + + + + + ..\..\..\..\..\.nuget\packages\microsoft.extensions.logging.abstractions\1.1.1\lib\netstandard1.1\Microsoft.Extensions.Logging.Abstractions.dll + \ No newline at end of file diff --git a/Ombi/Ombi.Api.TvMaze/TvMazeApi.cs b/Ombi/Ombi.Api.TvMaze/TvMazeApi.cs index 683e9096b..f94ad2774 100644 --- a/Ombi/Ombi.Api.TvMaze/TvMazeApi.cs +++ b/Ombi/Ombi.Api.TvMaze/TvMazeApi.cs @@ -2,19 +2,24 @@ using System.Collections.Generic; using System.Net.Http; using System.Threading.Tasks; +using Microsoft.Extensions.Logging; using Ombi.Api.TvMaze.Models; +using Ombi.Helpers; namespace Ombi.Api.TvMaze { public class TvMazeApi : ITvMazeApi { - public TvMazeApi() + public TvMazeApi(ILogger logger) { Api = new Ombi.Api.Api(); + Logger = logger; //Mapper = mapper; } private string Uri = "http://api.tvmaze.com"; private Api Api { get; } + private ILogger Logger { get; } + public async Task> Search(string searchTerm) { var request = new Request("search/shows", Uri, HttpMethod.Get); @@ -28,7 +33,7 @@ namespace Ombi.Api.TvMaze public async Task ShowLookup(int showId) { var request = new Request($"shows/{showId}", Uri, HttpMethod.Get); - request.AddHeader("Content-Type", "application/json"); + request.AddContentHeader("Content-Type", "application/json"); return await Api.Request(request); } @@ -38,7 +43,7 @@ namespace Ombi.Api.TvMaze var request = new Request($"shows/{showId}/episodes", Uri, HttpMethod.Get); - request.AddHeader("Content-Type", "application/json"); + request.AddContentHeader("Content-Type", "application/json"); return await Api.Request>(request); } @@ -46,7 +51,7 @@ namespace Ombi.Api.TvMaze public async Task ShowLookupByTheTvDbId(int theTvDbId) { var request = new Request($"lookup/shows?thetvdb={theTvDbId}", Uri, HttpMethod.Get); - request.AddHeader("Content-Type", "application/json"); + request.AddContentHeader("Content-Type", "application/json"); try { var obj = await Api.Request(request); @@ -66,7 +71,7 @@ namespace Ombi.Api.TvMaze } catch (Exception e) { - // TODO + Logger.LogError(LoggingEvents.ApiException, e, "Exception when calling ShowLookupByTheTvDbId with id:{0}",theTvDbId); return null; } } @@ -75,7 +80,7 @@ namespace Ombi.Api.TvMaze { var request = new Request($"shows/{id}/seasons", Uri, HttpMethod.Get); - request.AddHeader("Content-Type", "application/json"); + request.AddContentHeader("Content-Type", "application/json"); return await Api.Request>(request); } diff --git a/Ombi/Ombi.Core/Engine/Interfaces/ITvSearchEngine.cs b/Ombi/Ombi.Core/Engine/Interfaces/ITvSearchEngine.cs index ae88e5fdb..5e08ccb3d 100644 --- a/Ombi/Ombi.Core/Engine/Interfaces/ITvSearchEngine.cs +++ b/Ombi/Ombi.Core/Engine/Interfaces/ITvSearchEngine.cs @@ -7,9 +7,9 @@ namespace Ombi.Core.Engine public interface ITvSearchEngine { Task> Search(string searchTerm); - Task> Popular(); - Task> Anticipated(); - Task> MostWatches(); - Task> Trending(); + //Task> Popular(); + //Task> Anticipated(); + //Task> MostWatches(); + //Task> Trending(); } } \ No newline at end of file diff --git a/Ombi/Ombi.Core/Engine/TvRequestEngine.cs b/Ombi/Ombi.Core/Engine/TvRequestEngine.cs index 14cc90484..a75550495 100644 --- a/Ombi/Ombi.Core/Engine/TvRequestEngine.cs +++ b/Ombi/Ombi.Core/Engine/TvRequestEngine.cs @@ -35,6 +35,7 @@ namespace Ombi.Core.Engine var posterPath = showInfo.image?.medium.Replace("http:", "https:"); var model = new TvRequestModel { + Id = tv.Id, Type = RequestType.TvShow, Overview = showInfo.summary.RemoveHtml(), PosterPath = posterPath, diff --git a/Ombi/Ombi.Core/Engine/TvSearchEngine.cs b/Ombi/Ombi.Core/Engine/TvSearchEngine.cs index 90e560209..c0ce76550 100644 --- a/Ombi/Ombi.Core/Engine/TvSearchEngine.cs +++ b/Ombi/Ombi.Core/Engine/TvSearchEngine.cs @@ -18,21 +18,21 @@ namespace Ombi.Core.Engine { public TvSearchEngine(IPrincipal identity, IRequestServiceMain service, ITvMazeApi tvMaze, IMapper mapper, ISettingsService plexSettings, - ISettingsService embySettings, ITraktApi trakt) + ISettingsService embySettings) : base(identity, service) { TvMazeApi = tvMaze; Mapper = mapper; PlexSettings = plexSettings; EmbySettings = embySettings; - TraktApi = trakt; + //TraktApi = trakt; } private ITvMazeApi TvMazeApi { get; } private IMapper Mapper { get; } private ISettingsService PlexSettings { get; } private ISettingsService EmbySettings { get; } - private ITraktApi TraktApi { get; } + //private ITraktApi TraktApi { get; } public async Task> Search(string searchTerm) @@ -46,27 +46,27 @@ namespace Ombi.Core.Engine return null; } - public async Task> Popular() - { - var result = await TraktApi.GetPopularShows(); - return await ProcessResults(result); - } + //public async Task> Popular() + //{ + // var result = await TraktApi.GetPopularShows(); + // return await ProcessResults(result); + //} - public async Task> Anticipated() - { - var result = await TraktApi.GetAnticipatedShows(); - return await ProcessResults(result); - } - public async Task> MostWatches() - { - var result = await TraktApi.GetMostWatchesShows(); - return await ProcessResults(result); - } - public async Task> Trending() - { - var result = await TraktApi.GetTrendingShows(); - return await ProcessResults(result); - } + //public async Task> Anticipated() + //{ + // var result = await TraktApi.GetAnticipatedShows(); + // return await ProcessResults(result); + //} + //public async Task> MostWatches() + //{ + // var result = await TraktApi.GetMostWatchesShows(); + // return await ProcessResults(result); + //} + //public async Task> Trending() + //{ + // var result = await TraktApi.GetTrendingShows(); + // return await ProcessResults(result); + //} private async Task> ProcessResults(IEnumerable items) { diff --git a/Ombi/Ombi.Core/Models/Requests/IRequestService.cs b/Ombi/Ombi.Core/Models/Requests/IRequestService.cs index f78313027..10493d028 100644 --- a/Ombi/Ombi.Core/Models/Requests/IRequestService.cs +++ b/Ombi/Ombi.Core/Models/Requests/IRequestService.cs @@ -12,9 +12,7 @@ namespace Ombi.Core.Requests.Models void BatchDelete(IEnumerable model); void BatchUpdate(IEnumerable model); T CheckRequest(int providerId); - T CheckRequest(string musicId); Task CheckRequestAsync(int providerId); - Task CheckRequestAsync(string musicId); void DeleteRequest(T request); Task DeleteRequestAsync(int request); Task DeleteRequestAsync(T request); diff --git a/Ombi/Ombi.Core/Models/Requests/JsonRequestService.cs b/Ombi/Ombi.Core/Models/Requests/JsonRequestService.cs index ab6ff5303..fb240ae9a 100644 --- a/Ombi/Ombi.Core/Models/Requests/JsonRequestService.cs +++ b/Ombi/Ombi.Core/Models/Requests/JsonRequestService.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Linq; +using System.Security.Cryptography.X509Certificates; using System.Threading.Tasks; using Ombi.Core.Requests.Models; using Ombi.Helpers; @@ -8,12 +9,14 @@ using Ombi.Store.Repository; namespace Ombi.Core.Models.Requests { - public class JsonRequestService : IRequestService where T:BaseRequestModel + public class JsonRequestService : IRequestService where T : BaseRequestModel { public JsonRequestService(IRequestRepository repo) { Repo = repo; + RequestType = typeof(T) == typeof(TvRequestModel) ? RequestType.TvShow : RequestType.Movie; } + private RequestType RequestType { get; } private IRequestRepository Repo { get; } public int AddRequest(T model) { @@ -28,13 +31,15 @@ namespace Ombi.Core.Models.Requests var entity = new RequestBlobs { Type = model.Type, Content = ByteConverterHelper.ReturnBytes(model), ProviderId = model.ProviderId }; var id = await Repo.InsertAsync(entity).ConfigureAwait(false); - return id.Id; + return id.Id; } public T CheckRequest(int providerId) { var blobs = Repo.GetAll(); - var blob = blobs.FirstOrDefault(x => x.ProviderId == providerId); if (blob == null) + var blob = blobs.FirstOrDefault(x => x.ProviderId == providerId && x.Type == RequestType); + + if (blob == null) { return null; } @@ -46,33 +51,7 @@ namespace Ombi.Core.Models.Requests public async Task CheckRequestAsync(int providerId) { var blobs = await Repo.GetAllAsync().ConfigureAwait(false); - var blob = blobs.FirstOrDefault(x => x.ProviderId == providerId); if (blob == null) - { - return null; - } - var model = ByteConverterHelper.ReturnObject(blob.Content); - model.Id = blob.Id; - return model; - } - - public T CheckRequest(string musicId) - { - var blobs = Repo.GetAll(); - var blob = blobs.FirstOrDefault(x => x.MusicId == musicId); if (blob == null) - { - return null; - } - var model = ByteConverterHelper.ReturnObject(blob.Content); - model.Id = blob.Id; - return model; - } - - public async Task CheckRequestAsync(string musicId) - { - var blobs = await Repo.GetAllAsync().ConfigureAwait(false); - var blob = blobs.FirstOrDefault(x => x.MusicId == musicId); - - if (blob == null) + var blob = blobs.FirstOrDefault(x => x.ProviderId == providerId && x.Type == RequestType); if (blob == null) { return null; } @@ -133,7 +112,7 @@ namespace Ombi.Core.Models.Requests public IEnumerable GetAll() { - var blobs = Repo.GetAll().ToList(); + var blobs = Repo.GetAll().Where(x => x.Type == RequestType).ToList(); var retVal = new List(); foreach (var b in blobs) @@ -154,7 +133,7 @@ namespace Ombi.Core.Models.Requests var blobs = await Repo.GetAllAsync().ConfigureAwait(false); var retVal = new List(); - foreach (var b in blobs) + foreach (var b in blobs.Where(x => x.Type == RequestType)) { if (b == null) { @@ -172,7 +151,7 @@ namespace Ombi.Core.Models.Requests var blobs = await Repo.GetAllAsync(count, position).ConfigureAwait(false); var retVal = new List(); - foreach (var b in blobs) + foreach (var b in blobs.Where(x => x.Type == RequestType)) { if (b == null) { diff --git a/Ombi/Ombi.Core/Ombi.Core.csproj b/Ombi/Ombi.Core/Ombi.Core.csproj index d58486855..6f02e21b2 100644 --- a/Ombi/Ombi.Core/Ombi.Core.csproj +++ b/Ombi/Ombi.Core/Ombi.Core.csproj @@ -26,10 +26,4 @@ - - - ..\Assemblies\TraktApiSharp.dll - - - \ No newline at end of file diff --git a/Ombi/Ombi.DependencyInjection/IocExtensions.cs b/Ombi/Ombi.DependencyInjection/IocExtensions.cs index 0217b11cc..d3dcbf7ff 100644 --- a/Ombi/Ombi.DependencyInjection/IocExtensions.cs +++ b/Ombi/Ombi.DependencyInjection/IocExtensions.cs @@ -10,7 +10,6 @@ using Ombi.Api.Emby; using Ombi.Api.Plex; using Ombi.Api.Sonarr; using Ombi.Api.TheMovieDb; -//using Ombi.Api.Trakt; using Ombi.Api.TvMaze; using Ombi.Core; using Ombi.Core.Engine; @@ -59,7 +58,6 @@ namespace Ombi.DependencyInjection services.AddTransient(); services.AddTransient(); services.AddTransient(); - //services.AddTransient(); return services; } diff --git a/Ombi/Ombi.Helpers/LoggingEvents.cs b/Ombi/Ombi.Helpers/LoggingEvents.cs new file mode 100644 index 000000000..00fa0ee01 --- /dev/null +++ b/Ombi/Ombi.Helpers/LoggingEvents.cs @@ -0,0 +1,9 @@ +using Microsoft.Extensions.Logging; + +namespace Ombi.Helpers +{ + public class LoggingEvents + { + public static EventId ApiException => new EventId(1000); + } +} \ No newline at end of file diff --git a/Ombi/Ombi.Helpers/Ombi.Helpers.csproj b/Ombi/Ombi.Helpers/Ombi.Helpers.csproj index 3f353740a..eeddd3ab1 100644 --- a/Ombi/Ombi.Helpers/Ombi.Helpers.csproj +++ b/Ombi/Ombi.Helpers/Ombi.Helpers.csproj @@ -10,4 +10,10 @@ + + + ..\..\..\..\..\.nuget\packages\microsoft.extensions.logging.abstractions\1.1.1\lib\netstandard1.1\Microsoft.Extensions.Logging.Abstractions.dll + + + \ No newline at end of file diff --git a/Ombi/Ombi/Controllers/SearchController.cs b/Ombi/Ombi/Controllers/SearchController.cs index 0e870acc1..3ecccc264 100644 --- a/Ombi/Ombi/Controllers/SearchController.cs +++ b/Ombi/Ombi/Controllers/SearchController.cs @@ -65,25 +65,25 @@ namespace Ombi.Controllers return await TvEngine.Search(searchTerm); } - [HttpGet("tv/popular")] - public async Task> PopularTv() - { - return await TvEngine.Popular(); - } - [HttpGet("tv/anticiplated")] - public async Task> AnticiplatedTv() - { - return await TvEngine.Anticipated(); - } - [HttpGet("tv/mostwatched")] - public async Task> MostWatched() - { - return await TvEngine.MostWatches(); - } - [HttpGet("tv/trending")] - public async Task> Trending() - { - return await TvEngine.Trending(); - } + //[HttpGet("tv/popular")] + //public async Task> PopularTv() + //{ + // return await TvEngine.Popular(); + //} + //[HttpGet("tv/anticiplated")] + //public async Task> AnticiplatedTv() + //{ + // return await TvEngine.Anticipated(); + //} + //[HttpGet("tv/mostwatched")] + //public async Task> MostWatched() + //{ + // return await TvEngine.MostWatches(); + //} + //[HttpGet("tv/trending")] + //public async Task> Trending() + //{ + // return await TvEngine.Trending(); + //} } } diff --git a/Ombi/Ombi/Ombi.csproj b/Ombi/Ombi/Ombi.csproj index 6a870871b..ca485e117 100644 --- a/Ombi/Ombi/Ombi.csproj +++ b/Ombi/Ombi/Ombi.csproj @@ -48,12 +48,6 @@ - - - ..\Assemblies\TraktApiSharp.dll - - - PreserveNewest diff --git a/Ombi/Ombi/wwwroot/app/config.ts b/Ombi/Ombi/wwwroot/app/config.ts index add945489..e2c0270f0 100644 --- a/Ombi/Ombi/wwwroot/app/config.ts +++ b/Ombi/Ombi/wwwroot/app/config.ts @@ -6,7 +6,7 @@ enum envs { live = 2 } -var envVar = '0'; +var envVar = '{something}'; var env = envs.local; if (envs[envVar]) { env = envs[envVar]; diff --git a/Ombi/Ombi/wwwroot/app/requests/movierequests.component.html b/Ombi/Ombi/wwwroot/app/requests/movierequests.component.html index 767c18ac7..22abf4df1 100644 --- a/Ombi/Ombi/wwwroot/app/requests/movierequests.component.html +++ b/Ombi/Ombi/wwwroot/app/requests/movierequests.component.html @@ -17,8 +17,7 @@
- poster - poster + poster
diff --git a/Ombi/Ombi/wwwroot/app/requests/tvrequests.component.html b/Ombi/Ombi/wwwroot/app/requests/tvrequests.component.html index adcba5f6a..db2fd905c 100644 --- a/Ombi/Ombi/wwwroot/app/requests/tvrequests.component.html +++ b/Ombi/Ombi/wwwroot/app/requests/tvrequests.component.html @@ -17,8 +17,7 @@
- poster - poster + poster
@@ -75,6 +74,30 @@ @UI.Issues_Issue: {{/if_eq}}
--> + + + +
+ +
+ +
+
+
Requested By: {{user}}
+
+ Request status: + Available + Processing Request + Request Denied + + Pending Approval + +
+
+ +
+
+
diff --git a/Ombi/Ombi/wwwroot/app/requests/tvrequests.component.ts b/Ombi/Ombi/wwwroot/app/requests/tvrequests.component.ts index 9949b8591..2ea70e328 100644 --- a/Ombi/Ombi/wwwroot/app/requests/tvrequests.component.ts +++ b/Ombi/Ombi/wwwroot/app/requests/tvrequests.component.ts @@ -91,7 +91,9 @@ export class TvRequestsComponent implements OnInit { } private loadInit() { - this.requestService.getTvRequests(this.amountToLoad, 0).subscribe(x => this.tvRequests = x); + this.requestService.getTvRequests(this.amountToLoad, 0).subscribe(x => { + this.tvRequests = x; + }); this.isAdmin = this.identityService.hasRole("Admin"); } diff --git a/Ombi/Ombi/wwwroot/app/search/moviesearch.component.html b/Ombi/Ombi/wwwroot/app/search/moviesearch.component.html index 1dee2808f..99022e6ce 100644 --- a/Ombi/Ombi/wwwroot/app/search/moviesearch.component.html +++ b/Ombi/Ombi/wwwroot/app/search/moviesearch.component.html @@ -22,6 +22,10 @@
+
+
Sorry, we didn't find any results!
+
+
@@ -61,22 +65,22 @@ Trailer -
-
+
+
-

{{result.overview}}

+

{{result.overview}}

- +
-
-
+
+
View In Plex
@@ -92,7 +96,7 @@ -
+
- - + +
-
+
diff --git a/Ombi/Ombi/wwwroot/app/search/moviesearch.component.ts b/Ombi/Ombi/wwwroot/app/search/moviesearch.component.ts index a72d2a058..9717bdb8f 100644 --- a/Ombi/Ombi/wwwroot/app/search/moviesearch.component.ts +++ b/Ombi/Ombi/wwwroot/app/search/moviesearch.component.ts @@ -22,6 +22,7 @@ export class MovieSearchComponent implements OnInit { searchChanged: Subject = new Subject(); movieResults: ISearchMovieResult[]; result: IRequestEngineResult; + searchApplied = false; constructor(private searchService: SearchService, private requestService: RequestService, private notificationService: NotificationService) { this.searchChanged @@ -35,7 +36,7 @@ export class MovieSearchComponent implements OnInit { } this.searchService.searchMovie(this.searchText).subscribe(x => { this.movieResults = x; - + this.searchApplied = true; // Now let's load some exta info including IMDBId // This way the search is fast at displaying results. this.getExtaInfo(); @@ -105,6 +106,7 @@ export class MovieSearchComponent implements OnInit { private clearResults() { this.movieResults = []; + this.searchApplied = false; } } \ No newline at end of file diff --git a/Ombi/Ombi/wwwroot/app/search/tvsearch.component.html b/Ombi/Ombi/wwwroot/app/search/tvsearch.component.html index 1112108b9..5ef77290e 100644 --- a/Ombi/Ombi/wwwroot/app/search/tvsearch.component.html +++ b/Ombi/Ombi/wwwroot/app/search/tvsearch.component.html @@ -28,6 +28,11 @@
+ +
+
Sorry, we didn't find any results!
+
+
@@ -37,11 +42,13 @@
- - - {{result.seriesName}} ({{result.firstAired}}) - {{result.status}} + +

{{result.seriesName}} ({{result.firstAired}})

+ +
+ + {{result.status}} Air Date: {{result.firstAired}} @@ -71,19 +78,19 @@

-

{{result.overview}}

+

{{result.overview}}

- +
-
-
+
+
View In Plex
@@ -99,7 +106,7 @@ -
+
- - + +
-
+
diff --git a/Ombi/Ombi/wwwroot/app/search/tvsearch.component.ts b/Ombi/Ombi/wwwroot/app/search/tvsearch.component.ts index 5042350ba..7913a390e 100644 --- a/Ombi/Ombi/wwwroot/app/search/tvsearch.component.ts +++ b/Ombi/Ombi/wwwroot/app/search/tvsearch.component.ts @@ -22,6 +22,7 @@ export class TvSearchComponent implements OnInit { searchChanged = new Subject(); tvResults: ISearchTvResult[]; result: IRequestEngineResult; + searchApplied = false; constructor(private searchService: SearchService, private requestService: RequestService, private notificationService: NotificationService) { this.searchChanged @@ -35,6 +36,7 @@ export class TvSearchComponent implements OnInit { } this.searchService.searchTv(this.searchText).subscribe(x => { this.tvResults = x; + this.searchApplied = true; }); }); } @@ -98,6 +100,7 @@ export class TvSearchComponent implements OnInit { private clearResults() { this.tvResults = []; + this.searchApplied = false; } } \ No newline at end of file