Skip to content

Commit 4181508

Browse files
committed
draft
1 parent 81668e3 commit 4181508

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
// Copyright 2018-2024 Uwe Trottmann
3+
4+
package com.battlelancer.seriesguide.shows.search.newepisodes
5+
6+
import android.content.Context
7+
import com.battlelancer.seriesguide.shows.search.popular.BaseDiscoverShowDataSource
8+
import com.battlelancer.seriesguide.tmdbapi.TmdbTools2
9+
import com.uwetrottmann.tmdb2.Tmdb
10+
import com.uwetrottmann.tmdb2.entities.TvShowResultsPage
11+
12+
/**
13+
* Loads shows with new episodes in pages from TMDB.
14+
*/
15+
class ShowsNewEpisodesDataSource(
16+
context: Context,
17+
tmdb: Tmdb,
18+
languageCode: String,
19+
firstReleaseYear: Int?,
20+
originalLanguageCode: String?,
21+
watchProviderIds: List<Int>?,
22+
watchRegion: String?
23+
) : BaseDiscoverShowDataSource(
24+
context,
25+
tmdb,
26+
languageCode,
27+
firstReleaseYear,
28+
originalLanguageCode,
29+
watchProviderIds,
30+
watchRegion
31+
) {
32+
33+
override val action: String
34+
get() = "get shows w new episodes"
35+
36+
override suspend fun loadShows(
37+
tmdb: Tmdb,
38+
language: String,
39+
page: Int,
40+
firstReleaseYear: Int?,
41+
originalLanguageCode: String?,
42+
watchProviderIds: List<Int>?,
43+
watchRegion: String?
44+
): TvShowResultsPage? = TmdbTools2().getShowsWithNewEpisodes(
45+
tmdb,
46+
language,
47+
page,
48+
firstReleaseYear,
49+
originalLanguageCode,
50+
watchProviderIds,
51+
watchRegion
52+
)
53+
}

0 commit comments

Comments
 (0)