mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 12:59:39 -07:00
Small fixes
This commit is contained in:
parent
47d14e81d0
commit
59106dca0f
8 changed files with 27 additions and 18 deletions
|
@ -73,6 +73,7 @@ namespace Ombi.Core.Models.Search.V2
|
||||||
|
|
||||||
public class CastViewModel
|
public class CastViewModel
|
||||||
{
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
public string Person { get; set; }
|
public string Person { get; set; }
|
||||||
public string Character { get; set; }
|
public string Character { get; set; }
|
||||||
public string Image { get; set; }
|
public string Image { get; set; }
|
||||||
|
|
|
@ -97,16 +97,17 @@ namespace Ombi.Mapping.Profiles
|
||||||
// .ForMember(dest => dest.Medium, opts => opts.MapFrom(src => src.medium.ToHttpsUrl()))
|
// .ForMember(dest => dest.Medium, opts => opts.MapFrom(src => src.medium.ToHttpsUrl()))
|
||||||
// .ForMember(dest => dest.Original, opts => opts.MapFrom(src => src.original.ToHttpsUrl()));
|
// .ForMember(dest => dest.Original, opts => opts.MapFrom(src => src.original.ToHttpsUrl()));
|
||||||
|
|
||||||
CreateMap<Api.TvMaze.Models.V2.Cast, CastViewModel>()
|
//CreateMap<Api.TvMaze.Models.V2.Cast, CastViewModel>()
|
||||||
.ForMember(dest => dest.Character, opts => opts.MapFrom(src => src.character))
|
// .ForMember(dest => dest.Character, opts => opts.MapFrom(src => src.character))
|
||||||
.ForMember(dest => dest.Person, opts => opts.MapFrom(src => src.person))
|
// .ForMember(dest => dest.Person, opts => opts.MapFrom(src => src.person))
|
||||||
.ForMember(dest => dest.Voice, opts => opts.MapFrom(src => src.voice))
|
// .ForMember(dest => dest.Voice, opts => opts.MapFrom(src => src.voice))
|
||||||
.ForMember(dest => dest.Self, opts => opts.MapFrom(src => src.self));
|
// .ForMember(dest => dest.Self, opts => opts.MapFrom(src => src.self));
|
||||||
|
|
||||||
CreateMap<FullMovieCast, CastViewModel>()
|
CreateMap<FullMovieCast, CastViewModel>()
|
||||||
.ForMember(dest => dest.Character, opts => opts.MapFrom(src => src.character))
|
.ForMember(dest => dest.Character, opts => opts.MapFrom(src => src.character))
|
||||||
.ForMember(dest => dest.Person, opts => opts.MapFrom(src => src.name))
|
.ForMember(dest => dest.Person, opts => opts.MapFrom(src => src.name))
|
||||||
.ForMember(dest => dest.Image, opts => opts.MapFrom(src => src.profile_path));
|
.ForMember(dest => dest.Image, opts => opts.MapFrom(src => src.profile_path))
|
||||||
|
.ForMember(dest => dest.Id, opts => opts.MapFrom(src => src.id));
|
||||||
|
|
||||||
CreateMap<Api.TvMaze.Models.V2.Person, PersonViewModel>()
|
CreateMap<Api.TvMaze.Models.V2.Person, PersonViewModel>()
|
||||||
.ForMember(dest => dest.Id, opts => opts.MapFrom(src => src.id))
|
.ForMember(dest => dest.Id, opts => opts.MapFrom(src => src.id))
|
||||||
|
|
|
@ -15,7 +15,7 @@ export class DiscoverActorComponent implements AfterViewInit {
|
||||||
public loadingFlag: boolean;
|
public loadingFlag: boolean;
|
||||||
|
|
||||||
public discoverResults: IDiscoverCardResult[] = [];
|
public discoverResults: IDiscoverCardResult[] = [];
|
||||||
|
|
||||||
constructor(private searchService: SearchV2Service,
|
constructor(private searchService: SearchV2Service,
|
||||||
private route: ActivatedRoute) {
|
private route: ActivatedRoute) {
|
||||||
this.route.params.subscribe((params: any) => {
|
this.route.params.subscribe((params: any) => {
|
||||||
|
|
|
@ -2,16 +2,16 @@
|
||||||
<div class="rating medium-font">
|
<div class="rating medium-font">
|
||||||
<span *ngIf="movie.voteAverage"
|
<span *ngIf="movie.voteAverage"
|
||||||
matTooltip="{{'MediaDetails.Votes' | translate }} {{movie.voteCount | thousandShort: 1}}">
|
matTooltip="{{'MediaDetails.Votes' | translate }} {{movie.voteCount | thousandShort: 1}}">
|
||||||
<img class="rating-small" src="{{baseUrl}}/images/tmdb-logo.svg"> {{movie.voteAverage | number:'1.0-1'}}/10
|
<img class="rating-small" src="{{baseUrl}}images/tmdb-logo.svg"> {{movie.voteAverage | number:'1.0-1'}}/10
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="ratings?.critics_rating && ratings?.critics_score">
|
<span *ngIf="ratings?.critics_rating && ratings?.critics_score">
|
||||||
<img class="rating-small"
|
<img class="rating-small"
|
||||||
src="{{baseUrl}}/images/{{ratings.critics_rating === 'Rotten' ? 'rotten-rotten.svg' : 'rotten-fresh.svg'}}">
|
src="{{baseUrl}}images/{{ratings.critics_rating === 'Rotten' ? 'rotten-rotten.svg' : 'rotten-fresh.svg'}}">
|
||||||
{{ratings.critics_score}}%
|
{{ratings.critics_score}}%
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="ratings?.audience_rating && ratings?.audience_score">
|
<span *ngIf="ratings?.audience_rating && ratings?.audience_score">
|
||||||
<img class="rating-small"
|
<img class="rating-small"
|
||||||
src="{{baseUrl}}/images/{{ratings.audience_rating === 'Upright' ? 'rotten-audience-fresh.svg' : 'rotten-audience-rotten.svg'}}">
|
src="{{baseUrl}}images/{{ratings.audience_rating === 'Upright' ? 'rotten-audience-fresh.svg' : 'rotten-audience-rotten.svg'}}">
|
||||||
{{ratings.audience_score}}%
|
{{ratings.audience_score}}%
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
<ng-template let-item pTemplate="item">
|
<ng-template let-item pTemplate="item">
|
||||||
<div class="row justify-content-md-center mat-card mat-card-flat carousel-item">
|
<div class="row justify-content-md-center mat-card mat-card-flat carousel-item">
|
||||||
<div class="bottom-space">
|
<div class="bottom-space">
|
||||||
<a *ngIf="item.profile_path" [routerLink]="'/discover/actor/' + item.id">
|
<a *ngIf="item.image" [routerLink]="'/discover/actor/' + item.id">
|
||||||
<img class="cast-profile-img" src="https://image.tmdb.org/t/p/w300/{{item.profile_path}}">
|
<img class="cast-profile-img" src="https://image.tmdb.org/t/p/w300{{item.image}}">
|
||||||
</a>
|
</a>
|
||||||
<a *ngIf="item.image" [routerLink]="'/discover/actor/' + item.person.id">
|
<a *ngIf="item.profile_path" [routerLink]="'/discover/actor/' + item.id">
|
||||||
<img class="cast-profile-img" src="https://image.tmdb.org/t/p/w300/{{item.image}}">
|
<img class="cast-profile-img" src="https://image.tmdb.org/t/p/w300{{item.profile_path}}">
|
||||||
</a>
|
</a>
|
||||||
<!-- TODO get profile image default -->
|
<!-- TODO get profile image default -->
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
<span>{{ 'Requests.Season' | translate }} {{season.seasonNumber}}</span>
|
<span>{{ 'Requests.Season' | translate }} {{season.seasonNumber}}</span>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
<mat-card class="mat-elevation-z8">
|
<mat-card *ngIf="season.overview" class="mat-elevation-z8">
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<p>{{season.overview}}</p>
|
<p>{{season.overview}}</p>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|
|
@ -65,6 +65,7 @@ export class TvRequestGridComponent {
|
||||||
this.notificationService.send(
|
this.notificationService.send(
|
||||||
`Request for ${this.tv.title} has been added successfully`);
|
`Request for ${this.tv.title} has been added successfully`);
|
||||||
|
|
||||||
|
debugger;
|
||||||
this.selection.clear();
|
this.selection.clear();
|
||||||
|
|
||||||
if (this.tv.firstSeason) {
|
if (this.tv.firstSeason) {
|
||||||
|
@ -81,7 +82,7 @@ export class TvRequestGridComponent {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (this.requestLatestSeason) {
|
if (this.tv.latestSeason) {
|
||||||
this.tv.seasonRequests[this.tv.seasonRequests.length - 1].episodes.forEach(ep => {
|
this.tv.seasonRequests[this.tv.seasonRequests.length - 1].episodes.forEach(ep => {
|
||||||
ep.requested = true;
|
ep.requested = true;
|
||||||
ep.requestStatus = "Common.PendingApproval";
|
ep.requestStatus = "Common.PendingApproval";
|
||||||
|
|
|
@ -129,7 +129,7 @@ describe("TV Requests Grid", function () {
|
||||||
cy.verifyNotification('You need to select some episodes!');
|
cy.verifyNotification('You need to select some episodes!');
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Request single episodes", () => {
|
it.only("Request single episodes", () => {
|
||||||
Page.visit('1399');
|
Page.visit('1399');
|
||||||
|
|
||||||
Page.requestPanel.seasonTab(2).click();
|
Page.requestPanel.seasonTab(2).click();
|
||||||
|
@ -142,6 +142,12 @@ describe("TV Requests Grid", function () {
|
||||||
Page.requestPanel.getEpisodeStatus(2,1)
|
Page.requestPanel.getEpisodeStatus(2,1)
|
||||||
.should('contain.text', 'Pending Approval')
|
.should('contain.text', 'Pending Approval')
|
||||||
.should('have.class', 'requested')
|
.should('have.class', 'requested')
|
||||||
|
|
||||||
|
Page.requestPanel.getEpisodeStatus(2).each((element) => {
|
||||||
|
if (element.attr('data-test') !== 'episodeStatus21') {
|
||||||
|
expect(element.hasClass("requested")).to.be.false;
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue