mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Merge pull request #1018 from Fossil01/patch-4
Search OMDB with the movie year if we have one
This commit is contained in:
@@ -1234,7 +1234,11 @@ class Movie
|
||||
if ($movieUpdated === false) {
|
||||
$omdbTitle = strtolower(str_replace(' ', '_', $this->currentTitle));
|
||||
if ($this->omdbapikey !== null) {
|
||||
$buffer = $this->omdbApi->search($omdbTitle, 'movie');
|
||||
if ($this->currentYear != null) {
|
||||
$buffer = $this->omdbApi->search($omdbTitle, 'movie', $this->currentYear);
|
||||
} else {
|
||||
$buffer = $this->omdbApi->search($omdbTitle, 'movie');
|
||||
}
|
||||
|
||||
if (\is_object($buffer) && $buffer->message === 'OK' && $buffer->data->Response === 'True') {
|
||||
$getIMDBid = $buffer->data->Search[0]->imdbID;
|
||||
|
||||
Reference in New Issue
Block a user