mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-14 01:02:57 -07:00
Merge branch 'develop' of https://github.com/ombi-app/Ombi into develop
This commit is contained in:
commit
043eb08aa5
14 changed files with 79 additions and 40 deletions
|
@ -27,9 +27,12 @@ namespace Ombi.Core.Rule.Rules.Search
|
||||||
var useTheMovieDb = false;
|
var useTheMovieDb = false;
|
||||||
var useId = false;
|
var useId = false;
|
||||||
var useTvDb = false;
|
var useTvDb = false;
|
||||||
|
|
||||||
|
PlexMediaTypeEntity type = ConvertType(obj.Type);
|
||||||
|
|
||||||
if (obj.ImdbId.HasValue())
|
if (obj.ImdbId.HasValue())
|
||||||
{
|
{
|
||||||
item = await PlexContentRepository.Get(obj.ImdbId, ProviderType.ImdbId);
|
item = await PlexContentRepository.GetByType(obj.ImdbId, ProviderType.ImdbId, type);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
{
|
{
|
||||||
useImdb = true;
|
useImdb = true;
|
||||||
|
@ -39,7 +42,7 @@ namespace Ombi.Core.Rule.Rules.Search
|
||||||
{
|
{
|
||||||
if (obj.Id > 0)
|
if (obj.Id > 0)
|
||||||
{
|
{
|
||||||
item = await PlexContentRepository.Get(obj.Id.ToString(), ProviderType.TheMovieDbId);
|
item = await PlexContentRepository.GetByType(obj.Id.ToString(), ProviderType.TheMovieDbId, type);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
{
|
{
|
||||||
useId = true;
|
useId = true;
|
||||||
|
@ -47,7 +50,7 @@ namespace Ombi.Core.Rule.Rules.Search
|
||||||
}
|
}
|
||||||
if (obj.TheMovieDbId.HasValue())
|
if (obj.TheMovieDbId.HasValue())
|
||||||
{
|
{
|
||||||
item = await PlexContentRepository.Get(obj.TheMovieDbId, ProviderType.TheMovieDbId);
|
item = await PlexContentRepository.GetByType(obj.TheMovieDbId, ProviderType.TheMovieDbId, type);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
{
|
{
|
||||||
useTheMovieDb = true;
|
useTheMovieDb = true;
|
||||||
|
@ -58,7 +61,7 @@ namespace Ombi.Core.Rule.Rules.Search
|
||||||
{
|
{
|
||||||
if (obj.TheTvDbId.HasValue())
|
if (obj.TheTvDbId.HasValue())
|
||||||
{
|
{
|
||||||
item = await PlexContentRepository.Get(obj.TheTvDbId, ProviderType.TvDbId);
|
item = await PlexContentRepository.GetByType(obj.TheTvDbId, ProviderType.TvDbId, type);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
{
|
{
|
||||||
useTvDb = true;
|
useTvDb = true;
|
||||||
|
@ -100,6 +103,12 @@ namespace Ombi.Core.Rule.Rules.Search
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private PlexMediaTypeEntity ConvertType(RequestType type) =>
|
||||||
|
type switch
|
||||||
|
{
|
||||||
|
RequestType.Movie => PlexMediaTypeEntity.Movie,
|
||||||
|
RequestType.TvShow => PlexMediaTypeEntity.Show,
|
||||||
|
_ => PlexMediaTypeEntity.Movie,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -107,7 +107,7 @@ namespace Ombi.Helpers
|
||||||
public static string GetPlexMediaUrl(string machineId, int mediaId)
|
public static string GetPlexMediaUrl(string machineId, int mediaId)
|
||||||
{
|
{
|
||||||
var url =
|
var url =
|
||||||
$"https://app.plex.tv/web/app#!/server/{machineId}/details?key=library%2Fmetadata%2F{mediaId}";
|
$"https://app.plex.tv/web/app#!/server/{machineId}/details?key=%2flibrary%2Fmetadata%2F{mediaId}";
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ namespace Ombi.Store.Repository
|
||||||
{
|
{
|
||||||
Task<bool> ContentExists(string providerId);
|
Task<bool> ContentExists(string providerId);
|
||||||
Task<PlexServerContent> Get(string providerId, ProviderType type);
|
Task<PlexServerContent> Get(string providerId, ProviderType type);
|
||||||
|
Task<PlexServerContent> GetByType(string providerId, ProviderType type, PlexMediaTypeEntity plexType);
|
||||||
Task<PlexServerContent> GetByKey(int key);
|
Task<PlexServerContent> GetByKey(int key);
|
||||||
Task Update(PlexServerContent existingContent);
|
Task Update(PlexServerContent existingContent);
|
||||||
IQueryable<PlexEpisode> GetAllEpisodes();
|
IQueryable<PlexEpisode> GetAllEpisodes();
|
||||||
|
|
|
@ -79,6 +79,23 @@ namespace Ombi.Store.Repository
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<PlexServerContent> GetByType(string providerId, ProviderType type, PlexMediaTypeEntity plexType)
|
||||||
|
{
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case ProviderType.ImdbId:
|
||||||
|
return await Db.PlexServerContent.FirstOrDefaultAsync(x => x.ImdbId == providerId && x.Type == plexType);
|
||||||
|
case ProviderType.TheMovieDbId:
|
||||||
|
return await Db.PlexServerContent.FirstOrDefaultAsync(x => x.TheMovieDbId == providerId && x.Type == plexType);
|
||||||
|
case ProviderType.TvDbId:
|
||||||
|
return await Db.PlexServerContent.FirstOrDefaultAsync(x => x.TvDbId == providerId && x.Type == plexType);
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<PlexServerContent> GetByKey(int key)
|
public async Task<PlexServerContent> GetByKey(int key)
|
||||||
{
|
{
|
||||||
return await Db.PlexServerContent.Include(x => x.Seasons).FirstOrDefaultAsync(x => x.Key == key);
|
return await Db.PlexServerContent.Include(x => x.Seasons).FirstOrDefaultAsync(x => x.Key == key);
|
||||||
|
|
|
@ -103,4 +103,10 @@
|
||||||
|
|
||||||
.card-skeleton {
|
.card-skeleton {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width:755px){
|
||||||
|
::ng-deep .p-carousel-item{
|
||||||
|
flex: 1 0 200px !important;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -46,80 +46,80 @@ export class CarouselListComponent implements OnInit {
|
||||||
{
|
{
|
||||||
breakpoint: '4000px',
|
breakpoint: '4000px',
|
||||||
numVisible: 17,
|
numVisible: 17,
|
||||||
numScroll: 17
|
numScroll: 16
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
breakpoint: '3800px',
|
breakpoint: '3800px',
|
||||||
numVisible: 16,
|
numVisible: 16,
|
||||||
numScroll: 16
|
numScroll: 15
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
breakpoint: '3600px',
|
breakpoint: '3600px',
|
||||||
numVisible: 15,
|
numVisible: 15,
|
||||||
numScroll: 15
|
numScroll: 14
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
breakpoint: '3400px',
|
breakpoint: '3400px',
|
||||||
numVisible: 14,
|
numVisible: 14,
|
||||||
numScroll: 14
|
numScroll: 13
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
breakpoint: '3200px',
|
breakpoint: '3200px',
|
||||||
numVisible: 13,
|
numVisible: 13,
|
||||||
numScroll: 13
|
numScroll: 12
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
breakpoint: '3000px',
|
breakpoint: '3000px',
|
||||||
numVisible: 12,
|
numVisible: 12,
|
||||||
numScroll: 12
|
numScroll: 11
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
breakpoint: '2800px',
|
breakpoint: '2800px',
|
||||||
numVisible: 11,
|
numVisible: 11,
|
||||||
numScroll: 11
|
numScroll: 10
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
breakpoint: '2600px',
|
breakpoint: '2600px',
|
||||||
numVisible: 10,
|
numVisible: 10,
|
||||||
numScroll: 10
|
numScroll: 9
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
breakpoint: '2400px',
|
breakpoint: '2400px',
|
||||||
numVisible: 9,
|
numVisible: 9,
|
||||||
numScroll: 9
|
numScroll: 8
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
breakpoint: '2200px',
|
breakpoint: '2200px',
|
||||||
numVisible: 8,
|
numVisible: 8,
|
||||||
numScroll: 8
|
numScroll: 7
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
breakpoint: '2000px',
|
breakpoint: '2000px',
|
||||||
numVisible: 7,
|
numVisible: 7,
|
||||||
numScroll: 7
|
numScroll: 6
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
breakpoint: '1800px',
|
breakpoint: '1800px',
|
||||||
numVisible: 6,
|
numVisible: 6,
|
||||||
numScroll: 6
|
numScroll: 5
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
breakpoint: '1650px',
|
breakpoint: '1650px',
|
||||||
numVisible: 5,
|
numVisible: 5,
|
||||||
numScroll: 5
|
numScroll: 4
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
breakpoint: '1500px',
|
breakpoint: '1500px',
|
||||||
numVisible: 4,
|
numVisible: 4,
|
||||||
numScroll: 4
|
|
||||||
},
|
|
||||||
{
|
|
||||||
breakpoint: '1250px',
|
|
||||||
numVisible: 3,
|
|
||||||
numScroll: 3
|
numScroll: 3
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
breakpoint: '768px',
|
breakpoint: '768px',
|
||||||
|
numVisible: 3,
|
||||||
|
numScroll: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
breakpoint: '660px',
|
||||||
numVisible: 2,
|
numVisible: 2,
|
||||||
numScroll: 2
|
numScroll: 2
|
||||||
},
|
},
|
||||||
|
|
|
@ -9,9 +9,4 @@ h2{
|
||||||
margin-top:40px;
|
margin-top:40px;
|
||||||
margin-left:40px;
|
margin-left:40px;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
|
||||||
|
|
||||||
::ng-deep .p-carousel-item{
|
|
||||||
min-height:290px;
|
|
||||||
max-height:290px;
|
|
||||||
}
|
}
|
|
@ -49,7 +49,7 @@
|
||||||
{{'Search.ViewOnEmby' | translate}}
|
{{'Search.ViewOnEmby' | translate}}
|
||||||
<i class="far fa-play-circle fa-2x"></i>
|
<i class="far fa-play-circle fa-2x"></i>
|
||||||
</a>
|
</a>
|
||||||
<a id="viewOnJellyfinButton" *ngIf="movie.jellyfinUrl" href="{{movie.jellyfinUrl}}" mat-raised-button target="_blank" class="btn-spacing viewon-btn jellyfinUrl">
|
<a id="viewOnJellyfinButton" *ngIf="movie.jellyfinUrl" href="{{movie.jellyfinUrl}}" mat-raised-button target="_blank" class="btn-spacing viewon-btn jellyfin">
|
||||||
{{'Search.ViewOnJellyfin' | translate}}
|
{{'Search.ViewOnJellyfin' | translate}}
|
||||||
<i class="far fa-play-circle fa-2x"></i>
|
<i class="far fa-play-circle fa-2x"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -124,8 +124,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.profile-img{
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-self: center;
|
||||||
|
}
|
||||||
|
|
||||||
.profile-img img {
|
.profile-img img {
|
||||||
width: 50px;
|
width: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -154,9 +160,10 @@
|
||||||
font-size:36px;
|
font-size:36px;
|
||||||
padding:40px 20px;
|
padding:40px 20px;
|
||||||
height:auto;
|
height:auto;
|
||||||
max-width: 350px;
|
max-width: 300px;
|
||||||
display: flex;
|
display: flex;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.outer-profile {
|
.outer-profile {
|
||||||
|
@ -171,7 +178,6 @@
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
padding:10px 20px;
|
padding:10px 20px;
|
||||||
height:auto;
|
height:auto;
|
||||||
width:20rem;
|
|
||||||
margin-bottom:0.5rem;
|
margin-bottom:0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,7 +187,6 @@
|
||||||
border-radius:0px 30px 30px 0px;
|
border-radius:0px 30px 30px 0px;
|
||||||
padding:10px 20px;
|
padding:10px 20px;
|
||||||
height:auto;
|
height:auto;
|
||||||
width:20rem;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -220,4 +225,9 @@
|
||||||
|
|
||||||
::ng-deep .mat-toolbar-row, .mat-toolbar-single-row{
|
::ng-deep .mat-toolbar-row, .mat-toolbar-single-row{
|
||||||
height:auto;
|
height:auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
::ng-deep .mat-sidenav-fixed .mat-list-base .mat-list-item .mat-list-item-content, .mat-list-base .mat-list-option .mat-list-item-content{
|
||||||
|
padding:0;
|
||||||
|
margin: 0 4em 0 0.5em;
|
||||||
}
|
}
|
|
@ -141,4 +141,5 @@ table {
|
||||||
|
|
||||||
.icon-spacing {
|
.icon-spacing {
|
||||||
margin-right: 1%;
|
margin-right: 1%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
"Discover": "Discover",
|
"Discover": "Discover",
|
||||||
"Search": "Search",
|
"Search": "Search",
|
||||||
"Requests": "Requests",
|
"Requests": "Requests",
|
||||||
"UserManagement": "User Management",
|
"UserManagement": "Users",
|
||||||
"Issues": "Issues",
|
"Issues": "Issues",
|
||||||
"Vote": "Vote",
|
"Vote": "Vote",
|
||||||
"Donate": "Donate!",
|
"Donate": "Donate!",
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
"ChangeTheme": "Change Theme",
|
"ChangeTheme": "Change Theme",
|
||||||
"Calendar": "Calendar",
|
"Calendar": "Calendar",
|
||||||
"UserPreferences": "Preferences",
|
"UserPreferences": "Preferences",
|
||||||
"FeatureSuggestion":"Feature Suggestion",
|
"FeatureSuggestion":"Features",
|
||||||
"FeatureSuggestionTooltip":"Have a great new idea? Suggest it here!",
|
"FeatureSuggestionTooltip":"Have a great new idea? Suggest it here!",
|
||||||
"Filter": {
|
"Filter": {
|
||||||
"Movies":"Movies",
|
"Movies":"Movies",
|
||||||
|
|
|
@ -102,7 +102,7 @@ describe("Movie Details Buttons", () => {
|
||||||
Page.availableButton.should("exist");
|
Page.availableButton.should("exist");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Movie Requested, Deny Movie", () => {
|
it.skip("Movie Requested, Deny Movie", () => {
|
||||||
cy.login();
|
cy.login();
|
||||||
|
|
||||||
Page.visit("671");
|
Page.visit("671");
|
||||||
|
|
|
@ -15,7 +15,7 @@ describe("Search Tests", () => {
|
||||||
|
|
||||||
card.topLevelCard.realHover();
|
card.topLevelCard.realHover();
|
||||||
card.title.should('have.text', "Dexter's Laboratory");
|
card.title.should('have.text', "Dexter's Laboratory");
|
||||||
card.overview.contains('Cartoon Network');
|
card.overview.contains('Dexter');
|
||||||
card.requestType.contains('TV Show');
|
card.requestType.contains('TV Show');
|
||||||
card.requestButton.should('exist');
|
card.requestButton.should('exist');
|
||||||
});
|
});
|
||||||
|
|
|
@ -16,7 +16,7 @@ describe('User Management Page', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Loads users table', () => {
|
it('Loads users table', () => {
|
||||||
cy.contains("User Management");
|
cy.contains("Users");
|
||||||
cy.contains("Add User To Ombi");
|
cy.contains("Add User To Ombi");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue