diff --git a/client/src/app/add-new-torrent/add-new-torrent.component.html b/client/src/app/add-new-torrent/add-new-torrent.component.html index 585b2f7..1e82e1b 100644 --- a/client/src/app/add-new-torrent/add-new-torrent.component.html +++ b/client/src/app/add-new-torrent/add-new-torrent.component.html @@ -84,11 +84,15 @@ -

- When downloading with AllDebrid it cannot be guaranteed that only files above this limit will be download as - some files are grouped together in 1 large archive. -

-

This setting does not apply to manually selected files.

+ @if (provider === "AllDebrid") { +

+ When downloading with AllDebrid it cannot be guaranteed that only files above this limit will be download as + some files are grouped together in 1 large archive. +

+ } + @if (downloadAction === 2) { +

This setting does not apply to manually selected files.

+ }
@@ -104,8 +108,12 @@ Select only the files that are matching this regular expression. Only use this setting OR the Exclude files setting, not both.

-

This setting does not apply to manually selected files.

-

{{ includeRegexError }}

+ @if (downloadAction === 2) { +

This setting does not apply to manually selected files.

+ } + @if (includeRegexError) { +

{{ includeRegexError }}

+ }
@@ -121,8 +129,12 @@ Ignore files that are matching this regular expression. Only use this setting OR the Include files setting, not both.

-

This setting does not apply to manually selected files.

-

{{ excludeRegexError }}

+ @if (downloadAction === 2) { +

This setting does not apply to manually selected files.

+ } + @if (excludeRegexError) { +

{{ excludeRegexError }}

+ }
@@ -130,8 +142,10 @@
@@ -196,7 +210,9 @@
-
{{ error }}
+ @if (error) { +
{{ error }}
+ }
diff --git a/client/src/app/login/login.component.html b/client/src/app/login/login.component.html index 87fcb3f..30fbfe8 100644 --- a/client/src/app/login/login.component.html +++ b/client/src/app/login/login.component.html @@ -41,9 +41,11 @@ Login
-
- {{ error }} -
+ @if (error?.length > 0) { +
+ {{ error }} +
+ } diff --git a/client/src/app/navbar/navbar.component.html b/client/src/app/navbar/navbar.component.html index 5a92264..1b9755f 100644 --- a/client/src/app/navbar/navbar.component.html +++ b/client/src/app/navbar/navbar.component.html @@ -38,13 +38,18 @@ Settings - - - - - Premium Status: {{ profile.expiration | date }} - Not premium - + @if (profile) { + + + + + @if (profile.expiration) { + Premium Status: {{ profile.expiration | date }} + } @else { + Not premium + } + + } -
- Your current version is insecure. - - Version {{ profile.latestVersion }} of RealDebrid Client was found. You are currently on version - {{ profile.currentVersion }}. - -
+ +@if ( + profile && + (!profile.disableUpdateNotification || profile.isInsecure) && + profile.latestVersion && + profile.currentVersion !== profile.latestVersion +) { +
+ @if (profile.isInsecure) { + Your current version is insecure. + } + + Version {{ profile.latestVersion }} of RealDebrid Client was found. You are currently on version + {{ profile.currentVersion }}. + +
+} diff --git a/client/src/app/profile/profile.component.html b/client/src/app/profile/profile.component.html index 1464759..981ab42 100644 --- a/client/src/app/profile/profile.component.html +++ b/client/src/app/profile/profile.component.html @@ -19,13 +19,17 @@
-
Error saving: {{ error }}
+ @if (error !== null) { +
Error saving: {{ error }}
+ }
-
Your profile has been updated
+ @if (success) { +
Your profile has been updated
+ }
diff --git a/client/src/app/settings/settings.component.html b/client/src/app/settings/settings.component.html index fc74881..0aeb50a 100644 --- a/client/src/app/settings/settings.component.html +++ b/client/src/app/settings/settings.component.html @@ -1,186 +1,219 @@
-
-

{{ tab.description }}

- -

{{ setting.displayName }}

