Compare commits

..

2 Commits

Author SHA1 Message Date
Sucukdeluxe
576be53b83 Release v1.7.0 2026-03-07 02:36:41 +01:00
Sucukdeluxe
72936b7c6b Compact provider labels in package account column
Multiple accounts from the same provider are now merged:
"Debrid-Link (#3), Debrid-Link (#4)" becomes "Debrid-Link (#3 + #4)"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 02:35:23 +01:00
2 changed files with 20 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "real-debrid-downloader", "name": "real-debrid-downloader",
"version": "1.6.99", "version": "1.7.0",
"description": "Desktop downloader", "description": "Desktop downloader",
"main": "build/main/main/main.js", "main": "build/main/main/main.js",
"author": "Sucukdeluxe", "author": "Sucukdeluxe",

View File

@ -784,6 +784,24 @@ function providerLabelWithMode(provider: DebridProvider, settings: AppSettings):
return opt?.modeLabel ? `${base} (${opt.modeLabel})` : base; return opt?.modeLabel ? `${base} (${opt.modeLabel})` : base;
} }
function compactProviderLabels(labels: string[]): string {
const unique = [...new Set(labels)];
const groups = new Map<string, string[]>();
for (const label of unique) {
const m = label.match(/^(.+?)\s*\((.+)\)$/);
if (m) {
const arr = groups.get(m[1]) || [];
arr.push(m[2]);
groups.set(m[1], arr);
} else {
groups.set(label, []);
}
}
return [...groups.entries()].map(([base, details]) =>
details.length === 0 ? base : `${base} (${details.join(" + ")})`
).join(", ");
}
function formatDateTime(ts: number): string { function formatDateTime(ts: number): string {
if (!ts) return ""; if (!ts) return "";
const d = new Date(ts); const d = new Date(ts);
@ -5161,7 +5179,7 @@ const PackageCard = memo(function PackageCard({ pkg, items, packageSpeed, isFirs
return <span key={col} className="pkg-col pkg-col-hoster" title={hosterText}>{hosterText}</span>; return <span key={col} className="pkg-col pkg-col-hoster" title={hosterText}>{hosterText}</span>;
} }
case "account": { case "account": {
const accountText = [...new Set(items.map((item) => item.providerLabel || (item.provider ? providerLabels[item.provider] : null)).filter(Boolean))].join(", "); const accountText = compactProviderLabels(items.map((item) => item.providerLabel || (item.provider ? providerLabels[item.provider] : "")).filter(Boolean));
return <span key={col} className="pkg-col pkg-col-account" title={accountText}>{accountText}</span>; return <span key={col} className="pkg-col pkg-col-account" title={accountText}>{accountText}</span>;
} }
case "prio": return ( case "prio": return (