Skip to content

Commit bd33b53

Browse files
authored
Merge pull request #4619 from Roardom/remove-seasons-episodes
2 parents 3c5ab90 + 69363b7 commit bd33b53

16 files changed

+31
-739
lines changed

app/Http/Controllers/RequestController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ public function show(Request $request, TorrentRequest $torrentRequest): \Illumin
7171
'genres',
7272
'credits' => ['person', 'occupation'],
7373
'networks',
74-
'seasons'
7574
])
7675
->find($torrentRequest->tmdb_tv_id),
7776
($torrentRequest->category->movie_meta && $torrentRequest->tmdb_movie_id) => TmdbMovie::with([

app/Http/Livewire/TmdbTvSearch.php

Lines changed: 0 additions & 58 deletions
This file was deleted.

app/Jobs/ProcessTvJob.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,10 @@
1818

1919
use App\Models\TmdbCompany;
2020
use App\Models\TmdbCredit;
21-
use App\Models\TmdbEpisode;
2221
use App\Models\TmdbGenre;
2322
use App\Models\TmdbNetwork;
2423
use App\Models\TmdbPerson;
2524
use App\Models\TmdbRecommendation;
26-
use App\Models\TmdbSeason;
2725
use App\Models\Torrent;
2826
use App\Models\TmdbTv;
2927
use App\Services\Tmdb\Client;
@@ -110,21 +108,6 @@ public function handle(): void
110108
TmdbCredit::where('tmdb_tv_id', '=', $this->id)->delete();
111109
TmdbCredit::upsert($credits, ['tmdb_person_id', 'tmdb_movie_id', 'tmdb_tv_id', 'occupation_id', 'character']);
112110

113-
// Seasons and episodes
114-
115-
$seasons = [];
116-
$episodes = [];
117-
118-
foreach ($tvScraper->getSeasons() as $season) {
119-
$seasonScraper = new Client\Season($this->id, $season['season_number']);
120-
121-
$seasons[] = $seasonScraper->getSeason();
122-
array_push($episodes, ...$seasonScraper->getEpisodes());
123-
}
124-
125-
TmdbSeason::upsert($seasons, 'id');
126-
TmdbEpisode::upsert($episodes, 'id');
127-
128111
// Recommendations
129112

130113
TmdbRecommendation::upsert($tvScraper->getRecommendations(), ['recommended_tmdb_tv_id', 'tmdb_tv_id']);

app/Models/GuestStar.php

Lines changed: 0 additions & 59 deletions
This file was deleted.

app/Models/TmdbEpisode.php

Lines changed: 0 additions & 61 deletions
This file was deleted.

app/Models/TmdbSeason.php

Lines changed: 0 additions & 70 deletions
This file was deleted.

app/Models/TmdbTv.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,6 @@ public function torrents(): \Illuminate\Database\Eloquent\Relations\HasMany
8888
return $this->hasMany(Torrent::class)->whereRelation('category', 'tv_meta', '=', true);
8989
}
9090

91-
/**
92-
* @return \Illuminate\Database\Eloquent\Relations\HasMany<TmdbSeason, $this>
93-
*/
94-
public function seasons(): \Illuminate\Database\Eloquent\Relations\HasMany
95-
{
96-
return $this->hasMany(TmdbSeason::class)
97-
->oldest('season_number');
98-
}
99-
10091
/**
10192
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany<TmdbPerson, $this>
10293
*/

0 commit comments

Comments
 (0)