+@for (tab of tabs; track tab.key; let i = $index) { +
+

{{ tab.description }}

+ @for (setting of tab.settings; track setting.key) { + @if (setting.type === "Object") { +

{{ setting.displayName }}

+ } +
+ @if (setting.type !== "Boolean" && setting.type !== "Object") { + + } + @switch (setting.type) { + @case ("String") { +
+ +
+ } + @case ("Int32") { +
+ +
+ } + @case ("Boolean") { + + } + @case ("Enum") { +
+ +
+ } + @case ("Object") {} + @default { +
Invalid setting type {{ setting.type }}
+ } + } +

+ @if (setting.key === "DownloadClient:Aria2cSecret") { + + @if (testAria2cConnectionError) { +
+ Could connect to Aria2 client
+ {{ testAria2cConnectionError }} +
+ } + @if (testAria2cConnectionSuccess) { +
+ Found Aria2 client version {{ testAria2cConnectionSuccess }} +
+ } + } +
+ } +
+} + +@if (activeTab === 99) { +
- - -
- -
-
- -
- -
- -
- -
Invalid setting type {{ setting.type }}
-
- -

- - - -
- Could connect to Aria2 client
- {{ testAria2cConnectionError }} -
- -
- Found Aria2 client version {{ testAria2cConnectionSuccess }} -
-
-
- -
- -
-
- -
- -
- Could not test your download path
- {{ testPathError }} + +
+ @if (!testPathError && !testPathSuccess) { + + } + @if (testPathError) { +
+ Could not test your download path
+ {{ testPathError }} +
+ } + @if (testPathSuccess) { +
Your download path looks good!
+ }
- -
Your download path looks good!
+
This will check if the download folder has write permissions.
-
This will check if the download folder has write permissions.
-
- -
- -
- -
- Could not test your download speed
- {{ testDownloadSpeedError }} +
+ +
+ @if (testDownloadSpeedError) { +
+ Could not test your download speed
+ {{ testDownloadSpeedError }} +
+ } @else if (testDownloadSpeedSuccess) { +
Download speed {{ testDownloadSpeedSuccess | filesize }}/s
+ } @else { + + }
- -
- Download speed {{ testDownloadSpeedSuccess | filesize }}/s +
+ This will attempt to download a 10GB file from Real-Debrid. When 50MB has been downloaded the test will stop.
-
- This will attempt to download a 10GB file from Real-Debrid. When 50MB has been downloaded the test will stop. +
+ +
+ @if (testWriteSpeedError) { +
+ Could not test your download speed
+ {{ testWriteSpeedError }} +
+ } @else if (testWriteSpeedSuccess) { +
Write speed {{ testWriteSpeedSuccess | filesize }}/s
+ } @else { + + } +
+
This will write a small file to your download folder to see how fast it can write to it.
- -
- -
- -
- Could not test your download speed
- {{ testWriteSpeedError }} -
- -
- Write speed {{ testWriteSpeedSuccess | filesize }}/s -
-
-
This will write a small file to your download folder to see how fast it can write to it.
-
-
+}
-
Error saving settings: {{ error }}
-
-
- -
- -
- -
-

- @if (canRegisterMagnetHandler) { - This will attempt to register the client as your browser's default handler for magnet links and automatically open - them in the new torrent screen for downloading. - } @else { - Magnet link registration is unavailable. Your - - browser may not support this feature - - , or the client is not being served in a - - secure context - - . + @if (error?.length > 0) { +

Error saving settings: {{ error }}
} -

