mirror of
				https://github.com/karl0ss/homepage.git
				synced 2025-11-04 08:20:58 +00:00 
			
		
		
		
	Merge branch 'JDownloaderTweaks' into LocalMain
This commit is contained in:
		
						commit
						5ff426c658
					
				@ -656,7 +656,8 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    "jdownloader": {
 | 
					    "jdownloader": {
 | 
				
			||||||
        "downloadCount": "Queue Count",
 | 
					        "downloadCount": "Queue Count",
 | 
				
			||||||
        "downloadQueueSize": "Queue Size",
 | 
					        "downloadBytesRemaining": "Queue Remaining",
 | 
				
			||||||
 | 
					        "downloadTotalBytes": "Total Queue Size",
 | 
				
			||||||
        "downloadSpeed": "Download Speed"
 | 
					        "downloadSpeed": "Download Speed"
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "nextpvr": {
 | 
					    "nextpvr": {
 | 
				
			||||||
 | 
				
			|||||||
@ -21,7 +21,8 @@ export default function Component({ service }) {
 | 
				
			|||||||
        return (
 | 
					        return (
 | 
				
			||||||
            <Container service={service}>
 | 
					            <Container service={service}>
 | 
				
			||||||
                <Block label="jdownloader.downloadCount" />
 | 
					                <Block label="jdownloader.downloadCount" />
 | 
				
			||||||
                <Block label="jdownloader.downloadQueueSize" />
 | 
					                <Block label="jdownloader.downloadTotalBytes" />
 | 
				
			||||||
 | 
					                <Block label="jdownloader.downloadBytesRemaining" />
 | 
				
			||||||
                <Block label="jdownloader.downloadSpeed" />
 | 
					                <Block label="jdownloader.downloadSpeed" />
 | 
				
			||||||
            </Container>
 | 
					            </Container>
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
@ -30,7 +31,8 @@ export default function Component({ service }) {
 | 
				
			|||||||
    return (
 | 
					    return (
 | 
				
			||||||
        <Container service={service}>
 | 
					        <Container service={service}>
 | 
				
			||||||
            <Block label="jdownloader.downloadCount" value={t("common.number", { value: jdownloaderData.downloadCount })} />
 | 
					            <Block label="jdownloader.downloadCount" value={t("common.number", { value: jdownloaderData.downloadCount })} />
 | 
				
			||||||
            <Block label="jdownloader.downloadQueueSize" value={t("common.bytes", { value: jdownloaderData.totalBytes })} />
 | 
					            <Block label="jdownloader.downloadTotalBytes" value={t("common.bytes", { value: jdownloaderData.totalBytes })} />
 | 
				
			||||||
 | 
					            <Block label="jdownloader.downloadBytesRemaining" value={t("common.bytes", { value: jdownloaderData.bytesRemaining })} />
 | 
				
			||||||
            <Block label="jdownloader.downloadSpeed" value={t("common.byterate", { value: jdownloaderData.totalSpeed })} />
 | 
					            <Block label="jdownloader.downloadSpeed" value={t("common.byterate", { value: jdownloaderData.totalSpeed })} />
 | 
				
			||||||
        </Container>
 | 
					        </Container>
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
 | 
				
			|||||||
@ -171,17 +171,22 @@ export default async function jdownloaderProxyHandler(req, res) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    let bytesRemaining = 0;
 | 
				
			||||||
    let totalBytes = 0;
 | 
					    let totalBytes = 0;
 | 
				
			||||||
    let totalSpeed = 0;
 | 
					    let totalSpeed = 0;
 | 
				
			||||||
    packageStatus.forEach(file => {
 | 
					    packageStatus.forEach(file => {
 | 
				
			||||||
        totalBytes += file.bytesTotal;
 | 
					        totalBytes += file.bytesTotal;
 | 
				
			||||||
 | 
					        if (file.finished !== true) {
 | 
				
			||||||
 | 
					            bytesRemaining += file.bytesTotal;
 | 
				
			||||||
            if (file.speed) {
 | 
					            if (file.speed) {
 | 
				
			||||||
                totalSpeed += file.speed;
 | 
					                totalSpeed += file.speed;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const data = {
 | 
					    const data = {
 | 
				
			||||||
        downloadCount: packageStatus.length,
 | 
					        downloadCount: packageStatus.length,
 | 
				
			||||||
 | 
					        bytesRemaining,
 | 
				
			||||||
        totalBytes,
 | 
					        totalBytes,
 | 
				
			||||||
        totalSpeed
 | 
					        totalSpeed
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user