Skip to content

Commit

Permalink
Fix TV processing
Browse files Browse the repository at this point in the history
  • Loading branch information
DariusIII committed Nov 15, 2023
1 parent b450e03 commit 3afb163
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Blacklight/processing/tv/TMDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ public function getPoster(int $videoId): int
*
* @return array|false
*/
protected function getEpisodeInfo(int $tmdbid, int $season, int $episode, string $airdate = '', int $videoId = 0): bool|array
protected function getEpisodeInfo(int|string $tmdbid, int|string $season, int|string $episode, string $airdate = '', int $videoId = 0): bool|array
{
$return = false;

Expand Down
4 changes: 2 additions & 2 deletions Blacklight/processing/tv/TV.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ abstract protected function getBanner(int $videoID, int $siteId): mixed;
*
* @return array|false False on failure, an array of information fields otherwise.
*/
abstract protected function getEpisodeInfo(int $siteId, int $series, int $episode): array|bool;
abstract protected function getEpisodeInfo(int|string $siteId, int|string $series, int|string $episode): array|bool;

/**
* Retrieve poster image for TV episode from site using its API.
Expand Down Expand Up @@ -339,7 +339,7 @@ public function getSiteByID(string $column, int $id): \Illuminate\Database\Eloqu
*
* @return int|false
*/
public function getBySeasonEp(int $id, int $series, int $episode, string $airdate = ''): bool|int
public function getBySeasonEp(int|string $id, int|string $series, int|string $episode, string $airdate = ''): bool|int
{
if ($series > 0 && $episode > 0) {
$queryString = sprintf('tve.series = %d AND tve.episode = %d', $series, $episode);
Expand Down
4 changes: 2 additions & 2 deletions Blacklight/processing/tv/TVDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public function processSite($groupID, $guidChar, $process, bool $local = false):
}

// Check if we have the episode for this video ID
$episode = $this->getBySeasonEp($videoId, (int) $seasonNo, (int) $episodeNo, $release['airdate']);
$episode = $this->getBySeasonEp($videoId, $seasonNo, $episodeNo, $release['airdate']);

if ($episode === false && $lookupSetting) {
// Send the request for the episode to TVDB
Expand Down Expand Up @@ -301,7 +301,7 @@ public function getPoster(int $videoId): int
* @throws \CanIHaveSomeCoffee\TheTVDbAPI\Exception\UnauthorizedException
* @throws \Symfony\Component\Serializer\Exception\ExceptionInterface
*/
protected function getEpisodeInfo(int $tvDbId, int $season, int $episode, int $videoId = 0): bool|array
protected function getEpisodeInfo(int|string $tvDbId, int|string $season, int|string $episode, int $videoId = 0): bool|array
{
$return = $response = false;

Expand Down
4 changes: 2 additions & 2 deletions Blacklight/processing/tv/TVMaze.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function processSite($groupID, $guidChar, $process, bool $local = false):
}

// Check if we have the episode for this video ID
$episode = $this->getBySeasonEp($videoId, (int) $seasonNo, (int) $episodeNo, $release['airdate']);
$episode = $this->getBySeasonEp($videoId, $seasonNo, $episodeNo, $release['airdate']);

if ($episode === false) {
// Send the request for the episode to TVMaze
Expand Down Expand Up @@ -307,7 +307,7 @@ public function getPoster(int $videoId): int
return $hasCover;
}

protected function getEpisodeInfo(int $tvMazeId, int $season, int $episode, string $airDate = '', int $videoId = 0): array|bool
protected function getEpisodeInfo(int|string $tvMazeId, int|string $season, int|string $episode, string $airDate = '', int $videoId = 0): array|bool
{
$return = $response = false;

Expand Down
2 changes: 1 addition & 1 deletion Blacklight/processing/tv/TraktTv.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public function getBanner($videoId, $siteId): bool
/**
* @throws GuzzleException
*/
public function getEpisodeInfo(int $siteId, int $series, int $episode): array|bool
public function getEpisodeInfo(int|string $siteId, int|string $series, int|string $episode): array|bool
{
$return = false;

Expand Down

0 comments on commit 3afb163

Please sign in to comment.