Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Commit

Permalink
Fix updateSeason not actually fetching from TMDb
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbanes committed Oct 9, 2023
1 parent f07cf1e commit 1875905
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,7 @@ class SeasonsEpisodesRepository(
traktSeasonsDataSource.getSeason(local.showId, local.number!!)
}
val tmdbDeferred = async {
runCatching {
traktSeasonsDataSource.getSeason(local.showId, local.number!!)
}.getOrNull()
tmdbSeasonsDataSource.getSeason(local.showId, local.number!!)
}

val trakt = try {
Expand All @@ -218,9 +216,7 @@ class SeasonsEpisodesRepository(
}
check(trakt != null || tmdb != null)

seasonsDao.upsert(
mergeSeason(local, trakt ?: Season.EMPTY, tmdb ?: Season.EMPTY),
)
seasonsDao.upsert(mergeSeason(local, trakt ?: Season.EMPTY, tmdb ?: Season.EMPTY))

seasonLastRequestStore.updateLastRequest(seasonId)
}
Expand Down

0 comments on commit 1875905

Please sign in to comment.