Skip to content

Commit

Permalink
fix(tmdb): Check if we have poster / backdrop otherwise use items own
Browse files Browse the repository at this point in the history
  • Loading branch information
TriPSs committed Oct 15, 2020
1 parent 1f3e909 commit f66b6f9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
8 changes: 6 additions & 2 deletions libs/services/tmdb/src/tmdb.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ import { TmdbService } from './tmdb.service'

@Global()
@Module({
providers: [TmdbService],
exports: [TmdbService]
providers: [
TmdbService
],
exports: [
TmdbService
]
})
export class TmdbModule {
}
9 changes: 7 additions & 2 deletions libs/services/tmdb/src/tmdb.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,13 @@ export class TmdbService {
}

return {
poster: this.formatImage(poster),
backdrop: this.formatImage(backdrop)
poster: poster
? this.formatImage(poster)
: item.images.poster,

backdrop: backdrop
? this.formatImage(backdrop)
: item.images.backdrop
}
}

Expand Down

0 comments on commit f66b6f9

Please sign in to comment.