Add Komga as an unattended track service (#5049)

* fix: prevent crash if TrackService.getScoreList() is empty

* disabled track score button if service doesn't support scoring

* first implementation of the Komga tracking
this doesn't work for read lists

* auto track when adding to library

* handle refresh

* 2-way sync of chapters for unattended tracking services

* Update app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSheet.kt

Co-authored-by: Andreas <andreas.everos@gmail.com>

* group strings together

* support for read lists

* sync read chapters on bind

* only mark local chapters as read during 2-way sync (incoming)

* local progress from read chapters will be sent to remote tracker on bind/refresh
this enables syncing after reading offline

* remove unused variable

* refactor the 2-way sync in a util function

* handle auto add to track for unattended services from the browse source screen when long clicking
this will also sync chapters, as it is possible to have read or marked as read chapters from there

* 2-way sync when library update for TRACKING

* refactor

* better handling of what has been read server side

* refactor: extract function

* fix: localLastRead could be -1 when all chapters are read

* refactor to rethrow exception so it can be shown in toast

* extract strings

* replace komga logo

Co-authored-by: Andreas <andreas.everos@gmail.com>
This commit is contained in:
Gauthier
2021-05-23 00:07:58 +08:00
committed by GitHub
parent dbe8931cf0
commit d6b3b0baf7
18 changed files with 481 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

View File

@@ -376,6 +376,7 @@
<!-- Tracking section -->
<string name="pref_auto_update_manga_sync">Update chapter progress after reading</string>
<string name="pref_auto_add_track">Track silently when adding manga to library</string>
<string name="services">Services</string>
<string name="tracking_info">One-way sync to update the chapter progress in tracking services. Set up tracking for individual manga entries from their tracking button.</string>
@@ -581,6 +582,7 @@
<string name="tracker_anilist" translatable="false">AniList</string>
<string name="tracker_myanimelist" translatable="false">MyAnimeList</string>
<string name="tracker_kitsu" translatable="false">Kitsu</string>
<string name="tracker_komga" translatable="false">Komga</string>
<string name="tracker_bangumi" translatable="false">Bangumi</string>
<string name="tracker_shikimori" translatable="false">Shikimori</string>
<string name="manga_tracking_tab">Tracking</string>
@@ -589,6 +591,7 @@
<item quantity="other">%d trackers</item>
</plurals>
<string name="add_tracking">Add tracking</string>
<string name="unread">Unread</string>
<string name="reading">Reading</string>
<string name="currently_reading">Currently reading</string>
<string name="completed">Completed</string>
@@ -610,6 +613,9 @@
<string name="error_invalid_date_supplied">Invalid date supplied</string>
<string name="myanimelist_creds_missing">MAL login credentials not found</string>
<string name="myanimelist_relogin">Please login to MAL again</string>
<string name="score_unsupported">Not supported</string>
<string name="source_unsupported">Source is not supported</string>
<string name="error_no_match">No match found</string>
<!-- Category activity -->
<string name="error_category_exists">A category with this name already exists!</string>