You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
428 B
19 lines
428 B
import type { DownloadingItem } from '@server/lib/downloadtracker';
|
|
|
|
export const refreshIntervalHelper = (
|
|
downloadItem: {
|
|
downloadStatus: DownloadingItem[] | undefined;
|
|
downloadStatus4k: DownloadingItem[] | undefined;
|
|
},
|
|
timer: number
|
|
) => {
|
|
if (
|
|
(downloadItem.downloadStatus ?? []).length > 0 ||
|
|
(downloadItem.downloadStatus4k ?? []).length > 0
|
|
) {
|
|
return timer;
|
|
} else {
|
|
return 0;
|
|
}
|
|
};
|