Skip to content

Commit

Permalink
Minor fix to reduce "Invalid download location" errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Saud-97 committed Sep 4, 2022
1 parent 5ef7dc3 commit 48ebdc3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,11 @@ class Downloader(
* @param download the chapter to be downloaded.
*/
private fun downloadChapter(download: Download): Observable<Download> = Observable.defer {
val mangaDir = provider.getMangaDir(download.manga, download.source)
val mangaDir = try {
provider.getMangaDir(download.manga, download.source)
} catch (e: Exception) {
provider.getMangaDir(download.manga, download.source)
}

val availSpace = DiskUtil.getAvailableStorageSpace(mangaDir)
if (availSpace != -1L && availSpace < MIN_DISK_SPACE) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ class MyAnimeListApi(private val client: OkHttpClient, interceptor: MyAnimeListI
}

companion object {
// Registered under jay's MAL account
// Registered under Saud-97's MAL account
private const val clientId = "96b709ebf441e6daf9887156459ae568"

private const val baseOAuthUrl = "https://myanimelist.net/v1/oauth2"
Expand Down

0 comments on commit 48ebdc3

Please sign in to comment.