mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 02:01:33 +00:00
Fix issues with strict types
This commit is contained in:
@@ -75,7 +75,7 @@ class TmdbPipe extends AbstractTvProviderPipe
|
||||
}
|
||||
|
||||
if ($videoId !== 0) {
|
||||
$siteId = $tmdb->getSiteByID('tmdb', $videoId);
|
||||
$siteId = $tmdb->getSiteByID('tmdb', (int) $videoId);
|
||||
// If show exists in local DB with a TMDB ID, use it directly
|
||||
if ($siteId !== false && $siteId !== 0) { // @phpstan-ignore notIdentical.alwaysTrue
|
||||
$this->outputFoundInDb($cleanName);
|
||||
|
||||
@@ -75,7 +75,7 @@ class TraktPipe extends AbstractTvProviderPipe
|
||||
}
|
||||
|
||||
if ($videoId !== 0) {
|
||||
$siteId = $trakt->getSiteIDFromVideoID('trakt', $videoId);
|
||||
$siteId = $trakt->getSiteIDFromVideoID('trakt', (int) $videoId);
|
||||
// If show exists in local DB but doesn't have a Trakt ID, use the existing video
|
||||
// and process episode matching without trying to search Trakt API
|
||||
if ($siteId === false || $siteId === 0) {
|
||||
|
||||
@@ -75,7 +75,7 @@ class TvMazePipe extends AbstractTvProviderPipe
|
||||
}
|
||||
|
||||
if ($videoId !== 0) {
|
||||
$siteId = $tvmaze->getSiteByID('tvmaze', $videoId);
|
||||
$siteId = $tvmaze->getSiteByID('tvmaze', (int) $videoId);
|
||||
// If show exists in local DB but doesn't have a TVMaze ID, use the existing video
|
||||
// and process episode matching without trying to search TVMaze API
|
||||
if ($siteId === false || $siteId === 0) { // @phpstan-ignore identical.alwaysFalse
|
||||
|
||||
@@ -77,7 +77,7 @@ class TvdbPipe extends AbstractTvProviderPipe
|
||||
}
|
||||
|
||||
if ($videoId !== 0) {
|
||||
$siteId = $tvdb->getSiteByID('tvdb', $videoId);
|
||||
$siteId = $tvdb->getSiteByID('tvdb', (int) $videoId);
|
||||
// If show exists in local DB but doesn't have a TVDB ID, use the existing video
|
||||
// and process episode matching without trying to search TVDB API
|
||||
if ($siteId === false || $siteId === 0) { // @phpstan-ignore identical.alwaysFalse
|
||||
|
||||
@@ -103,7 +103,7 @@ class TmdbProvider extends AbstractTvProvider
|
||||
$videoId = $dupeCheck;
|
||||
// Update any missing fields and add site IDs
|
||||
$this->update($videoId, $tmdbShow);
|
||||
$siteId = $this->getSiteIDFromVideoID('tmdb', $videoId);
|
||||
$siteId = $this->getSiteIDFromVideoID('tmdb', (int) $videoId);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -113,7 +113,7 @@ class TmdbProvider extends AbstractTvProvider
|
||||
cli()->primaryOver(' → ');
|
||||
cli()->info('Found in DB');
|
||||
}
|
||||
$siteId = $this->getSiteIDFromVideoID('tmdb', $videoId);
|
||||
$siteId = $this->getSiteIDFromVideoID('tmdb', (int) $videoId);
|
||||
}
|
||||
|
||||
if (is_numeric($videoId) && $videoId > 0 && is_numeric($siteId) && $siteId > 0) {
|
||||
|
||||
@@ -119,7 +119,7 @@ class TraktProvider extends AbstractTvProvider
|
||||
cli()->primaryOver(' → ');
|
||||
cli()->info('Found in DB');
|
||||
}
|
||||
$traktid = $this->getSiteIDFromVideoID('trakt', $videoId);
|
||||
$traktid = $this->getSiteIDFromVideoID('trakt', (int) $videoId);
|
||||
$this->localizedTZ = $this->getLocalZoneFromVideoID($videoId);
|
||||
}
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ class TvMazeProvider extends AbstractTvProvider
|
||||
cli()->primaryOver(' → ');
|
||||
cli()->info('Found in DB');
|
||||
}
|
||||
$siteId = $this->getSiteIDFromVideoID('tvmaze', $videoId);
|
||||
$siteId = $this->getSiteIDFromVideoID('tvmaze', (int) $videoId);
|
||||
}
|
||||
|
||||
if (is_numeric($videoId) && $videoId > 0 && is_numeric($siteId) && $siteId > 0) {
|
||||
|
||||
@@ -98,7 +98,7 @@ class TvdbProvider extends AbstractTvProvider
|
||||
$videoId = $this->getByTitle($release['cleanname'], parent::TYPE_TV);
|
||||
|
||||
if ($videoId !== 0) {
|
||||
$siteId = $this->getSiteByID('tvdb', $videoId);
|
||||
$siteId = $this->getSiteByID('tvdb', (int) $videoId);
|
||||
}
|
||||
|
||||
$lookupSetting = true;
|
||||
|
||||
Reference in New Issue
Block a user