Skip to content

Commit 7ae837c

Browse files
Remove support for Sorayomi web interface (#414)
fixes #392
1 parent b10908d commit 7ae837c

File tree

5 files changed

+2
-67
lines changed

5 files changed

+2
-67
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Here's a list of known clients/user interfaces for Tachidesk-Server:
4848
##### Actively Developed Cients
4949
- [Tachidesk-WebUI](https://github.com/Suwayomi/Tachidesk-WebUI): The web/ElectronJS front-end that Tachidesk-Server is traditionally shipped with. Usually gets new features faster.
5050
- [Tachidesk-JUI](https://github.com/Suwayomi/Tachidesk-JUI): The native desktop front-end for Tachidesk-Server. Currently the most advanced.
51-
- [Tachidesk-qtui](https://github.com/Suwayomi/Tachidesk-qtui): A C++/Qt front-end for mobile devices(Android/linux), in super early stage of development.
51+
- [Tachidesk-qtui](https://github.com/Suwayomi/Tachidesk-qtui): A C++/Qt front-end for mobile devices(Android/linux), in super early stage of development.
5252
- [Tachidesk-Sorayomi](https://github.com/Suwayomi/Tachidesk-Sorayomi): A Flutter front-end for Desktop(Linux, windows, etc.), Web and Android. UI and UX similar to Tachiyomi.
5353
##### Inctive/Abandoned Cients
5454
- [Equinox](https://github.com/Suwayomi/Equinox): A web user interface made with Vue.js, in super early stage of development.

buildSrc/src/main/kotlin/Constants.kt

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const val MainClass = "suwayomi.tachidesk.MainKt"
1515
val tachideskVersion = System.getenv("ProductVersion") ?: "v0.6.5"
1616

1717
val webUIRevisionTag = System.getenv("WebUIRevision") ?: "r946"
18-
val sorayomiRevisionTag = System.getenv("SorayomiRevision") ?: "0.1.5"
1918

2019
// counts commits on the master branch
2120
val tachideskRevision = runCatching {

server/build.gradle.kts

-3
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,6 @@ buildConfig {
110110
buildConfigField("String", "WEBUI_REPO", quoteWrap("https://github.com/Suwayomi/Tachidesk-WebUI-preview"))
111111
buildConfigField("String", "WEBUI_TAG", quoteWrap(webUIRevisionTag))
112112

113-
buildConfigField("String", "SORAYOMI_REPO", quoteWrap("https://github.com/Suwayomi/Tachidesk-Sorayomi"))
114-
buildConfigField("String", "SORAYOMI_TAG", quoteWrap(sorayomiRevisionTag))
115-
116113

117114
buildConfigField("String", "GITHUB", quoteWrap("https://github.com/Suwayomi/Tachidesk-Server"))
118115
buildConfigField("String", "DISCORD", quoteWrap("https://discord.gg/DDZdqZWaHA"))

server/src/main/kotlin/suwayomi/tachidesk/server/util/WebInterfaceManager.kt

-61
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ private fun directoryMD5(fileDir: String): String {
5454
fun setupWebInterface() {
5555
when (serverConfig.webUIFlavor) {
5656
"WebUI" -> setupWebUI()
57-
"Sorayomi" -> setupSorayomi()
5857
"Custom" -> {
5958
/* do nothing */
6059
}
@@ -136,63 +135,3 @@ fun setupWebUI() {
136135
logger.info { "Extracting WebUI zip Done." }
137136
}
138137
}
139-
140-
/** Make sure a valid copy of Sorayomi is available */
141-
fun setupSorayomi() {
142-
// check if we have Sorayomi installed and is correct version
143-
val sorayomiVersionFile = File(applicationDirs.webUIRoot + "/version.json")
144-
if (sorayomiVersionFile.exists() && json.parseToJsonElement(
145-
sorayomiVersionFile.readText()
146-
).jsonObject["version"]!!.jsonPrimitive.content == BuildConfig.SORAYOMI_TAG
147-
) {
148-
logger.info { "Sorayomi Static files exists and is the correct revision" }
149-
logger.info { "Verifying Sorayomi Static files..." }
150-
logger.info { "md5: " + directoryMD5(applicationDirs.webUIRoot) }
151-
} else {
152-
File(applicationDirs.webUIRoot).deleteRecursively()
153-
154-
val sorayomiZip = "tachidesk-sorayomi-${BuildConfig.SORAYOMI_TAG}-web.zip"
155-
val sorayomiZipPath = "$tmpDir/$sorayomiZip"
156-
val sorayomiZipFile = File(sorayomiZipPath)
157-
158-
// download sorayomi zip
159-
val sorayomiZipURL = "${BuildConfig.SORAYOMI_REPO}/releases/download/${BuildConfig.SORAYOMI_TAG}/$sorayomiZip"
160-
sorayomiZipFile.delete()
161-
162-
logger.info { "Downloading Sorayomi zip from the Internet..." }
163-
val data = ByteArray(1024)
164-
165-
sorayomiZipFile.outputStream().use { sorayomiZipFileOut ->
166-
167-
val connection = URL(sorayomiZipURL).openConnection() as HttpURLConnection
168-
connection.connect()
169-
val contentLength = connection.contentLength
170-
171-
connection.inputStream.buffered().use { inp ->
172-
var totalCount = 0
173-
174-
print("Download progress: % 00")
175-
while (true) {
176-
val count = inp.read(data, 0, 1024)
177-
178-
if (count == -1)
179-
break
180-
181-
totalCount += count
182-
val percentage = (totalCount.toFloat() / contentLength * 100).toInt().toString().padStart(2, '0')
183-
print("\b\b$percentage")
184-
185-
sorayomiZipFileOut.write(data, 0, count)
186-
}
187-
println()
188-
logger.info { "Downloading Sorayomi Done." }
189-
}
190-
}
191-
192-
// extract Sorayomi zip
193-
logger.info { "Extracting Sorayomi zip..." }
194-
File(applicationDirs.webUIRoot).mkdirs()
195-
ZipFile(sorayomiZipPath).extractAll(applicationDirs.webUIRoot)
196-
logger.info { "Extracting Sorayomi zip Done." }
197-
}
198-
}

server/src/main/resources/server-reference.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ server.socksProxyPort = ""
99

1010
# webUI
1111
server.webUIEnabled = true
12-
server.webUIFlavor = "WebUI" # "WebUI" or "Sorayomi" or "Custom"
12+
server.webUIFlavor = "WebUI" # "WebUI" or "Custom"
1313
server.initialOpenInBrowserEnabled = true
1414
server.webUIInterface = "browser" # "browser" or "electron"
1515
server.electronPath = ""

0 commit comments

Comments
 (0)