diff --git a/app/src/main/java/io/legado/app/help/DirectLinkUpload.kt b/app/src/main/java/io/legado/app/help/DirectLinkUpload.kt index ef0a8edc4..b9cfb414d 100644 --- a/app/src/main/java/io/legado/app/help/DirectLinkUpload.kt +++ b/app/src/main/java/io/legado/app/help/DirectLinkUpload.kt @@ -28,7 +28,7 @@ object DirectLinkUpload { return downloadUrl } - fun getUploadUrl(): String? { + fun getUploadUrl(): String { return CacheManager.get(uploadUrlKey) ?: """http://shuyuan.miaogongzi.site:6564/shuyuan,{ "method":"POST", @@ -43,8 +43,8 @@ object DirectLinkUpload { CacheManager.put(uploadUrlKey, url) } - fun getDownloadUrlRule(): String? { - return CacheManager.get(uploadUrlKey) + fun getDownloadUrlRule(): String { + return CacheManager.get(downloadUrlRuleKey) ?: """ ${'$'}.data@js:if (result == '') '' else 'https://shuyuan.miaogongzi.site/shuyuan/'+result