fix(ui): improve debrid cloud caching visual feedback and disable premature resume
Some checks are pending
Build / build (ubuntu-latest) (push) Waiting to run
Build / build (windows-2022) (push) Waiting to run
Build / build-production (ubuntu-latest) (push) Waiting to run
Build / build-production (windows-2022) (push) Waiting to run
Text Integrity / text-integrity (push) Waiting to run

This commit is contained in:
Murilo Scolari 2026-11-01 05:56:09 -03:00
parent 70cfda9a0e
commit 85af24489c
6 changed files with 27 additions and 6 deletions

View file

@ -31,6 +31,7 @@
"collections": "Collections",
"big_picture": "Big Picture",
"downloading_metadata": "{{title}} (Downloading metadata…)",
"debrid_caching_sidebar": "{{title}} (Caching in cloud…)",
"paused": "{{title}} (Paused)",
"downloading": "{{title}} ({{percentage}} - Downloading…)",
"filter": "Filter library",
@ -431,6 +432,7 @@
"danger_zone_section_title": "Danger zone",
"danger_zone_section_description": "Remove this game from your library or the files downloaded by Hydra",
"download_in_progress": "Download in progress",
"debrid_caching_progress": "Caching in cloud",
"download_paused": "Download paused",
"extracting": "Extracting",
"last_downloaded_option": "Last downloaded option",

View file

@ -30,6 +30,7 @@
"my_library": "Biblioteca",
"big_picture": "Big Picture",
"downloading_metadata": "{{title}} (Baixando metadados…)",
"debrid_caching_sidebar": "{{title}} (Processando na nuvem…)",
"paused": "{{title}} (Pausado)",
"downloading": "{{title}} ({{percentage}} - Baixando…)",
"filter": "Buscar",
@ -336,6 +337,7 @@
"danger_zone_section_title": "Zona de perigo",
"danger_zone_section_description": "Remova o jogo da sua biblioteca ou os arquivos que foram baixados pelo Hydra",
"download_in_progress": "Download em andamento",
"debrid_caching_progress": "Processando na nuvem",
"download_paused": "Download pausado",
"extracting": "Extraindo",
"last_downloaded_option": "Última opção baixada",

View file

@ -444,6 +444,10 @@ export function Sidebar() {
});
}
if (game.download?.awaitingDebrid && game.download.debridAutoResume) {
return t("debrid_caching_sidebar", { title: game.title });
}
if (
game.download?.queued &&
game.download.status !== "removed" &&

View file

@ -1009,7 +1009,8 @@ export function DownloadGroup({
(download?.downloader === Downloader.AllDebrid &&
!userPreferences?.allDebridApiToken) ||
(download?.downloader === Downloader.TorBox &&
!userPreferences?.torBoxApiToken);
!userPreferences?.torBoxApiToken) ||
(download?.awaitingDebrid && download.debridAutoResume);
const queueIndex = queuedGameIds.indexOf(game.id);
const isFirstInQueue = queueIndex === 0;
@ -1478,9 +1479,18 @@ export function DownloadGroup({
game.download.status !== "complete")) && (
<Button
theme="primary"
disabled={
game.download?.awaitingDebrid &&
game.download.debridAutoResume
}
onClick={() => resumeDownload(game.shop, game.objectId)}
className="download-group__simple-menu-btn"
tooltip={t("resume")}
tooltip={
game.download?.awaitingDebrid &&
game.download.debridAutoResume
? t("waiting_for_debrid")
: t("resume")
}
>
<DownloadIcon size={16} />
</Button>

View file

@ -95,9 +95,11 @@ export function HeroPanelPlaytime() {
const downloadInProgressInfo = (
<div className="hero-panel-playtime__download-details">
<Link to="/downloads" className="hero-panel-playtime__downloads-link">
{game.download?.status === "active"
? t("download_in_progress")
: t("download_paused")}
{game.download?.awaitingDebrid && game.download.debridAutoResume
? t("debrid_caching_progress")
: game.download?.status === "active"
? t("download_in_progress")
: t("download_paused")}
</Link>
<small>

View file

@ -74,7 +74,8 @@ export function HeroPanel() {
: downloadGame?.download?.progress
}
className={`hero-panel__progress-bar ${
downloadGame?.download?.status === "paused"
downloadGame?.download?.status === "paused" &&
!downloadGame?.download?.awaitingDebrid
? "hero-panel__progress-bar--disabled"
: ""
}`}