From 59897e3340bb1a85c55fa0e1d4555b73c13962aa Mon Sep 17 00:00:00 2001 From: Faizan Durrani Date: Fri, 12 Jan 2024 23:13:55 +0500 Subject: [PATCH] Update Paperback.ts --- src/Paperback/Paperback.ts | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/Paperback/Paperback.ts b/src/Paperback/Paperback.ts index 9642580..01bb241 100644 --- a/src/Paperback/Paperback.ts +++ b/src/Paperback/Paperback.ts @@ -39,7 +39,7 @@ import { getAuthorizationString, // - getTags() which is called on the homepage // - search method which is called even if the user search in an other source export const PaperbackInfo: SourceInfo = { - version: '1.2.11', + version: '1.2.12', name: 'Paperback', icon: 'icon.png', author: 'Lemon | Faizan Durrani', @@ -85,15 +85,16 @@ export class KomgaRequestInterceptor implements SourceInterceptor { return response } async interceptRequest(request: Request): Promise { - // NOTE: Doing it like this will make downloads work tried every other method did not work, if there is a better method make edit it and make pull request - if (request.url.includes('intercept*')) { - const url = request?.url?.split('*').pop() ?? '' - request.headers = { - 'authorization': await getAuthorizationString(this.stateManager) - } - request.url = url - return request - } + // Paper's Note: This hack no longer works on iOS 17 + // ORIGINAL NOTE: Doing it like this will make downloads work tried every other method did not work, if there is a better method make edit it and make pull request + // if (request.url.includes('intercept*')) { + // const url = request?.url?.split('*').pop() ?? '' + // request.headers = { + // 'authorization': await getAuthorizationString(this.stateManager) + // } + // request.url = url + // return request + // } if (request.headers === undefined) { request.headers = {} } @@ -304,10 +305,10 @@ export class Paperback extends Source { const pages: string[] = [] for (const page of result) { if (SUPPORTED_IMAGE_TYPES.includes(page.mediaType)) { - pages.push(`intercept*${komgaAPI}/books/${chapterId}/pages/${page.number}`) + pages.push(`${komgaAPI}/books/${chapterId}/pages/${page.number}`) } else { - pages.push(`intercept*${komgaAPI}/books/${chapterId}/pages/${page.number}?convert=png`) + pages.push(`${komgaAPI}/books/${chapterId}/pages/${page.number}?convert=png`) } } // Determine the preferred reading direction which is only available in the serie metadata