Skip to content

Commit 8963042

Browse files
authored
Link to original source URL in description (#43)
* Retrieve baseUrl and manga url from server * Link to original source URl in description So it can be opened in the browser * Bump extCode * Retrieve realUrl instead of baseUrl + url * Use realUrl instead of baseUrl + url * Do not hyperlink if realUrl is null
1 parent 9dd0bb2 commit 8963042

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

src/all/tachidesk/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ext {
77
extName = 'Suwayomi'
88
pkgNameSuffix = 'all.tachidesk'
99
extClass = '.Tachidesk'
10-
extVersionCode = 27
10+
extVersionCode = 28
1111
}
1212

1313
apply from: "$rootDir/common.gradle"

src/all/tachidesk/graphql/Manga.graphql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ fragment MangaFragment on MangaType {
2626
source {
2727
displayName
2828
}
29+
realUrl
2930
}
3031

3132
mutation GetManga($mangaId: Int!) {

src/all/tachidesk/src/eu/kanade/tachiyomi/extension/all/tachidesk/Tachidesk.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,11 @@ class Tachidesk : ConfigurableSource, UnmeteredSource, HttpSource() {
896896
private fun MangaFragment.toSManga() = SManga.create().also {
897897
var desc = description
898898
if (getPrefMentionSourceInDescription() && source != null) {
899-
val append = "\n\n**Source:** ${source.displayName}"
899+
val append = "\n\n**Source:** " + if (realUrl == null) {
900+
source.displayName
901+
} else {
902+
"[${source.displayName}]($realUrl)"
903+
}
900904
if (desc == null) {
901905
desc = append
902906
} else {

0 commit comments

Comments
 (0)