mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-22 06:13:22 -07:00
Merge branch 'master' into feature/watchlist-all-seasons
This commit is contained in:
parent
8b8fb22dd4
commit
b0d5198847
22 changed files with 4789 additions and 1811 deletions
73
CHANGELOG.md
73
CHANGELOG.md
|
@ -1,3 +1,7 @@
|
|||
## [4.22.5](https://github.com/Ombi-app/Ombi/compare/v4.16.12...v4.22.5) (2022-08-05)
|
||||
|
||||
|
||||
|
||||
## [4.27.7](https://github.com/Ombi-app/Ombi/compare/v4.27.6...v4.27.7) (2022-10-07)
|
||||
|
||||
|
||||
|
@ -337,72 +341,3 @@
|
|||
|
||||
|
||||
|
||||
## [4.16.11](https://github.com/Ombi-app/Ombi/compare/v4.16.10...v4.16.11) (2022-04-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Set the default job for the watchlist import to hourly instead of daily ([75906af](https://github.com/Ombi-app/Ombi/commit/75906af0adee3e3c68d825c3aaa8f7b918461b1f))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([0e8a64b](https://github.com/Ombi-app/Ombi/commit/0e8a64b8ca00d210fbe843ac2c3f6af218d80cbc))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([7b0ad61](https://github.com/Ombi-app/Ombi/commit/7b0ad61bfcff3986b33180dc64022cba7ea8eefb))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([4fc2c1f](https://github.com/Ombi-app/Ombi/commit/4fc2c1f24534085a783a3d5791f5533b68272153))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([76ab733](https://github.com/Ombi-app/Ombi/commit/76ab733b91791e4d93d184f3c7d0779c6a388695))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([06e4cef](https://github.com/Ombi-app/Ombi/commit/06e4cefa7b4e55b860da9a64f461f6ec8fa17367))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([c12d89d](https://github.com/Ombi-app/Ombi/commit/c12d89d6781a337520977ad285f8d08c93f434dd))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([bc0c2f6](https://github.com/Ombi-app/Ombi/commit/bc0c2f622e34fb5a2711039d9ed7aad34f982b15))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([e4b00e6](https://github.com/Ombi-app/Ombi/commit/e4b00e6b3468bd9389eeb02fc6ad7daf27abc3b3))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([d1998d3](https://github.com/Ombi-app/Ombi/commit/d1998d326f999a38586d0a351a20c5448df95842))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([bee4ccb](https://github.com/Ombi-app/Ombi/commit/bee4ccb804594e7385b1fbdc9fe2ef5c42e0d21f))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([80233ed](https://github.com/Ombi-app/Ombi/commit/80233ed560cc976e83570d0655c3472f20171fb3))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([8a78adc](https://github.com/Ombi-app/Ombi/commit/8a78adc9bb62f277f2b213dcb3847ed6d0089fcb))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([d04c60a](https://github.com/Ombi-app/Ombi/commit/d04c60aa5909b47ba6bffa6f66b03079cbd43521))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([92a785e](https://github.com/Ombi-app/Ombi/commit/92a785e736fa4b72a45270da2d0f4661df433078))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([634982d](https://github.com/Ombi-app/Ombi/commit/634982df2661cefab5ea9f5163fe04a005cc0171))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([b404baa](https://github.com/Ombi-app/Ombi/commit/b404baad6d0aeaa1561701e0db8db4e78613a364))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([d14f11e](https://github.com/Ombi-app/Ombi/commit/d14f11e0eb20ab0a68e765ee77968b3b3e54e995))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([7cf64f9](https://github.com/Ombi-app/Ombi/commit/7cf64f909d78908edaabeffb8a39a7d02e73fe7e))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([0c9e1ec](https://github.com/Ombi-app/Ombi/commit/0c9e1ec090827080cc8f7393e5e91456ff37d691))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([3b0b730](https://github.com/Ombi-app/Ombi/commit/3b0b730cb02efe24f6d4026e5fdb20d37e495119))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([6ed1a03](https://github.com/Ombi-app/Ombi/commit/6ed1a03b7ff4077f09ea9e13394b18b0d138f4c3))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([2941acd](https://github.com/Ombi-app/Ombi/commit/2941acd3b2ec74a5e6aeea275ab5a39d2653f37f))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([c075a1a](https://github.com/Ombi-app/Ombi/commit/c075a1a66784d975eaf60f2dfbbcbe048f2f63d7))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([76bd81c](https://github.com/Ombi-app/Ombi/commit/76bd81c3ca55a98c6ec944a838dc01294a6193a6))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([0d38275](https://github.com/Ombi-app/Ombi/commit/0d3827507e002bcf58f673e97ffcc3bd25dcf337))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([5c99601](https://github.com/Ombi-app/Ombi/commit/5c99601b07aec1a65d0186a4c4327440811e64c6))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([01546a0](https://github.com/Ombi-app/Ombi/commit/01546a0f7f86379528b486463246ef9bdfb9033e))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([d7fea78](https://github.com/Ombi-app/Ombi/commit/d7fea7843aaaab7ddff8dc31ca6d2a9117471dcc))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([1a6b95d](https://github.com/Ombi-app/Ombi/commit/1a6b95d45c220310213b8d811272a63f0f6ff42b))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([fa10174](https://github.com/Ombi-app/Ombi/commit/fa1017422c4efd4b0897871bd3c671151774d7c3))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([0c31e62](https://github.com/Ombi-app/Ombi/commit/0c31e628df376aac6d56ae67c7c705a9a4a7c080))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([6399643](https://github.com/Ombi-app/Ombi/commit/63996437a02fe10ffae6822ffa15369bec0a6b36))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([5826e2d](https://github.com/Ombi-app/Ombi/commit/5826e2d9a1c3f1210a87fa270dc0c81bac32944a))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([d434514](https://github.com/Ombi-app/Ombi/commit/d43451405be489254d7cdc7755d5f516a1e495a5))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([0b9596d](https://github.com/Ombi-app/Ombi/commit/0b9596d807178f5e071113ec0347868ec7f0960b))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([8c4c0b2](https://github.com/Ombi-app/Ombi/commit/8c4c0b262978c1303767af360d802c4b4c2b4d24))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([289ab77](https://github.com/Ombi-app/Ombi/commit/289ab77b0e04aae235b6f6cebc86e0a8d1f0cf2b))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([30e3417](https://github.com/Ombi-app/Ombi/commit/30e3417285a4eed18d429d7776f0e74096e834c0))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([6c0a5da](https://github.com/Ombi-app/Ombi/commit/6c0a5dadd4b8f37760252eb0fe7f88908f55506d))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([d5bf969](https://github.com/Ombi-app/Ombi/commit/d5bf9692ce1fc0ccfe7beca6dd200c78be177bdc))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([8a9e7ea](https://github.com/Ombi-app/Ombi/commit/8a9e7ea588aefbcd73ed82625887e3614e1703ea))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([01047a3](https://github.com/Ombi-app/Ombi/commit/01047a3fd67153f3ff16f860d2c7b50213e8d9b2))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([698a23f](https://github.com/Ombi-app/Ombi/commit/698a23fb83f323cdd1dd57cb49803079d44214a7))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([24eb842](https://github.com/Ombi-app/Ombi/commit/24eb842fc4424f7bcc3ec2949d7f5472492e96f6))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([ac8b16a](https://github.com/Ombi-app/Ombi/commit/ac8b16a3051ad71dbd54a8973c7dd847b564a515))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([f428ce6](https://github.com/Ombi-app/Ombi/commit/f428ce6a700c081437703839bc84d2f2b1138bcc))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([94b16df](https://github.com/Ombi-app/Ombi/commit/94b16dfe09bf1d2cd6286777d74eb5d4496abbbb))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([4881775](https://github.com/Ombi-app/Ombi/commit/4881775eda69a8f136ce0d8fbbf970e3d0406dc9))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([8297db9](https://github.com/Ombi-app/Ombi/commit/8297db91e85da308bde6fb09ad78347dee063630))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([d1152ab](https://github.com/Ombi-app/Ombi/commit/d1152ab7674243daa528c524c0cdc87d81ad49c9))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([eb2788b](https://github.com/Ombi-app/Ombi/commit/eb2788b761b55c487a59a049427ca08f6c10e836))
|
||||
* **translations:** 🌐 New translations from Crowdin [skip ci] ([21a794c](https://github.com/Ombi-app/Ombi/commit/21a794cbc0a5fa735ca0347c8f7f1ac04a487fbc))
|
||||
|
||||
|
||||
|
||||
## [4.10.2](https://github.com/Ombi-app/Ombi/compare/v4.10.1...v4.10.2) (2022-01-22)
|
||||
|
||||
|
||||
|
||||
## [4.16.10](https://github.com/Ombi-app/Ombi/compare/v4.16.9...v4.16.10) (2022-04-13)
|
||||
|
||||
|
||||
|
||||
|
|
30
README.md
30
README.md
|
@ -550,7 +550,8 @@ Here are some of the features Ombi has:
|
|||
<br />
|
||||
<sub><b>Jacob Pyke</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/jamesmacwhite">
|
||||
<img src="https://avatars.githubusercontent.com/u/8067792?v=4" width="50;" alt="jamesmacwhite"/>
|
||||
|
@ -593,7 +594,8 @@ Here are some of the features Ombi has:
|
|||
<br />
|
||||
<sub><b>Kris Klosterman</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/kmlucy">
|
||||
<img src="https://avatars.githubusercontent.com/u/13952475?v=4" width="50;" alt="kmlucy"/>
|
||||
|
@ -628,15 +630,15 @@ Here are some of the features Ombi has:
|
|||
<br />
|
||||
<sub><b>Marley</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/mattmattmatt">
|
||||
<img src="https://avatars.githubusercontent.com/u/927830?v=4" width="50;" alt="mattmattmatt"/>
|
||||
<br />
|
||||
<sub><b>Matt</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/LMaxence">
|
||||
<img src="https://avatars.githubusercontent.com/u/29194680?v=4" width="50;" alt="LMaxence"/>
|
||||
|
@ -671,8 +673,7 @@ Here are some of the features Ombi has:
|
|||
<br />
|
||||
<sub><b>Qiming Chen</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/randallbruder">
|
||||
<img src="https://avatars.githubusercontent.com/u/6447487?v=4" width="50;" alt="randallbruder"/>
|
||||
|
@ -686,7 +687,8 @@ Here are some of the features Ombi has:
|
|||
<br />
|
||||
<sub><b>Rob Gökemeijer</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/sambartik">
|
||||
<img src="https://avatars.githubusercontent.com/u/63553146?v=4" width="50;" alt="sambartik"/>
|
||||
|
@ -714,8 +716,7 @@ Here are some of the features Ombi has:
|
|||
<br />
|
||||
<sub><b>Teifun2</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/thomasvt1">
|
||||
<img src="https://avatars.githubusercontent.com/u/2271011?v=4" width="50;" alt="thomasvt1"/>
|
||||
|
@ -729,7 +730,8 @@ Here are some of the features Ombi has:
|
|||
<br />
|
||||
<sub><b>Tim Trott</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/tombomb">
|
||||
<img src="https://avatars.githubusercontent.com/u/544509?v=4" width="50;" alt="tombomb"/>
|
||||
|
@ -772,7 +774,8 @@ Here are some of the features Ombi has:
|
|||
<br />
|
||||
<sub><b>Blake Drumm</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/camjac251">
|
||||
<img src="https://avatars.githubusercontent.com/u/6313132?v=4" width="50;" alt="camjac251"/>
|
||||
|
@ -800,8 +803,7 @@ Here are some of the features Ombi has:
|
|||
<br />
|
||||
<sub><b>Echel0n</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/m4tta">
|
||||
<img src="https://avatars.githubusercontent.com/u/427218?v=4" width="50;" alt="m4tta"/>
|
||||
|
|
|
@ -4,10 +4,12 @@ using System.Threading.Tasks;
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Ombi.Core;
|
||||
using Ombi.Core.Notifications;
|
||||
using Ombi.Core.Services;
|
||||
using Ombi.Helpers;
|
||||
using Ombi.Hubs;
|
||||
using Ombi.Notifications.Models;
|
||||
using Ombi.Schedule.Jobs.Ombi;
|
||||
using Ombi.Settings.Settings.Models;
|
||||
using Ombi.Store.Entities;
|
||||
using Ombi.Store.Repository;
|
||||
|
@ -19,16 +21,21 @@ namespace Ombi.Schedule.Jobs.Emby
|
|||
public class EmbyAvaliabilityChecker : AvailabilityChecker, IEmbyAvaliabilityChecker
|
||||
{
|
||||
public EmbyAvaliabilityChecker(IEmbyContentRepository repo, ITvRequestRepository t, IMovieRequestRepository m,
|
||||
INotificationHelper n, ILogger<EmbyAvaliabilityChecker> log, INotificationHubService notification, IFeatureService featureService)
|
||||
: base(t, n, log, notification)
|
||||
INotificationHelper n, ILogger<EmbyAvaliabilityChecker> log, IHubContext<NotificationHub> notification, IFeatureService featureService)
|
||||
{
|
||||
_repo = repo;
|
||||
_movieRepo = m;
|
||||
_notificationService = n;
|
||||
_log = log;
|
||||
_notification = notification;
|
||||
_featureService = featureService;
|
||||
}
|
||||
|
||||
private readonly IMovieRequestRepository _movieRepo;
|
||||
private readonly IEmbyContentRepository _repo;
|
||||
private readonly INotificationHelper _notificationService;
|
||||
private readonly ILogger<EmbyAvaliabilityChecker> _log;
|
||||
private readonly IHubContext<NotificationHub> _notification;
|
||||
private readonly IFeatureService _featureService;
|
||||
|
||||
public async Task Execute(IJobExecutionContext job)
|
||||
|
|
|
@ -46,16 +46,21 @@ namespace Ombi.Schedule.Jobs.Jellyfin
|
|||
public class JellyfinAvaliabilityChecker : AvailabilityChecker, IJellyfinAvaliabilityChecker
|
||||
{
|
||||
public JellyfinAvaliabilityChecker(IJellyfinContentRepository repo, ITvRequestRepository t, IMovieRequestRepository m,
|
||||
INotificationHelper n, ILogger<JellyfinAvaliabilityChecker> log, INotificationHubService notification, IFeatureService featureService)
|
||||
: base(t, n, log, notification)
|
||||
INotificationHelper n, ILogger<JellyfinAvaliabilityChecker> log, IHubContext<NotificationHub> notification, IFeatureService featureService)
|
||||
{
|
||||
_repo = repo;
|
||||
_movieRepo = m;
|
||||
_notificationService = n;
|
||||
_log = log;
|
||||
_notification = notification;
|
||||
_featureService = featureService;
|
||||
}
|
||||
|
||||
private readonly IMovieRequestRepository _movieRepo;
|
||||
private readonly IJellyfinContentRepository _repo;
|
||||
private readonly INotificationHelper _notificationService;
|
||||
private readonly ILogger<JellyfinAvaliabilityChecker> _log;
|
||||
private readonly IHubContext<NotificationHub> _notification;
|
||||
private readonly IFeatureService _featureService;
|
||||
|
||||
public async Task Execute(IJobExecutionContext job)
|
||||
|
|
|
@ -213,7 +213,7 @@ namespace Ombi.Store.Context
|
|||
notificationToAdd = new NotificationTemplates
|
||||
{
|
||||
NotificationType = notificationType,
|
||||
Message = "Your TV request for {Title} is now partially available! Episodes {PartiallyAvailableEpisodesList}!",
|
||||
Message = "Your TV request for {Title} is now partially available! Season {PartiallyAvailableSeasonNumber} Episodes {PartiallyAvailableEpisodeNumbers}!",
|
||||
Subject = "{ApplicationName}: Partially Available Request!",
|
||||
Agent = agent,
|
||||
Enabled = true,
|
||||
|
|
|
@ -46,7 +46,5 @@ namespace Ombi.Api.TheMovieDb
|
|||
Task<List<Language>> GetLanguages(CancellationToken cancellationToken);
|
||||
Task<List<WatchProvidersResults>> SearchWatchProviders(string media, string searchTerm, CancellationToken cancellationToken);
|
||||
Task<List<MovieDbSearchResult>> AdvancedSearch(DiscoverModel model, int page, CancellationToken cancellationToken);
|
||||
Task<MovieDbImages> GetTvImages(string theMovieDbId, CancellationToken token);
|
||||
Task<MovieDbImages> GetMovieImages(string theMovieDbId, CancellationToken token);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,14 +6,13 @@ module.exports = {
|
|||
"addons": [
|
||||
"@storybook/addon-links",
|
||||
"@storybook/addon-essentials",
|
||||
"@storybook/addon-interactions",
|
||||
"@storybook/preset-scss",
|
||||
"@storybook/addon-interactions"
|
||||
],
|
||||
"framework": "@storybook/angular",
|
||||
"core": {
|
||||
"builder": "@storybook/builder-webpack5"
|
||||
},
|
||||
"staticDirs": [{ from: '../../wwwroot/images', to: 'images' }, { from: '../../wwwroot/translations', to: 'translations'}],
|
||||
"staticDirs": [{from :'../../wwwroot/images', to: 'images'}],
|
||||
"features": {
|
||||
interactionsDebugger: true,
|
||||
}
|
||||
|
|
|
@ -5,6 +5,5 @@
|
|||
|
||||
body {
|
||||
background: #0f171f;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
|
@ -1,8 +1,5 @@
|
|||
import { setCompodocJson } from "@storybook/addon-docs/angular";
|
||||
import docJson from "../documentation.json";
|
||||
|
||||
import '../src/styles/_imports.scss';
|
||||
|
||||
setCompodocJson(docJson);
|
||||
|
||||
export const parameters = {
|
||||
|
|
|
@ -81,9 +81,9 @@
|
|||
"@storybook/addon-links": "^6.5.9",
|
||||
"@storybook/angular": "^6.5.9",
|
||||
"@storybook/builder-webpack5": "^6.5.9",
|
||||
"@storybook/jest": "^0.0.10",
|
||||
"@storybook/manager-webpack5": "^6.5.9",
|
||||
"@storybook/testing-library": "^0.0.13",
|
||||
"@storybook/preset-scss": "^1.0.3",
|
||||
"@types/jasmine": "~3.6.7",
|
||||
"@types/jasminewd2": "~2.0.8",
|
||||
"@types/node": "^16.11.45",
|
||||
|
|
|
@ -1,23 +1,18 @@
|
|||
import { OmbiCommonModules } from "../modules";
|
||||
import {
|
||||
ChangeDetectionStrategy,
|
||||
Component,
|
||||
Inject,
|
||||
Input,
|
||||
ViewEncapsulation,
|
||||
} from "@angular/core";
|
||||
import { ChangeDetectionStrategy, Component, ElementRef, Inject, Input, ViewEncapsulation } from "@angular/core";
|
||||
import { RequestType } from "../../interfaces";
|
||||
import { APP_BASE_HREF } from "@angular/common";
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
selector: "ombi-image",
|
||||
selector: 'ombi-image',
|
||||
imports: [...OmbiCommonModules],
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
templateUrl: "./image.component.html",
|
||||
})
|
||||
export class ImageComponent {
|
||||
templateUrl: './image.component.html',
|
||||
})
|
||||
export class ImageComponent {
|
||||
|
||||
@Input() public src: string;
|
||||
@Input() public type: RequestType;
|
||||
|
||||
|
@ -27,51 +22,36 @@ export class ImageComponent {
|
|||
@Input() public alt: string;
|
||||
@Input() public style: string;
|
||||
|
||||
private baseUrl: string = "";
|
||||
public baseUrl: string = "";
|
||||
|
||||
private defaultTv = "/images/default_tv_poster.png";
|
||||
public defaultTv = "/images/default_tv_poster.png";
|
||||
private defaultMovie = "/images/default_movie_poster.png";
|
||||
private defaultMusic = "/images/default-music-placeholder.png";
|
||||
private defaultMusic = "i/mages/default-music-placeholder.png";
|
||||
|
||||
private maxRetries = 1;
|
||||
private retriesPerformed = 0;
|
||||
|
||||
constructor(@Inject(APP_BASE_HREF) private href: string) {
|
||||
constructor (@Inject(APP_BASE_HREF) public href: string) {
|
||||
if (this.href.length > 1) {
|
||||
this.baseUrl = this.href;
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
if (!this.src) {
|
||||
// Prevent unnecessary error handling when src is not specified.
|
||||
this.src = this.getPlaceholderImage();
|
||||
}
|
||||
}
|
||||
|
||||
public onError(event: any) {
|
||||
event.target.src = this.getPlaceholderImage();
|
||||
|
||||
if (!this.src || this.retriesPerformed === this.maxRetries) {
|
||||
return;
|
||||
// set to a placeholder
|
||||
switch(this.type) {
|
||||
case RequestType.movie:
|
||||
event.target.src = this.baseUrl + this.defaultMovie;
|
||||
break;
|
||||
case RequestType.tvShow:
|
||||
event.target.src = this.baseUrl + this.defaultTv;
|
||||
break;
|
||||
case RequestType.album:
|
||||
event.target.src = this.baseUrl + this.defaultMusic;
|
||||
break;
|
||||
}
|
||||
|
||||
// Retry the original image.
|
||||
this.retriesPerformed++;
|
||||
// Retry the original image
|
||||
const timeout = setTimeout(() => {
|
||||
clearTimeout(timeout);
|
||||
event.target.src = this.src;
|
||||
clearTimeout(timeout);
|
||||
}, Math.floor(Math.random() * (7000 - 1000 + 1)) + 1000);
|
||||
}
|
||||
|
||||
private getPlaceholderImage() {
|
||||
switch (this.type) {
|
||||
case RequestType.movie:
|
||||
return this.baseUrl + this.defaultMovie;
|
||||
case RequestType.tvShow:
|
||||
return this.baseUrl + this.defaultTv;
|
||||
case RequestType.album:
|
||||
return this.baseUrl + this.defaultMusic;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
export * from "./image-background/image-background.component";
|
||||
export * from "./image/image.component";
|
||||
export * from "./detailed-card/detailed-card.component";
|
|
@ -1,4 +1,3 @@
|
|||
import { CommonModule } from "@angular/common";
|
||||
import { MomentModule } from "ngx-moment";
|
||||
|
||||
export const OmbiCommonModules = [ CommonModule, MomentModule ];
|
||||
export const OmbiCommonModules = [ CommonModule ];
|
||||
|
|
|
@ -19,7 +19,7 @@ import { ImageComponent } from 'app/components';
|
|||
MatButtonToggleModule,
|
||||
InfiniteScrollModule,
|
||||
SkeletonModule,
|
||||
ImageComponent,
|
||||
ImageComponent
|
||||
],
|
||||
declarations: [
|
||||
...fromComponents.components
|
||||
|
|
|
@ -82,7 +82,6 @@ export class MovieDetailsComponent implements OnInit{
|
|||
this.searchService.getMovieByImdbId(this.imdbId).subscribe(async x => {
|
||||
this.movie = x;
|
||||
this.checkPoster();
|
||||
this.movie.credits.crew = this.orderCrew(this.movie.credits.crew);
|
||||
if (this.movie.requestId > 0) {
|
||||
// Load up this request
|
||||
this.hasRequest = true;
|
||||
|
@ -94,7 +93,6 @@ export class MovieDetailsComponent implements OnInit{
|
|||
this.searchService.getFullMovieDetails(this.theMovidDbId).subscribe(async x => {
|
||||
this.movie = x;
|
||||
this.checkPoster();
|
||||
this.movie.credits.crew = this.orderCrew(this.movie.credits.crew);
|
||||
if (this.movie.requestId > 0) {
|
||||
// Load up this request
|
||||
this.hasRequest = true;
|
||||
|
|
|
@ -4,6 +4,8 @@ import { Story, Meta, moduleMetadata } from '@storybook/angular';
|
|||
import { SocialIconsComponent } from './social-icons.component';
|
||||
import { MatMenuModule } from "@angular/material/menu";
|
||||
import { RequestType } from '../../../../interfaces';
|
||||
import { userEvent, waitFor, within } from '@storybook/testing-library';
|
||||
import { expect } from '@storybook/jest';
|
||||
|
||||
// More on default export: https://storybook.js.org/docs/angular/writing-stories/introduction#default-export
|
||||
export default {
|
||||
|
|
|
@ -6,9 +6,6 @@ import { IPlexLibrariesSettings, IPlexServer, IPlexServerResponse, IPlexServerVi
|
|||
import { JobService, NotificationService, PlexService, SettingsService, TesterService } from "../../services";
|
||||
import { MatTabChangeEvent, MatTabGroup } from "@angular/material/tabs";
|
||||
import {UntypedFormControl} from '@angular/forms';
|
||||
import { MatDialog } from "@angular/material/dialog";
|
||||
import { PlexWatchlistComponent } from "./components/watchlist/plex-watchlist.component";
|
||||
import { PlexCreds, PlexSyncType } from "./components/models";
|
||||
|
||||
@Component({
|
||||
templateUrl: "./plex.component.html",
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -71,14 +71,14 @@
|
|||
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.2.0" />
|
||||
<PackageReference Include="ncrontab" Version="3.3.1" />
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.2" />
|
||||
<PackageReference Include="Serilog" Version="2.12.0" />
|
||||
<PackageReference Include="Serilog.Extensions.Logging" Version="3.1.0" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||
<PackageReference Include="Serilog.Settings.Configuration" Version="3.4.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.Newtonsoft" Version="6.4.0" />
|
||||
<PackageReference Include="ncrontab" Version="3.3.0" />
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.0" />
|
||||
<PackageReference Include="Serilog" Version="2.10.0" />
|
||||
<PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
|
||||
<PackageReference Include="Serilog.Settings.Configuration" Version="3.3.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.3.1" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.Newtonsoft" Version="6.3.1" />
|
||||
<PackageReference Include="System.Security.Cryptography.Csp" Version="4.3.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="6.0.9" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.9" />
|
||||
|
|
|
@ -22,13 +22,13 @@
|
|||
"Monitored": "Sledované",
|
||||
"NotAvailable": "Nie je k dispozícii",
|
||||
"ProcessingRequest": "Spracovávanie požiadavky",
|
||||
"ProcessingRequest4K": "Spracováva sa požiadavka 4K",
|
||||
"ProcessingRequest4K": "Processing Request 4K",
|
||||
"PendingApproval": "Čaká na schválenie",
|
||||
"PendingApproval4K": "Čaká na schválenie 4K",
|
||||
"PendingApproval4K": "Pending Approval 4K",
|
||||
"RequestDenied": "Požiadavka zamietnutá",
|
||||
"RequestDenied4K": "Požiadavka zamietnutá 4K",
|
||||
"RequestDenied4K": "Request Denied 4K",
|
||||
"NotRequested": "Nepožiadané",
|
||||
"NotRequested4K": "Nepožiadané 4K",
|
||||
"NotRequested4K": "Not Requested 4K",
|
||||
"Requested": "Požiadané",
|
||||
"Requested4K": "Požiadané 4K",
|
||||
"Search": "Hľadať",
|
||||
|
@ -65,7 +65,7 @@
|
|||
},
|
||||
"ErrorPages": {
|
||||
"NotFound": "Stránka sa nenašla",
|
||||
"SomethingWentWrong": "Vyskytla sa chyba!"
|
||||
"SomethingWentWrong": "Something went wrong!"
|
||||
},
|
||||
"NavigationBar": {
|
||||
"Discover": "Objaviť",
|
||||
|
@ -345,7 +345,7 @@
|
|||
"Seasons": "Séria:",
|
||||
"Episodes": "Epizódy:",
|
||||
"Availability": "Dostupnosť:",
|
||||
"RequestStatus": "Stav požiadavky:",
|
||||
"RequestStatus": "Request Status:",
|
||||
"Quality": "Kvalita:",
|
||||
"RootFolderOverride": "Prepísanie koreňového priečinku:",
|
||||
"QualityOverride": "Prepísanie kvality:",
|
||||
|
|
|
@ -22,13 +22,13 @@
|
|||
"Monitored": "监控中",
|
||||
"NotAvailable": "不可播放",
|
||||
"ProcessingRequest": "处理中请求",
|
||||
"ProcessingRequest4K": "正在处理",
|
||||
"ProcessingRequest4K": "Processing Request 4K",
|
||||
"PendingApproval": "等待批准",
|
||||
"PendingApproval4K": "待审批",
|
||||
"PendingApproval4K": "Pending Approval 4K",
|
||||
"RequestDenied": "请求被拒绝",
|
||||
"RequestDenied4K": "请求被拒绝 4K",
|
||||
"RequestDenied4K": "Request Denied 4K",
|
||||
"NotRequested": "未请求",
|
||||
"NotRequested4K": "不要求 4K",
|
||||
"NotRequested4K": "Not Requested 4K",
|
||||
"Requested": "已请求",
|
||||
"Requested4K": "请求4K",
|
||||
"Search": "搜索",
|
||||
|
@ -345,7 +345,7 @@
|
|||
"Seasons": "季:",
|
||||
"Episodes": "集:",
|
||||
"Availability": "可用性:",
|
||||
"RequestStatus": "请求状态:",
|
||||
"RequestStatus": "Request Status:",
|
||||
"Quality": "画质:",
|
||||
"RootFolderOverride": "根目录覆盖:",
|
||||
"QualityOverride": "质量覆盖:",
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"version": "4.27.7"
|
||||
"version": "4.22.5"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue