File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
app/src/main/java/com/battlelancer/seriesguide/traktapi Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import com.uwetrottmann.trakt5.services.Notes
1616import com.uwetrottmann.trakt5.services.Sync
1717import retrofit2.Call
1818import retrofit2.awaitResponse
19+ import timber.log.Timber
1920
2021/* *
2122 * Uses response classes inheriting from a Kotlin sealed interface.
@@ -80,6 +81,7 @@ object TraktTools4 {
8081 action = " get collected shows" ,
8182 reportIsNotVip = true // Should work even if not VIP
8283 ) { page ->
84+ // 1000 is the maximum limit according to https://github.com/trakt/trakt-api/discussions/681
8385 traktSync.collectionShows(page, 1000 , null )
8486 }
8587 }
@@ -119,6 +121,9 @@ object TraktTools4 {
119121 is TraktNonNullResponse .Success -> {
120122 allItems.addAll(response.data)
121123 totalPageCount = response.pageCount
124+ if (totalPageCount == null ) {
125+ Timber .w(" Page count header not found for '$action '" )
126+ }
122127 currentPage++
123128 }
124129
You can’t perform that action at this time.
0 commit comments