diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/EnhancedTrackService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/EnhancedTrackService.kt
index 753965583..4fefaf2b5 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/data/track/EnhancedTrackService.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/EnhancedTrackService.kt
@@ -1,7 +1,6 @@
package eu.kanade.tachiyomi.data.track
import eu.kanade.tachiyomi.data.database.models.Manga
-import eu.kanade.tachiyomi.data.track.komga.Komga
import eu.kanade.tachiyomi.data.track.model.TrackSearch
import eu.kanade.tachiyomi.source.Source
diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/komga/Komga.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/komga/Komga.kt
index efab5bbcc..9628a68f0 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/data/track/komga/Komga.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/komga/Komga.kt
@@ -10,7 +10,6 @@ import eu.kanade.tachiyomi.data.track.EnhancedTrackService
import eu.kanade.tachiyomi.data.track.NoLoginTrackService
import eu.kanade.tachiyomi.data.track.TrackService
import eu.kanade.tachiyomi.data.track.model.TrackSearch
-import eu.kanade.tachiyomi.source.Source
import okhttp3.Dns
import okhttp3.OkHttpClient
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsTrackingController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsTrackingController.kt
index 8d76a1849..f6dc9e775 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsTrackingController.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsTrackingController.kt
@@ -4,10 +4,10 @@ import android.app.Activity
import android.view.Menu
import android.view.MenuInflater
import android.view.MenuItem
+import android.widget.Toast
import androidx.preference.PreferenceGroup
import androidx.preference.PreferenceScreen
import eu.kanade.tachiyomi.R
-import eu.kanade.tachiyomi.data.track.EnhancedTrackService
import eu.kanade.tachiyomi.data.track.NoLoginTrackService
import eu.kanade.tachiyomi.data.track.TrackManager
import eu.kanade.tachiyomi.data.track.TrackService
@@ -27,6 +27,7 @@ import eu.kanade.tachiyomi.util.preference.preferenceCategory
import eu.kanade.tachiyomi.util.preference.switchPreference
import eu.kanade.tachiyomi.util.preference.titleRes
import eu.kanade.tachiyomi.util.system.openInBrowser
+import eu.kanade.tachiyomi.util.system.toast
import eu.kanade.tachiyomi.widget.preference.LoginPreference
import uy.kohesive.injekt.injectLazy
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
@@ -82,8 +83,16 @@ class SettingsTrackingController :
}
trackPreference(trackManager.komga) {
- trackManager.komga.loginNoop()
- updatePreference(trackManager.komga.id)
+ val acceptedSources = trackManager.komga.getAcceptedSources()
+ val hasValidSourceInstalled = sourceManager.getCatalogueSources()
+ .any { it::class.qualifiedName in acceptedSources }
+
+ if (hasValidSourceInstalled) {
+ trackManager.komga.loginNoop()
+ updatePreference(trackManager.komga.id)
+ } else {
+ context.toast(R.string.tracker_komga_warning, Toast.LENGTH_LONG)
+ }
}
infoPreference(R.string.enhanced_tracking_info)
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 6d031ba25..ed7594191 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -586,6 +586,7 @@
MyAnimeList
Kitsu
Komga
+ This tracker is only compatible with the Komga source.
Bangumi
Shikimori
Tracking