Compare commits
2 Commits
541860db0a
...
576be53b83
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
576be53b83 | ||
|
|
72936b7c6b |
@ -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",
|
||||||
|
|||||||
@ -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 (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user