-
- -
-
-
+ +@if (activeTab === 0) { +
+ +
+ +
+

+ @if (canRegisterMagnetHandler) { + This will attempt to register the client as your browser's default handler for magnet links and automatically + open them in the new torrent screen for downloading. + } @else { + Magnet link registration is unavailable. Your + + browser may not support this feature + + , or the client is not being served in a + + secure context + + . + } +

+
+} + +@if (activeTab < 99) { +
+
+ +
+
+} diff --git a/client/src/app/setup/setup.component.html b/client/src/app/setup/setup.component.html index da0b50b..6fe95e0 100644 --- a/client/src/app/setup/setup.component.html +++ b/client/src/app/setup/setup.component.html @@ -4,145 +4,165 @@
-
-
- Welcome to Real-Debrid Client. Please create your account by entering a username and password. + @if (step === 1) { +
+
+ Welcome to Real-Debrid Client. Please create your account by entering a username and password. +
+
+
+ +
+ + + + +
+
+
+ +
+ + + + +
+
+
+ +
+ @if (error?.length > 0) { +
+ {{ error }} +
+ } +
-
+ } + + @if (step === 2) { +
+
+ To be able to use the Real-Debrid Client you need a premium subscription to download torrents. +

+ Not premium yet? You have the choice of 5 providers: +
+ Use this link to sign up to Real-Debrid. +
+ Use this link to sign up to AllDebrid. +
+ Use this link to sign up to Premiumize. +
+ Use this link to sign up to TorBox. +
+ Use this link to sign up to DebridLink. + (Referal links) +
- -
- - - - + +
+
- -
- - - - + +
+
+ @if (provider === 0) { +

+ You can find your API key here: + https://real-debrid.com/apitoken. +

+ } + @if (provider === 1) { +

+ You can find your API key here: + https://alldebrid.com/apikeys/. +

+ } + @if (provider === 2) { +

+ You can find your API key here: + https://www.premiumize.me/account. +

+ } + @if (provider === 3) { +

+ You can find your API key here: + https://torbox.app/settings. +

+ } + @if (provider === 4) { +

+ You can find your API key here: + https://debrid-link.com/webapp/apikey. +

+ }
-
-
- {{ error }} -
- -
- -
-
- To be able to use the Real-Debrid Client you need a premium subscription to download torrents. -

- Not premium yet? You have the choice of 5 providers: -
- Use this link to sign up to Real-Debrid. -
- Use this link to sign up to AllDebrid. -
- Use this link to sign up to Premiumize. -
- Use this link to sign up to TorBox. -
- Use this link to sign up to DebridLink. - (Referal links) + @if (error?.length > 0) { +
+ {{ error }} +
+ }
-
- -
- + } + + @if (step === 3) { +
+
+ You are now connected to Real-Debrid! To setup Radarr or Sonarr, please following the instructions here: + https://github.com/rogerfar/rdt-client/. +
+
+
-
- -
- -
-

- You can find your API key here: - https://real-debrid.com/apitoken. -

-

- You can find your API key here: - https://alldebrid.com/apikeys/. -

-

- You can find your API key here: - https://www.premiumize.me/account. -

-

- You can find your API key here: - https://torbox.app/settings. -

-

- You can find your API key here: - https://debrid-link.com/webapp/apikey. -

-
- -
- -
-
- {{ error }} -
-
- -
-
- You are now connected to Real-Debrid! To setup Radarr or Sonarr, please following the instructions here: - https://github.com/rogerfar/rdt-client/. -
-
- -
-
+ }
diff --git a/client/src/app/torrent-table/torrent-table.component.html b/client/src/app/torrent-table/torrent-table.component.html index 536d57d..db890fd 100644 --- a/client/src/app/torrent-table/torrent-table.component.html +++ b/client/src/app/torrent-table/torrent-table.component.html @@ -1,7 +1,9 @@ -
- An error has occured: {{ error }}
- Please refresh the screen after fixing this error. -
+@if (error && error.length > 0) { +
+ An error has occurred: {{ error }}
+ Please refresh the screen after fixing this error. +
+}
@@ -25,72 +27,59 @@ - - - - - - - - - - - - + @for (torrent of torrents | sort: sortProperty : sortDirection; track torrent.torrentId) { + + + + + + + + + + + + + }
- - - {{ torrent.rdName }} - - {{ torrent.category }} - - {{ torrent.priority }} - - {{ torrent.rdSeeders }} - - {{ torrent.files.length | number }} - - {{ torrent.downloads.length | number }} - - {{ torrent.rdSize | filesize }} - - {{ torrent.added | date: "medium" }} - - {{ torrent | status }} -
+ + + {{ torrent.rdName }} + + {{ torrent.category }} + + {{ torrent.priority }} + + {{ torrent.rdSeeders }} + + {{ torrent.files.length | number }} + + {{ torrent.downloads.length | number }} + + {{ torrent.rdSize | filesize }} + + {{ torrent.added | date: "medium" }} + + {{ torrent | status }} +
- - - - - + @if (torrents.length > 0) { + + + + }
@@ -131,9 +120,9 @@
Deleting a torrent from Real-Debrid will automatically delete it here too.
-
- Error deleting torrent: {{ deleteError }} -
+ @if (deleteError?.length > 0) { +
Error deleting torrent: {{ deleteError }}
+ }
-
- Error changing settings: {{ changeSettingsError }} -
+ @if (changeSettingsError?.length > 0) { +
Error changing settings: {{ changeSettingsError }}
+ }
-
-
- -
-
-
-
-
-
-
- -
-
- -
-
- -
-
-
- - {{ torrent | status }} -
-
- - {{ torrent.retryCount }} / {{ torrent.torrentRetryAttempts }} -
-
- - {{ torrent.hash }} -
-
- - {{ torrent.priority || "" }} -
-
- - {{ torrent.category || "(no category set)" }} -
-
- - - Internal Downloader - Bezadd - Aria2c - Symlink Downloader - Synology DownloadStation - -
-
- - - Download all files to host - Don't download files to host - -
-
- - - Download all files above a certain size - Download all available files on Real-Debrid above a certain size - Pick files I want to download - -
-
- - - Do nothing - Remove torrent from Real-Debrid and Real-Debrid Client - Remove torrent from Real-Debrid - Remove torrent from client - -
-
- - {{ torrent.downloadMinSize }}MB -
-
- - {{ torrent.includeRegex }} -
-
- - {{ torrent.excludeRegex }} -
-
- - Click to copy magnet link to clipboard - Link copied to clipboard! -
-
- - Click to download torrent file -
-
- - {{ torrent.added | date: "fullDate" }} {{ torrent.added | date: "mediumTime" }} -
-
- - (no files selected yet) - - {{ torrent.filesSelected | date: "fullDate" }} {{ torrent.filesSelected | date: "mediumTime" }} - -
-
- - (not completed yet) - - {{ torrent.completed | date: "fullDate" }} {{ torrent.completed | date: "mediumTime" }} - -
-
-
-
- - {{ torrent.rdId }} -
-
- - {{ torrent.rdName }} -
-
- - {{ torrent.rdSize | filesize }} -
-
- - {{ torrent.rdHost }} -
-
- - {{ torrent.rdSplit }} -
-
- - {{ torrent.rdProgress || 0 }}% -
-
- - - Processing - Waiting For File Selection - Downloading - Finished - Error - - ({{ torrent.rdStatusRaw }}) -
-
- - {{ torrent.rdAdded | date: "fullDate" }} {{ torrent.rdAdded | date: "mediumTime" }} -
-
- - {{ torrent.rdEnded | date: "fullDate" }} {{ torrent.rdEnded | date: "mediumTime" }} -
-
- - {{ torrent.rdSpeed || 0 }} -
-
- - {{ torrent.rdSeeders || "0" }} -
+@if (torrent === null || torrent === undefined) { +
+
+
-
-
- - - - - - - - - - - - - - - - - -
IDPathSizeSelected
- {{ file.id }} - - {{ file.path }} - - {{ file.bytes | filesize }} - - - -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - + + + + @if (expanded) { + + + + + } + } + +
LinkSizeStatus
- - - - - {{ download.link | decodeURI }} - - - - {{ download.path }} - - - {{ download.bytesTotal | filesize }} - - {{ download | downloadStatus }} -
-
-
-
-
- -
-
-
- - {{ download.error }} -
-
- - - {{ download.link | decodeURI }} -
-
- +} @else { +
+ @if (activeTab === 0) { +
+
+
+
+ +
+
+ +
+
+ +
+
+
+ + {{ torrent | status }} +
+
+ + {{ torrent.retryCount }} / {{ torrent.torrentRetryAttempts }} +
+
+ + {{ torrent.hash }} +
+
+ + {{ torrent.priority || "" }} +
+
+ + {{ torrent.category || "(no category set)" }} +
+
+ + @switch (torrent.downloadClient) { + @case (0) { + Internal Downloader + } + @case (1) { + Bezadd + } + @case (2) { + Aria2c + } + @case (3) { + Symlink Downloader + } + @case (4) { + Synology DownloadStation + } + } +
+
+ + @switch (torrent.hostDownloadAction) { + @case (0) { + Download all files to host + } + @case (1) { + Don't download files to host + } + } +
+
+ + @switch (torrent.downloadAction) { + @case (0) { + Download all files above a certain size + } + @case (1) { + Download all available files on Real-Debrid above a certain size + } + @case (2) { + Pick files I want to download + } + } +
+
+ + @switch (torrent.finishedAction) { + @case (0) { + Do nothing + } + @case (1) { + Remove torrent from Real-Debrid and Real-Debrid Client + } + @case (2) { + Remove torrent from Real-Debrid + } + @case (3) { + Remove torrent from client + } + } +
+
+ + {{ torrent.downloadMinSize }}MB +
+
+ + {{ torrent.includeRegex }} +
+
+ + {{ torrent.excludeRegex }} +
+ @if (!torrent.isFile) { +
+ + @if (!copied) { + + Click to copy magnet link to clipboard + + } @else { + Link copied to clipboard! + } +
+ } @else { +
+ + Click to download torrent file +
+ } +
+ + {{ torrent.added | date: "fullDate" }} {{ torrent.added | date: "mediumTime" }} +
+
+ + @if (torrent.filesSelected === null) { + (no files selected yet) + } @else { + {{ torrent.filesSelected | date: "fullDate" }} {{ torrent.filesSelected | date: "mediumTime" }} + } +
+
+ + @if (torrent.completed === null) { + (not completed yet) + } @else { + {{ torrent.completed | date: "fullDate" }} {{ torrent.completed | date: "mediumTime" }} + } +
+
+
+
+ + {{ torrent.rdId }} +
+
+ + {{ torrent.rdName }} +
+
+ + {{ torrent.rdSize | filesize }} +
+
+ + {{ torrent.rdHost }} +
+
+ + {{ torrent.rdSplit }} +
+
+ + {{ torrent.rdProgress || 0 }}% +
+
+ + @switch (torrent.rdStatus) { + @case (0) { + Processing + } + @case (1) { + Waiting For File Selection + } + @case (2) { + Downloading + } + @case (3) { + Finished + } + @case (99) { + Error + } + } + ({{ torrent.rdStatusRaw }}) +
+
+ + {{ torrent.rdAdded | date: "fullDate" }} {{ torrent.rdAdded | date: "mediumTime" }} +
+
+ + {{ torrent.rdEnded | date: "fullDate" }} {{ torrent.rdEnded | date: "mediumTime" }} +
+
+ + {{ torrent.rdSpeed || 0 }} +
+
+ + {{ torrent.rdSeeders || "0" }} +
+
+
+ } + @if (activeTab === 1) { +
+
+ + + + + + + + + + + @for (file of torrent.files; track file.id) { + + + + + + + } + +
IDPathSizeSelected
+ {{ file.id }} + + {{ file.path }} + + {{ file.bytes | filesize }} + + @if (file.selected) { + + } @else { + + } +
+
+
+ } + @if (activeTab === 2) { +
+
+ + + + + + + + + + + @for (download of torrent.downloads; track download.downloadId) { + @let expanded = downloadExpanded[download.downloadId]; + + + - - - -
LinkSizeStatus
+ @if (!expanded) { + + } @else { + + } + + @if (download.link) { + {{ download.link | decodeURI }} + } + @if (!download.link) { {{ download.path }} - -
- - {{ download.bytesDone | filesize }} / {{ download.bytesTotal | filesize }} ({{ - download.speed | filesize - }}/s) -
-
- - {{ download.retryCount }} / {{ torrent.downloadRetryAttempts }} -
- -
-
- - - {{ download.added | date: "fullDate" }} {{ download.added | date: "mediumTime" }} - - (not added yet) -
-
- - - {{ download.downloadQueued | date: "fullDate" }} - {{ download.downloadQueued | date: "mediumTime" }} - - (not queued for downloading yet) -
-
- - - {{ download.downloadStarted | date: "fullDate" }} - {{ download.downloadStarted | date: "mediumTime" }} - - (not started downloading yet) -
-
- - - {{ download.downloadFinished | date: "fullDate" }} - {{ download.downloadFinished | date: "mediumTime" }} - - (not finished yet) -
-
- - - {{ download.unpackingQueued | date: "fullDate" }} - {{ download.unpackingQueued | date: "mediumTime" }} - - (not queued for unpacking yet) -
-
- - - {{ download.unpackingStarted | date: "fullDate" }} - {{ download.unpackingStarted | date: "mediumTime" }} - - (not started unpacking yet) -
-
- - - {{ download.unpackingFinished | date: "fullDate" }} - {{ download.unpackingFinished | date: "mediumTime" }} - - (not finished unpacking yet) -
-
- - - {{ download.completed | date: "fullDate" }} - {{ download.completed | date: "mediumTime" }} - - (not completed yet) -
-
- -
-
+ } +
+ {{ download.bytesTotal | filesize }} + + {{ download | downloadStatus }} +
+
+
+
+
+ +
+
+ @if (download.error) { +
+ + {{ download.error }} +
+ } +
+ + @if (download.link) { + {{ download.link | decodeURI }} + } +
+
+ + {{ download.path }} +
+
+ + {{ download.bytesDone | filesize }} / {{ download.bytesTotal | filesize }} ({{ + download.speed | filesize + }}/s) +
+
+ + {{ download.retryCount }} / {{ torrent.downloadRetryAttempts }} +
+
+
+
+ + @if (download.added) { + {{ download.added | date: "fullDate" }} {{ download.added | date: "mediumTime" }} + } @else { + (not added yet) + } +
+
+ + @if (download.downloadQueued) { + {{ download.downloadQueued | date: "fullDate" }} + {{ download.downloadQueued | date: "mediumTime" }} + } @else { + (not queued for downloading yet) + } +
+
+ + @if (download.downloadStarted) { + {{ download.downloadStarted | date: "fullDate" }} + {{ download.downloadStarted | date: "mediumTime" }} + } @else { + (not started downloading yet) + } +
+
+ + @if (download.downloadFinished) { + {{ download.downloadFinished | date: "fullDate" }} + {{ download.downloadFinished | date: "mediumTime" }} + } @else { + (not finished yet) + } +
+
+ + @if (download.unpackingQueued) { + {{ download.unpackingQueued | date: "fullDate" }} + {{ download.unpackingQueued | date: "mediumTime" }} + } @else { + (not queued for unpacking yet) + } +
+
+ + @if (download.unpackingStarted) { + {{ download.unpackingStarted | date: "fullDate" }} + {{ download.unpackingStarted | date: "mediumTime" }} + } @else { + (not started unpacking yet) + } +
+
+ + @if (download.unpackingFinished) { + {{ download.unpackingFinished | date: "fullDate" }} + {{ download.unpackingFinished | date: "mediumTime" }} + } @else { + (not finished unpacking yet) + } +
+
+ + @if (download.completed) { + {{ download.completed | date: "fullDate" }} + {{ download.completed | date: "mediumTime" }} + } @else { + (not completed yet) + } +
+
+
+
+
+
+ }
-
+}