Fixed poster again NginxProvider (#962)

* Added Nginx Provider and Nginx settings

* fixed some stuff

* updated NginxProvider to use latest newEpisode method

* hide nginx provider when no url specified

* fixed some stuff

* removed useless credentials variable

* added url to my website

* fixed tabulation

* Update settings.xml

* nvm

* fixed poster not loading when logged in

* Fix Nginx poster

Now using addPoster function in Nginx

* fixed poster NginxProvider

fixed them in main page (I forgor)

Co-authored-by: sarlay <dev@sarlays.com>
This commit is contained in:
Sarlay 2022-04-17 18:24:54 +00:00 committed by GitHub
parent e2841847f1
commit ed6c16c780
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -218,31 +218,26 @@ class NginxProvider : MainAPI() {
if (isMovieType) {
val movieName = nfoContent.select("title").text()
val posterUrl = mediaRootUrl + "poster.jpg"
return@mapNotNull MovieSearchResponse(
return@mapNotNull newMovieSearchResponse(
movieName,
mediaRootUrl,
this.name,
TvType.Movie,
posterUrl,
null,
)
) {
addPoster(posterUrl, authHeader)
}
} else { // tv serie
val serieName = nfoContent.select("title").text()
val posterUrl = mediaRootUrl + "poster.jpg"
TvSeriesSearchResponse(
newTvSeriesSearchResponse(
serieName,
nfoPath,
this.name,
TvType.TvSeries,
posterUrl,
null,
null,
)
) {
addPoster(posterUrl, authHeader)
}
}