Compare commits

..

10 Commits

Author SHA1 Message Date
Jobobby04 fb1649125c Actually fix animated images 2024-03-18 09:43:14 -04:00
Jobobby04 0767526f18 Revert "Re-Add Animated Image Decoders to Coil"
This reverts commit 5d1b1408eb.
2024-03-18 09:42:22 -04:00
Jobobby04 5d1b1408eb Re-Add Animated Image Decoders to Coil 2024-03-17 23:17:27 -04:00
Jobobby04 2f54f00bf7 Revert "Minor fix for history url"
This reverts commit 28edaca869.
2024-03-17 20:08:03 -04:00
ɴᴇᴋᴏ 87feb58055 Add files via upload (#1120) 2024-03-17 19:57:33 -04:00
Jobobby04 28edaca869 Minor fix for history url 2024-03-17 19:56:06 -04:00
Jobobby04 d14f012bbb Update firebase 2024-03-17 19:53:23 -04:00
Jobobby04 adc6bbf54f Minor doc fix 2024-03-17 19:53:12 -04:00
Jobobby04 2b064baca1 Update baseline 2024-03-17 19:52:59 -04:00
Jobobby04 983a80ba42 History url is not globally unique 2024-03-17 19:52:38 -04:00
8 changed files with 30 additions and 22 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ When creating a fork, remember to:
8. Click publish
9. Go to API & Services -> Credentials
10. Click Create credentials -> Oauth client ID
11. Select Android, give it a name, and set eu.kanade.google.oauth as the package name
11. Select Android, give it a name, and set `eu.kanade.google.oauth` as the package name
12. To get the SHA-1 key, run `keytool -printcert -jarfile app-standard-universal-release.apk` on your apk, and copy the listed SHA-1
13. Expand advanced settings, and enable Custom URL scheme
14. After that just download the json, name it to `client_secrets.json` and put it in `app/src/main/assets/`
@@ -313,7 +313,7 @@ class MangaRestorer(
restoreCategories(manga, categories, backupCategories)
restoreChapters(manga, chapters)
restoreTracking(manga, tracks)
restoreHistory(history)
restoreHistory(manga, history)
restoreExcludedScanlators(manga, excludedScanlators)
updateManga.awaitUpdateFetchInterval(manga, now, currentFetchWindow)
// SY -->
@@ -359,13 +359,14 @@ class MangaRestorer(
}
}
private suspend fun restoreHistory(backupHistory: List<BackupHistory>) {
private suspend fun restoreHistory(manga: Manga, backupHistory: List<BackupHistory>) {
val toUpdate = backupHistory.mapNotNull { history ->
val dbHistory = handler.awaitOneOrNull { historyQueries.getHistoryByChapterUrl(history.url) }
val dbHistory = handler.awaitOneOrNull { historyQueries.getHistoryByChapterUrl(manga.id, history.url) }
val item = history.getHistoryImpl()
if (dbHistory == null) {
val chapter = handler.awaitOneOrNull { chaptersQueries.getChapterByUrl(history.url) }
val chapter = handler.awaitList { chaptersQueries.getChapterByUrl(history.url) }
.find { it.manga_id == manga.id }
return@mapNotNull if (chapter == null) {
// Chapter doesn't exist; skip
null
@@ -343,8 +343,9 @@ open class ReaderPageImageView @JvmOverloads constructor(
.diskCachePolicy(CachePolicy.DISABLED)
.target(
onSuccess = { result ->
setImageDrawable(result.asDrawable(context.resources))
(result as? Animatable)?.start()
val drawable = result.asDrawable(context.resources)
setImageDrawable(drawable)
(drawable as? Animatable)?.start()
isVisible = true
this@ReaderPageImageView.onImageLoaded()
},
+4 -8
View File
@@ -1727,9 +1727,6 @@
<ID>SwallowedException:GalleryAdder.kt$GalleryAdder$e: Exception</ID>
<ID>SwallowedException:GetChapterByUrlAndMangaId.kt$GetChapterByUrlAndMangaId$e: Exception</ID>
<ID>SwallowedException:GetPagePreviews.kt$GetPagePreviews$e: Exception</ID>
<ID>SwallowedException:GoogleDriveSyncService.kt$GoogleDriveService$e: IOException</ID>
<ID>SwallowedException:GoogleDriveSyncService.kt$GoogleDriveService$e: TokenResponseException</ID>
<ID>SwallowedException:GoogleDriveSyncService.kt$GoogleDriveSyncService$e: Exception</ID>
<ID>SwallowedException:HttpSource.kt$HttpSource$e: URISyntaxException</ID>
<ID>SwallowedException:ImageUtil.kt$ImageUtil$e: Exception</ID>
<ID>SwallowedException:Kavita.kt$Kavita$e: Exception</ID>
@@ -1767,7 +1764,6 @@
<ID>SwallowedException:SourceFeedScreenModel.kt$SourceFeedScreenModel$e: Exception</ID>
<ID>SwallowedException:StorageStep.kt$StorageStep$e: ActivityNotFoundException</ID>
<ID>SwallowedException:Suwayomi.kt$Suwayomi$e: Exception</ID>
<ID>SwallowedException:SyncManager.kt$SyncManager$e: IOException</ID>
<ID>SwallowedException:TrackInfoDialog.kt$TrackInfoDialogHomeScreen.Model$e: Exception</ID>
<ID>SwallowedException:UrlImportableSource.kt$UrlImportableSource$e: URISyntaxException</ID>
<ID>ThrowingExceptionsWithoutMessageOrCause:MangaScreenModel.kt$MangaScreenModel$IllegalStateException()</ID>
@@ -1966,12 +1962,12 @@
<ID>TooGenericExceptionThrown:EHentai.kt$EHentai$throw Exception(it.text())</ID>
<ID>TooGenericExceptionThrown:ExtensionLoader.kt$ExtensionLoader$throw Exception("Unknown source class type: ${obj.javaClass}")</ID>
<ID>TooGenericExceptionThrown:GoogleDriveSyncService.kt$GoogleDriveService$throw Exception(context.stringResource(MR.strings.google_drive_not_signed_in))</ID>
<ID>TooGenericExceptionThrown:GoogleDriveSyncService.kt$GoogleDriveSyncService$throw Exception(context.stringResource(MR.strings.error_before_sync_gdrive) + ": ${e.message}")</ID>
<ID>TooGenericExceptionThrown:GoogleDriveSyncService.kt$GoogleDriveSyncService$throw Exception(context.stringResource(MR.strings.error_before_sync_gdrive) + ": ${e.message}", e)</ID>
<ID>TooGenericExceptionThrown:GoogleDriveSyncService.kt$GoogleDriveSyncService$throw Exception(context.stringResource(MR.strings.error_before_sync_gdrive) + ": Max retries reached.")</ID>
<ID>TooGenericExceptionThrown:GoogleDriveSyncService.kt$GoogleDriveSyncService$throw Exception(context.stringResource(MR.strings.error_deleting_google_drive_lock_file))</ID>
<ID>TooGenericExceptionThrown:GoogleDriveSyncService.kt$GoogleDriveSyncService$throw Exception(context.stringResource(MR.strings.error_uploading_sync_data) + ": ${e.message}")</ID>
<ID>TooGenericExceptionThrown:GoogleDriveSyncService.kt$GoogleDriveSyncService$throw Exception(context.stringResource(MR.strings.error_deleting_google_drive_lock_file), e)</ID>
<ID>TooGenericExceptionThrown:GoogleDriveSyncService.kt$GoogleDriveSyncService$throw Exception(context.stringResource(MR.strings.error_uploading_sync_data) + ": ${e.message}", e)</ID>
<ID>TooGenericExceptionThrown:GoogleDriveSyncService.kt$GoogleDriveSyncService$throw Exception(context.stringResource(MR.strings.google_drive_not_signed_in))</ID>
<ID>TooGenericExceptionThrown:GoogleDriveSyncService.kt$GoogleDriveSyncService$throw Exception(e.message)</ID>
<ID>TooGenericExceptionThrown:GoogleDriveSyncService.kt$GoogleDriveSyncService$throw Exception(e.message, e)</ID>
<ID>TooGenericExceptionThrown:HttpSource.kt$HttpSource$throw RuntimeException(e)</ID>
<ID>TooGenericExceptionThrown:KitsuApi.kt$KitsuApi$throw Exception("Could not find manga")</ID>
<ID>TooGenericExceptionThrown:KitsuInterceptor.kt$KitsuInterceptor$throw Exception("Not authenticated with Kitsu")</ID>
@@ -91,6 +91,9 @@ object ImageUtil {
// Coil supports animated WebP on Android 9.0+
// https://coil-kt.github.io/coil/getting_started/#supported-image-formats
Format.Webp -> type.isAnimated && Build.VERSION.SDK_INT >= Build.VERSION_CODES.P
// Coil supports animated Heif on Android 11+
// https://coil-kt.github.io/coil/getting_started/#supported-image-formats
Format.Heif -> type.isAnimated && Build.VERSION.SDK_INT >= Build.VERSION_CODES.R
else -> false
}
} catch (e: Exception) {
@@ -31,7 +31,7 @@ H.time_read
FROM history H
JOIN chapters C
ON H.chapter_id = C._id
WHERE C.url = :chapterUrl AND C._id = H.chapter_id;
WHERE C.manga_id = :mangaId AND C.url = :chapterUrl AND C._id = H.chapter_id;
resetHistoryById:
UPDATE history
+3 -3
View File
@@ -1,9 +1,9 @@
[versions]
[libraries]
firebase-analytics = "com.google.firebase:firebase-analytics-ktx:21.2.2"
firebase-crashlytics-ktx = "com.google.firebase:firebase-crashlytics-ktx:18.3.6"
firebase-crashlytics-gradle = "com.google.firebase:firebase-crashlytics-gradle:2.9.5"
firebase-analytics = "com.google.firebase:firebase-analytics-ktx:21.5.1"
firebase-crashlytics-ktx = "com.google.firebase:firebase-crashlytics-ktx:18.6.2"
firebase-crashlytics-gradle = "com.google.firebase:firebase-crashlytics-gradle:2.9.9"
simularity = "info.debatty:java-string-similarity:2.0.0"
xlog = "com.elvishew:xlog:1.11.0"
@@ -172,6 +172,10 @@
<string name="library_group_updates_global">總是載入全域更新</string>
<string name="library_group_updates_all_but_ungrouped">僅為未分組的作品載入全域更新,為其他載入目錄更新</string>
<string name="library_group_updates_all">每次啟動後載入目錄更新</string>
<string name="pref_mark_read_dupe_chapters">將重複章節標記為已讀</string>
<string name="pref_mark_read_dupe_chapters_summary">閱讀後將重複章節標記為已讀</string>
<string name="pref_library_mark_duplicate_chapters">標記新的重複章節為已讀</string>
<string name="pref_library_mark_duplicate_chapters_summary">自動將讀過的新章節標記為已讀</string>
<!-- Browse settings -->
<string name="pref_hide_feed">隱藏訂閱標籤</string>
@@ -311,9 +315,12 @@
<string name="pref_center_margin">中間空白類型</string>
<string name="pref_center_margin_summary">插入空白以適應可摺疊裝置的螢幕死角。</string>
<!-- Cache archived manga to disk -->
<string name="cache_archived_manga_to_disk">快取 CBZ/CBR 檔案中的圖片</string>
<string name="cache_archived_manga_to_disk_subtitle">閱讀時臨時複製壓縮包中的圖片到快取\n可以改善閱讀器的性能</string>
<!-- Archive reader mode -->
<string name="archive_mode_load_from_file">從文件加載</string>
<string name="archive_mode_load_into_memory">加載到記憶體中</string>
<string name="archive_mode_cache_to_disk">複製到磁碟</string>
<string name="pref_archive_reader_mode">檔案讀取模式</string>
<string name="pref_archive_reader_mode_summary">加載壓縮文件(如CBZ或CBR)中圖像的方式</string>
<!-- Entry Page -->
<!-- Entry Info -->