Skip to content

One self-hosted app for your shows, movies and music.

HolyArrs 1.0.19 (#254)

CoderLuii3a710bab9e15
diff --git a/.github/readme/README.ar.md b/.github/readme/README.ar.md
index 1c0037d..0e9fba3 100644
--- a/.github/readme/README.ar.md
+++ b/.github/readme/README.ar.md
@@ -21,9 +21,9 @@
<p align="center"><a href="https://news.ycombinator.com/item?id=50439000"><img src="https://hackergit.org/badge/HolyArrs/HolyArrs.svg?style=rank" alt="#1 on Show HN" width="250" height="55"></a></p>
> [!NOTE]
-> **HolyArrs 1.0.18: مظهر Minimal الجديد**، بملصقات صغيرة ومن دون صور كبيرة أو تشغيل تلقائي. ومعه 8 إصلاحات، منها الأنمي الذي يقسمه TMDB إلى جزأين. [ما الجديد](https://holyarrs.com/whats-new/)
+> **HolyArrs 1.0.19: rTorrent وruTorrent كبرنامج تنزيل**، وعلى خوادم seedbox أيضًا. تنزيلات Usenet المكتملة تُنقل الآن إلى مكتبتك بدل نسخها. [ما الجديد](https://holyarrs.com/whats-new/)
>
-> <img src="https://github.com/user-attachments/assets/f7e6987d-33eb-4fec-a8fe-ce2c2e264cdf" alt="HolyArrs 1.0.18" width="100%">
+> <img src="https://github.com/user-attachments/assets/3f087371-bae1-496e-bda8-77b9a97c59bf" alt="HolyArrs 1.0.19" width="100%">
> كل ملصق وإعلان وتقييم في HolyArrs لديك يأتي من خادم أشغّله وأدفع تكلفته بنفسي، ليبقى مجانيًا للجميع. إذا جعل HolyArrs سهرة الأفلام عندك أجمل قليلًا، فرعايتك تُبقي الأنوار مضاءة لنا جميعًا 💛
>
@@ -154,7 +154,7 @@ docker compose up -d
<picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-dark.png"><img src="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-light.png" width="100%" alt="المُنزِّلات: qBittorrent وTransmission وDeluge وSABnzbd وNZBGet. خوادم الوسائط: Plex وJellyfin وEmby." /></picture>
-- **المُنزِّلات:** qBittorrent، Transmission، Deluge، SABnzbd، NZBGet
+- **المُنزِّلات:** qBittorrent، Transmission، Deluge، rTorrent، SABnzbd، NZBGet
- **خوادم الوسائط:** Plex، Jellyfin، Emby
- **Sources:** أي مفهرس (indexer) من نوع Torznab أو Newznab، أو Prowlarr أو Jackett
- **ينقل إعدادك من:** Sonarr، Radarr، Lidarr، Prowlarr، Bazarr، Seerr، Overseerr، qBittorrent، SABnzbd
@@ -224,7 +224,7 @@ docker compose up -d
| الوسم | استخدمه لـ |
| :----: | --- |
| `latest` | أحدث إصدار. |
-| `1.0.18` | إصدار واحد بعينه. لا يتحرك أبدًا. |
+| `1.0.19` | إصدار واحد بعينه. لا يتحرك أبدًا. |
## الاستخدام
diff --git a/.github/readme/README.de.md b/.github/readme/README.de.md
index 7ef51df..770b71e 100644
--- a/.github/readme/README.de.md
+++ b/.github/readme/README.de.md
@@ -21,9 +21,9 @@
<p align="center"><a href="https://news.ycombinator.com/item?id=50439000"><img src="https://hackergit.org/badge/HolyArrs/HolyArrs.svg?style=rank" alt="#1 on Show HN" width="250" height="55"></a></p>
> [!NOTE]
-> **HolyArrs 1.0.18: der neue Minimal-Look**, mit kleinen Postern und ohne große Fotos oder Autoplay. Dazu 8 Fehlerbehebungen, unter anderem für Anime, die TMDB in zwei Teile teilt. [Was ist neu](https://holyarrs.com/whats-new/)
+> **HolyArrs 1.0.19: rTorrent und ruTorrent als Downloader**, auch auf Seedboxen. Fertige Usenet-Downloads werden jetzt in deine Bibliothek verschoben statt kopiert. [Was ist neu](https://holyarrs.com/whats-new/)
>
-> <img src="https://github.com/user-attachments/assets/f7e6987d-33eb-4fec-a8fe-ce2c2e264cdf" alt="HolyArrs 1.0.18" width="100%">
+> <img src="https://github.com/user-attachments/assets/3f087371-bae1-496e-bda8-77b9a97c59bf" alt="HolyArrs 1.0.19" width="100%">
> Jedes Poster, jeder Trailer und jede Bewertung in deinem HolyArrs kommt von einem Server, den ich selbst betreibe und bezahle, damit es für alle kostenlos bleibt. Wenn HolyArrs deinen Filmabend ein bisschen schöner gemacht hat, hält ein Sponsoring für uns alle das Licht an 💛
>
@@ -152,7 +152,7 @@ Jemand wünscht sich einen Titel. HolyArrs durchsucht deine Sources, wählt mit
<picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-dark.png"><img src="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-light.png" width="100%" alt="Downloader: qBittorrent, Transmission, Deluge, SABnzbd, NZBGet. Medienserver: Plex, Jellyfin, Emby." /></picture>
-- **Downloader:** qBittorrent, Transmission, Deluge, SABnzbd, NZBGet
+- **Downloader:** qBittorrent, Transmission, Deluge, rTorrent, SABnzbd, NZBGet
- **Medienserver:** Plex, Jellyfin, Emby
- **Sources:** jeder Torznab- oder Newznab-Indexer, oder Prowlarr oder Jackett
- **Übernimmt dein Setup von:** Sonarr, Radarr, Lidarr, Prowlarr, Bazarr, Seerr, Overseerr, qBittorrent, SABnzbd
@@ -222,7 +222,7 @@ Die Images liegen auf Docker Hub als [`holyarrs/holyarrs`](https://hub.docker.co
| Tag | Dafür nutzen |
| :----: | --- |
| `latest` | Die neueste Version. |
-| `1.0.18` | Eine genaue Version. Sie ändert sich nie. |
+| `1.0.19` | Eine genaue Version. Sie ändert sich nie. |
## Verwendung
diff --git a/.github/readme/README.es.md b/.github/readme/README.es.md
index 943fb83..08d5120 100644
--- a/.github/readme/README.es.md
+++ b/.github/readme/README.es.md
@@ -21,9 +21,9 @@
<p align="center"><a href="https://news.ycombinator.com/item?id=50439000"><img src="https://hackergit.org/badge/HolyArrs/HolyArrs.svg?style=rank" alt="#1 on Show HN" width="250" height="55"></a></p>
> [!NOTE]
-> **HolyArrs 1.0.18: el nuevo aspecto Minimal**, con pósters pequeños y sin fotos grandes ni reproducción automática. Además, 8 arreglos, como el del anime que TMDB divide en dos partes. [Novedades](https://holyarrs.com/whats-new/)
+> **HolyArrs 1.0.19: rTorrent y ruTorrent como gestor de descargas**, también en seedboxes. Las descargas de Usenet terminadas ahora se mueven a tu biblioteca en vez de copiarse. [Novedades](https://holyarrs.com/whats-new/)
>
-> <img src="https://github.com/user-attachments/assets/f7e6987d-33eb-4fec-a8fe-ce2c2e264cdf" alt="HolyArrs 1.0.18" width="100%">
+> <img src="https://github.com/user-attachments/assets/3f087371-bae1-496e-bda8-77b9a97c59bf" alt="HolyArrs 1.0.19" width="100%">
> Cada póster, tráiler y puntuación de tu HolyArrs viene de un servidor que mantengo y pago yo mismo, para que siga siendo gratis para todos. Si HolyArrs hizo tu noche de películas un poco mejor, patrocinarlo mantiene las luces encendidas para todos 💛
>
@@ -152,7 +152,7 @@ Alguien pide un título. HolyArrs busca en tus Sources, elige el mejor lanzamien
<picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-dark.png"><img src="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-light.png" width="100%" alt="Descargadores: qBittorrent, Transmission, Deluge, SABnzbd, NZBGet. Servidores multimedia: Plex, Jellyfin, Emby." /></picture>
-- **Descargadores:** qBittorrent, Transmission, Deluge, SABnzbd, NZBGet
+- **Descargadores:** qBittorrent, Transmission, Deluge, rTorrent, SABnzbd, NZBGet
- **Servidores multimedia:** Plex, Jellyfin, Emby
- **Sources:** cualquier indexador Torznab o Newznab, o Prowlarr o Jackett
- **Trae tu configuración desde:** Sonarr, Radarr, Lidarr, Prowlarr, Bazarr, Seerr, Overseerr, qBittorrent, SABnzbd
@@ -222,7 +222,7 @@ Las imágenes están en Docker Hub como [`holyarrs/holyarrs`](https://hub.docker
| Etiqueta | Para qué sirve |
| :----: | --- |
| `latest` | La versión más reciente. |
-| `1.0.18` | Una versión exacta. Nunca se mueve. |
+| `1.0.19` | Una versión exacta. Nunca se mueve. |
## Uso
diff --git a/.github/readme/README.fr.md b/.github/readme/README.fr.md
index 84e3c1b..15946b7 100644
--- a/.github/readme/README.fr.md
+++ b/.github/readme/README.fr.md
@@ -21,9 +21,9 @@
<p align="center"><a href="https://news.ycombinator.com/item?id=50439000"><img src="https://hackergit.org/badge/HolyArrs/HolyArrs.svg?style=rank" alt="#1 on Show HN" width="250" height="55"></a></p>
> [!NOTE]
-> **HolyArrs 1.0.18 : le nouveau look Minimal**, avec de petites affiches, sans grandes photos ni lecture automatique. Et 8 correctifs, dont celui des animes que TMDB coupe en deux parties. [Quoi de neuf](https://holyarrs.com/whats-new/)
+> **HolyArrs 1.0.19 : rTorrent et ruTorrent comme client de téléchargement**, seedbox comprise. Les téléchargements Usenet terminés sont maintenant déplacés dans ta bibliothèque au lieu d'être copiés. [Quoi de neuf](https://holyarrs.com/whats-new/)
>
-> <img src="https://github.com/user-attachments/assets/f7e6987d-33eb-4fec-a8fe-ce2c2e264cdf" alt="HolyArrs 1.0.18" width="100%">
+> <img src="https://github.com/user-attachments/assets/3f087371-bae1-496e-bda8-77b9a97c59bf" alt="HolyArrs 1.0.19" width="100%">
> Chaque affiche, bande-annonce et note de ton HolyArrs vient d'un serveur que je fais tourner et que je paie moi-même, pour qu'il reste gratuit pour tout le monde. Si HolyArrs a rendu ta soirée film un peu meilleure, un sponsor garde la lumière allumée pour nous tous 💛
>
@@ -152,7 +152,7 @@ Quelqu'un demande un titre. HolyArrs cherche dans vos Sources, choisit la meille
<picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-dark.png"><img src="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-light.png" width="100%" alt="Outils de téléchargement : qBittorrent, Transmission, Deluge, SABnzbd, NZBGet. Serveurs multimédias : Plex, Jellyfin, Emby." /></picture>
-- **Outils de téléchargement :** qBittorrent, Transmission, Deluge, SABnzbd, NZBGet
+- **Outils de téléchargement :** qBittorrent, Transmission, Deluge, rTorrent, SABnzbd, NZBGet
- **Serveurs multimédias :** Plex, Jellyfin, Emby
- **Sources :** n'importe quel indexeur Torznab ou Newznab, ou Prowlarr ou Jackett
- **Reprend votre configuration depuis :** Sonarr, Radarr, Lidarr, Prowlarr, Bazarr, Seerr, Overseerr, qBittorrent, SABnzbd
@@ -222,7 +222,7 @@ Les images sont sur Docker Hub sous le nom [`holyarrs/holyarrs`](https://hub.doc
| Étiquette | À utiliser pour |
| :----: | --- |
| `latest` | La version la plus récente. |
-| `1.0.18` | Une version précise. Elle ne bouge jamais. |
+| `1.0.19` | Une version précise. Elle ne bouge jamais. |
## Utilisation
diff --git a/.github/readme/README.hi.md b/.github/readme/README.hi.md
index 8ddc771..0e09464 100644
--- a/.github/readme/README.hi.md
+++ b/.github/readme/README.hi.md
@@ -21,9 +21,9 @@
<p align="center"><a href="https://news.ycombinator.com/item?id=50439000"><img src="https://hackergit.org/badge/HolyArrs/HolyArrs.svg?style=rank" alt="#1 on Show HN" width="250" height="55"></a></p>
> [!NOTE]
-> **HolyArrs 1.0.18: नया Minimal लुक**, छोटे पोस्टर, बिना बड़ी फ़ोटो और बिना ऑटोप्ले। साथ में 8 सुधार, जिनमें TMDB पर दो हिस्सों में बँटे एनीमे भी शामिल हैं। [क्या नया है](https://holyarrs.com/whats-new/)
+> **HolyArrs 1.0.19: डाउनलोडर के तौर पर rTorrent और ruTorrent**, सीडबॉक्स पर भी। पूरे हुए Usenet डाउनलोड अब कॉपी होने के बजाय आपकी लाइब्रेरी में मूव होते हैं। [क्या नया है](https://holyarrs.com/whats-new/)
>
-> <img src="https://github.com/user-attachments/assets/f7e6987d-33eb-4fec-a8fe-ce2c2e264cdf" alt="HolyArrs 1.0.18" width="100%">
+> <img src="https://github.com/user-attachments/assets/3f087371-bae1-496e-bda8-77b9a97c59bf" alt="HolyArrs 1.0.19" width="100%">
> आपके HolyArrs का हर पोस्टर, ट्रेलर और स्कोर एक ऐसे सर्वर से आता है जिसे मैं खुद चलाता हूँ और जिसका खर्च खुद उठाता हूँ, ताकि यह सबके लिए मुफ़्त रहे। अगर HolyArrs ने आपकी मूवी नाइट थोड़ी बेहतर बनाई है, तो स्पॉन्सर बनकर हम सबके लिए यह रोशनी जलाए रखिए 💛
>
@@ -152,7 +152,7 @@ docker compose up -d
<picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-dark.png"><img src="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-light.png" width="100%" alt="डाउनलोडर: qBittorrent, Transmission, Deluge, SABnzbd, NZBGet। मीडिया सर्वर: Plex, Jellyfin, Emby।" /></picture>
-- **डाउनलोडर:** qBittorrent, Transmission, Deluge, SABnzbd, NZBGet
+- **डाउनलोडर:** qBittorrent, Transmission, Deluge, rTorrent, SABnzbd, NZBGet
- **मीडिया सर्वर:** Plex, Jellyfin, Emby
- **Sources:** कोई भी Torznab या Newznab इंडेक्सर, या Prowlarr या Jackett
- **इनसे सेटअप लाया जा सकता है:** Sonarr, Radarr, Lidarr, Prowlarr, Bazarr, Seerr, Overseerr, qBittorrent, SABnzbd
@@ -222,7 +222,7 @@ NAS पर चला रहे हैं? देखिए [Unraid, Synology औ
| टैग | किसके लिए |
| :----: | --- |
| `latest` | नवीनतम रिलीज़। |
-| `1.0.18` | एक तय वर्ज़न। यह कभी नहीं बदलता। |
+| `1.0.19` | एक तय वर्ज़न। यह कभी नहीं बदलता। |
## इस्तेमाल
diff --git a/.github/readme/README.it.md b/.github/readme/README.it.md
index 3697292..1b328e3 100644
--- a/.github/readme/README.it.md
+++ b/.github/readme/README.it.md
@@ -21,9 +21,9 @@
<p align="center"><a href="https://news.ycombinator.com/item?id=50439000"><img src="https://hackergit.org/badge/HolyArrs/HolyArrs.svg?style=rank" alt="#1 on Show HN" width="250" height="55"></a></p>
> [!NOTE]
-> **HolyArrs 1.0.18: il nuovo aspetto Minimal**, con locandine piccole e senza foto grandi né riproduzione automatica. In più 8 correzioni, tra cui gli anime che TMDB divide in due parti. [Novità](https://holyarrs.com/whats-new/)
+> **HolyArrs 1.0.19: rTorrent e ruTorrent come downloader**, anche su seedbox. I download Usenet finiti ora vengono spostati nella tua libreria invece di essere copiati. [Novità](https://holyarrs.com/whats-new/)
>
-> <img src="https://github.com/user-attachments/assets/f7e6987d-33eb-4fec-a8fe-ce2c2e264cdf" alt="HolyArrs 1.0.18" width="100%">
+> <img src="https://github.com/user-attachments/assets/3f087371-bae1-496e-bda8-77b9a97c59bf" alt="HolyArrs 1.0.19" width="100%">
> Ogni locandina, trailer e voto del tuo HolyArrs arriva da un server che gestisco e pago di tasca mia, così resta gratis per tutti. Se HolyArrs ha reso la tua serata film un po' più bella, una sponsorizzazione tiene le luci accese per tutti noi 💛
>
@@ -152,7 +152,7 @@ Qualcuno richiede un titolo. HolyArrs cerca nelle tue Fonti, sceglie la release
<picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-dark.png"><img src="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-light.png" width="100%" alt="Downloader: qBittorrent, Transmission, Deluge, SABnzbd, NZBGet. Server multimediali: Plex, Jellyfin, Emby." /></picture>
-- **Downloader:** qBittorrent, Transmission, Deluge, SABnzbd, NZBGet
+- **Downloader:** qBittorrent, Transmission, Deluge, rTorrent, SABnzbd, NZBGet
- **Server multimediali:** Plex, Jellyfin, Emby
- **Fonti:** qualsiasi indexer Torznab o Newznab, oppure Prowlarr o Jackett
- **Porta con te la tua configurazione da:** Sonarr, Radarr, Lidarr, Prowlarr, Bazarr, Seerr, Overseerr, qBittorrent, SABnzbd
@@ -222,7 +222,7 @@ Le immagini sono su Docker Hub come [`holyarrs/holyarrs`](https://hub.docker.com
| Tag | A cosa serve |
| :----: | --- |
| `latest` | La versione più recente. |
-| `1.0.18` | Una versione esatta. Non cambia mai. |
+| `1.0.19` | Una versione esatta. Non cambia mai. |
## Utilizzo
diff --git a/.github/readme/README.ja.md b/.github/readme/README.ja.md
index a4611c6..40213bf 100644
--- a/.github/readme/README.ja.md
+++ b/.github/readme/README.ja.md
@@ -21,9 +21,9 @@
<p align="center"><a href="https://news.ycombinator.com/item?id=50439000"><img src="https://hackergit.org/badge/HolyArrs/HolyArrs.svg?style=rank" alt="#1 on Show HN" width="250" height="55"></a></p>
> [!NOTE]
-> **HolyArrs 1.0.18: 新しい Minimal 表示。** 小さなポスターで、大きな写真も自動再生もありません。ほかに、TMDB で 2 つに分かれたアニメなど 8 件の修正。 [新着情報](https://holyarrs.com/whats-new/)
+> **HolyArrs 1.0.19: ダウンローダーとして rTorrent と ruTorrent に対応。** シードボックスも使えます。完了した Usenet のダウンロードは、コピーではなくライブラリへ移動するようになりました。 [新着情報](https://holyarrs.com/whats-new/)
>
-> <img src="https://github.com/user-attachments/assets/f7e6987d-33eb-4fec-a8fe-ce2c2e264cdf" alt="HolyArrs 1.0.18" width="100%">
+> <img src="https://github.com/user-attachments/assets/3f087371-bae1-496e-bda8-77b9a97c59bf" alt="HolyArrs 1.0.19" width="100%">
> HolyArrs のポスター、予告編、スコアはすべて、私が自分で運営し費用を払っているサーバーから届いています。だから誰でも無料で使えます。HolyArrs で映画の夜が少しでも楽しくなったなら、スポンサーになってみんなの明かりを灯し続けてください 💛
>
@@ -152,7 +152,7 @@ docker compose up -d
<picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-dark.png"><img src="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-light.png" width="100%" alt="ダウンローダー: qBittorrent、Transmission、Deluge、SABnzbd、NZBGet。メディアサーバー: Plex、Jellyfin、Emby。" /></picture>
-- **ダウンローダー:** qBittorrent、Transmission、Deluge、SABnzbd、NZBGet
+- **ダウンローダー:** qBittorrent、Transmission、Deluge、rTorrent、SABnzbd、NZBGet
- **メディアサーバー:** Plex、Jellyfin、Emby
- **Sources:** Torznab または Newznab のインデクサー、あるいは Prowlarr や Jackett
- **設定を引き継げる元:** Sonarr、Radarr、Lidarr、Prowlarr、Bazarr、Seerr、Overseerr、qBittorrent、SABnzbd
@@ -222,7 +222,7 @@ NAS をお使いですか。[Unraid、Synology などの NAS](https://docs.HolyA
| タグ | 用途 |
| :----: | --- |
| `latest` | 最新のリリース。 |
-| `1.0.18` | 特定の1つのバージョンです。動くことはありません。 |
+| `1.0.19` | 特定の1つのバージョンです。動くことはありません。 |
## 使い方
diff --git a/.github/readme/README.ko.md b/.github/readme/README.ko.md
index 57a2383..26d92af 100644
--- a/.github/readme/README.ko.md
+++ b/.github/readme/README.ko.md
@@ -21,9 +21,9 @@
<p align="center"><a href="https://news.ycombinator.com/item?id=50439000"><img src="https://hackergit.org/badge/HolyArrs/HolyArrs.svg?style=rank" alt="#1 on Show HN" width="250" height="55"></a></p>
> [!NOTE]
-> **HolyArrs 1.0.18: 새로운 Minimal 보기.** 작은 포스터에 큰 사진과 자동 재생이 없어요. 그 밖에 TMDB에서 두 부분으로 나뉜 애니메이션 등 8가지 수정. [새 소식](https://holyarrs.com/whats-new/)
+> **HolyArrs 1.0.19: 다운로더로 rTorrent와 ruTorrent 지원.** 시드박스도 돼요. 다 받은 Usenet 다운로드는 이제 복사하지 않고 라이브러리로 옮겨요. [새 소식](https://holyarrs.com/whats-new/)
>
-> <img src="https://github.com/user-attachments/assets/f7e6987d-33eb-4fec-a8fe-ce2c2e264cdf" alt="HolyArrs 1.0.18" width="100%">
+> <img src="https://github.com/user-attachments/assets/3f087371-bae1-496e-bda8-77b9a97c59bf" alt="HolyArrs 1.0.19" width="100%">
> HolyArrs의 모든 포스터, 예고편, 평점은 제가 직접 운영하고 비용을 내는 서버에서 와요. 그래서 모두에게 무료로 유지돼요. HolyArrs 덕분에 영화 보는 밤이 조금 더 즐거워졌다면, 후원으로 우리 모두의 불을 계속 밝혀 주세요 💛
>
@@ -152,7 +152,7 @@ docker compose up -d
<picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-dark.png"><img src="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-light.png" width="100%" alt="다운로더: qBittorrent, Transmission, Deluge, SABnzbd, NZBGet. 미디어 서버: Plex, Jellyfin, Emby." /></picture>
-- **다운로더:** qBittorrent, Transmission, Deluge, SABnzbd, NZBGet
+- **다운로더:** qBittorrent, Transmission, Deluge, rTorrent, SABnzbd, NZBGet
- **미디어 서버:** Plex, Jellyfin, Emby
- **Sources:** Torznab이나 Newznab 인덱서, 또는 Prowlarr나 Jackett
- **설정을 옮겨 올 수 있는 앱:** Sonarr, Radarr, Lidarr, Prowlarr, Bazarr, Seerr, Overseerr, qBittorrent, SABnzbd
@@ -222,7 +222,7 @@ NAS를 쓰세요? [Unraid, Synology 및 기타 NAS](https://docs.HolyArrs.com/ru
| 태그 | 용도 |
| :----: | --- |
| `latest` | 최신 릴리스. |
-| `1.0.18` | 정확히 한 버전이에요. 절대 움직이지 않아요. |
+| `1.0.19` | 정확히 한 버전이에요. 절대 움직이지 않아요. |
## 사용법
diff --git a/.github/readme/README.nl.md b/.github/readme/README.nl.md
index 433f9e6..ef5a39a 100644
--- a/.github/readme/README.nl.md
+++ b/.github/readme/README.nl.md
@@ -21,9 +21,9 @@
<p align="center"><a href="https://news.ycombinator.com/item?id=50439000"><img src="https://hackergit.org/badge/HolyArrs/HolyArrs.svg?style=rank" alt="#1 on Show HN" width="250" height="55"></a></p>
> [!NOTE]
-> **HolyArrs 1.0.18: de nieuwe Minimal-look**, met kleine posters en zonder grote foto's of autoplay. Plus 8 oplossingen, zoals voor anime die TMDB in twee delen splitst. [Wat is er nieuw](https://holyarrs.com/whats-new/)
+> **HolyArrs 1.0.19: rTorrent en ruTorrent als downloader**, ook op een seedbox. Afgeronde Usenet-downloads worden nu naar je bibliotheek verplaatst in plaats van gekopieerd. [Wat is er nieuw](https://holyarrs.com/whats-new/)
>
-> <img src="https://github.com/user-attachments/assets/f7e6987d-33eb-4fec-a8fe-ce2c2e264cdf" alt="HolyArrs 1.0.18" width="100%">
+> <img src="https://github.com/user-attachments/assets/3f087371-bae1-496e-bda8-77b9a97c59bf" alt="HolyArrs 1.0.19" width="100%">
> Elke poster, trailer en score in je HolyArrs komt van een server die ik zelf draai en betaal, zodat het voor iedereen gratis blijft. Heeft HolyArrs je filmavond een beetje beter gemaakt? Met een sponsor blijven de lichten aan voor ons allemaal 💛
>
@@ -152,7 +152,7 @@ Iemand vraagt een titel aan. HolyArrs doorzoekt je bronnen, kiest met je keuzere
<picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-dark.png"><img src="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-light.png" width="100%" alt="Downloaders: qBittorrent, Transmission, Deluge, SABnzbd, NZBGet. Mediaservers: Plex, Jellyfin, Emby." /></picture>
-- **Downloaders:** qBittorrent, Transmission, Deluge, SABnzbd, NZBGet
+- **Downloaders:** qBittorrent, Transmission, Deluge, rTorrent, SABnzbd, NZBGet
- **Mediaservers:** Plex, Jellyfin, Emby
- **Bronnen:** elke Torznab- of Newznab-indexer, of Prowlarr of Jackett
- **Neemt je setup over van:** Sonarr, Radarr, Lidarr, Prowlarr, Bazarr, Seerr, Overseerr, qBittorrent, SABnzbd
@@ -222,7 +222,7 @@ De images staan op Docker Hub als [`holyarrs/holyarrs`](https://hub.docker.com/r
| Tag | Gebruik het voor |
| :----: | --- |
| `latest` | De nieuwste versie. |
-| `1.0.18` | Eén exacte versie. Die verandert nooit. |
+| `1.0.19` | Eén exacte versie. Die verandert nooit. |
## Gebruik
diff --git a/.github/readme/README.pl.md b/.github/readme/README.pl.md
index 4e6257c..8244ea5 100644
--- a/.github/readme/README.pl.md
+++ b/.github/readme/README.pl.md
@@ -21,9 +21,9 @@
<p align="center"><a href="https://news.ycombinator.com/item?id=50439000"><img src="https://hackergit.org/badge/HolyArrs/HolyArrs.svg?style=rank" alt="#1 on Show HN" width="250" height="55"></a></p>
> [!NOTE]
-> **HolyArrs 1.0.18: nowy wygląd Minimal**, z małymi plakatami, bez dużych zdjęć i autoodtwarzania. Do tego 8 poprawek, m.in. dla anime, które TMDB dzieli na dwie części. [Co nowego](https://holyarrs.com/whats-new/)
+> **HolyArrs 1.0.19: rTorrent i ruTorrent jako klient pobierania**, także na seedboksie. Ukończone pobrania z Usenetu są teraz przenoszone do biblioteki zamiast kopiowane. [Co nowego](https://holyarrs.com/whats-new/)
>
-> <img src="https://github.com/user-attachments/assets/f7e6987d-33eb-4fec-a8fe-ce2c2e264cdf" alt="HolyArrs 1.0.18" width="100%">
+> <img src="https://github.com/user-attachments/assets/3f087371-bae1-496e-bda8-77b9a97c59bf" alt="HolyArrs 1.0.19" width="100%">
> Każdy plakat, zwiastun i ocena w twoim HolyArrs pochodzą z serwera, który sam utrzymuję i opłacam, żeby był darmowy dla wszystkich. Jeśli HolyArrs choć trochę umilił ci wieczór z filmem, sponsoring pozwala utrzymać to światło dla nas wszystkich 💛
>
@@ -152,7 +152,7 @@ Ktoś prosi o tytuł. HolyArrs przeszukuje twoje źródła, wybiera najlepszy re
<picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-dark.png"><img src="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-light.png" width="100%" alt="Downloadery: qBittorrent, Transmission, Deluge, SABnzbd, NZBGet. Serwery multimediów: Plex, Jellyfin, Emby." /></picture>
-- **Downloadery:** qBittorrent, Transmission, Deluge, SABnzbd, NZBGet
+- **Downloadery:** qBittorrent, Transmission, Deluge, rTorrent, SABnzbd, NZBGet
- **Serwery multimediów:** Plex, Jellyfin, Emby
- **Źródła:** dowolny indekser Torznab lub Newznab albo Prowlarr czy Jackett
- **Przenosi konfigurację z:** Sonarr, Radarr, Lidarr, Prowlarr, Bazarr, Seerr, Overseerr, qBittorrent, SABnzbd
@@ -222,7 +222,7 @@ Image'e są na Docker Hub jako [`holyarrs/holyarrs`](https://hub.docker.com/r/ho
| Tag | Do czego użyć |
| :----: | --- |
| `latest` | Najnowsza wersja. |
-| `1.0.18` | Jedna dokładna wersja. Nigdy się nie zmienia. |
+| `1.0.19` | Jedna dokładna wersja. Nigdy się nie zmienia. |
## Użycie
diff --git a/.github/readme/README.pt-BR.md b/.github/readme/README.pt-BR.md
index 3c128ce..ded1a2e 100644
--- a/.github/readme/README.pt-BR.md
+++ b/.github/readme/README.pt-BR.md
@@ -21,9 +21,9 @@
<p align="center"><a href="https://news.ycombinator.com/item?id=50439000"><img src="https://hackergit.org/badge/HolyArrs/HolyArrs.svg?style=rank" alt="#1 on Show HN" width="250" height="55"></a></p>
> [!NOTE]
-> **HolyArrs 1.0.18: o novo visual Minimal**, com pôsteres pequenos e sem fotos grandes nem reprodução automática. E mais 8 correções, como a dos animes que o TMDB divide em duas partes. [Novidades](https://holyarrs.com/whats-new/)
+> **HolyArrs 1.0.19: rTorrent e ruTorrent como gerenciador de downloads**, inclusive em seedbox. Downloads da Usenet concluídos agora são movidos para sua biblioteca em vez de copiados. [Novidades](https://holyarrs.com/whats-new/)
>
-> <img src="https://github.com/user-attachments/assets/f7e6987d-33eb-4fec-a8fe-ce2c2e264cdf" alt="HolyArrs 1.0.18" width="100%">
+> <img src="https://github.com/user-attachments/assets/3f087371-bae1-496e-bda8-77b9a97c59bf" alt="HolyArrs 1.0.19" width="100%">
> Cada pôster, trailer e nota do seu HolyArrs vem de um servidor que eu mantenho e pago do meu bolso, para que continue grátis para todo mundo. Se o HolyArrs deixou sua noite de filme um pouco melhor, patrocinar mantém as luzes acesas para todos nós 💛
>
@@ -152,7 +152,7 @@ Alguém pede um título. O HolyArrs busca nos seus Sources, escolhe o melhor rel
<picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-dark.png"><img src="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-light.png" width="100%" alt="Downloaders: qBittorrent, Transmission, Deluge, SABnzbd, NZBGet. Servidores de mídia: Plex, Jellyfin, Emby." /></picture>
-- **Downloaders:** qBittorrent, Transmission, Deluge, SABnzbd, NZBGet
+- **Downloaders:** qBittorrent, Transmission, Deluge, rTorrent, SABnzbd, NZBGet
- **Servidores de mídia:** Plex, Jellyfin, Emby
- **Sources:** qualquer indexador Torznab ou Newznab, ou Prowlarr ou Jackett
- **Traz sua configuração de:** Sonarr, Radarr, Lidarr, Prowlarr, Bazarr, Seerr, Overseerr, qBittorrent, SABnzbd
@@ -222,7 +222,7 @@ As imagens ficam no Docker Hub como [`holyarrs/holyarrs`](https://hub.docker.com
| Tag | Use para |
| :----: | --- |
| `latest` | A versão mais recente. |
-| `1.0.18` | Uma versão exata. Nunca muda. |
+| `1.0.19` | Uma versão exata. Nunca muda. |
## Uso
diff --git a/.github/readme/README.ru.md b/.github/readme/README.ru.md
index d2b0131..f1727c1 100644
--- a/.github/readme/README.ru.md
+++ b/.github/readme/README.ru.md
@@ -21,9 +21,9 @@
<p align="center"><a href="https://news.ycombinator.com/item?id=50439000"><img src="https://hackergit.org/badge/HolyArrs/HolyArrs.svg?style=rank" alt="#1 on Show HN" width="250" height="55"></a></p>
> [!NOTE]
-> **HolyArrs 1.0.18: новый вид Minimal**, с маленькими постерами, без больших фото и автовоспроизведения. И ещё 8 исправлений, в том числе для аниме, которое TMDB делит на две части. [Что нового](https://holyarrs.com/whats-new/)
+> **HolyArrs 1.0.19: rTorrent и ruTorrent как загрузчик**, в том числе на сидбоксе. Готовые загрузки из Usenet теперь перемещаются в библиотеку, а не копируются. [Что нового](https://holyarrs.com/whats-new/)
>
-> <img src="https://github.com/user-attachments/assets/f7e6987d-33eb-4fec-a8fe-ce2c2e264cdf" alt="HolyArrs 1.0.18" width="100%">
+> <img src="https://github.com/user-attachments/assets/3f087371-bae1-496e-bda8-77b9a97c59bf" alt="HolyArrs 1.0.19" width="100%">
> Каждый постер, трейлер и оценка в твоём HolyArrs приходят с сервера, который я держу и оплачиваю сам, чтобы он оставался бесплатным для всех. Если HolyArrs сделал твой киновечер чуть лучше, спонсорство помогает держать свет включённым для всех нас 💛
>
@@ -152,7 +152,7 @@ docker compose up -d
<picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-dark.png"><img src="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-light.png" width="100%" alt="Загрузчики: qBittorrent, Transmission, Deluge, SABnzbd, NZBGet. Медиасерверы: Plex, Jellyfin, Emby." /></picture>
-- **Загрузчики:** qBittorrent, Transmission, Deluge, SABnzbd, NZBGet
+- **Загрузчики:** qBittorrent, Transmission, Deluge, rTorrent, SABnzbd, NZBGet
- **Медиасерверы:** Plex, Jellyfin, Emby
- **Sources:** любой индексер Torznab или Newznab, а также Prowlarr или Jackett
- **Переносит настройки из:** Sonarr, Radarr, Lidarr, Prowlarr, Bazarr, Seerr, Overseerr, qBittorrent, SABnzbd
@@ -222,7 +222,7 @@ HolyArrs только читает ваши старые приложения и
| Тег | Для чего |
| :----: | --- |
| `latest` | Самая новая версия. |
-| `1.0.18` | Одна точная версия. Никогда не сдвигается. |
+| `1.0.19` | Одна точная версия. Никогда не сдвигается. |
## Использование
diff --git a/.github/readme/README.tr.md b/.github/readme/README.tr.md
index cd4931d..4697f73 100644
--- a/.github/readme/README.tr.md
+++ b/.github/readme/README.tr.md
@@ -21,9 +21,9 @@
<p align="center"><a href="https://news.ycombinator.com/item?id=50439000"><img src="https://hackergit.org/badge/HolyArrs/HolyArrs.svg?style=rank" alt="#1 on Show HN" width="250" height="55"></a></p>
> [!NOTE]
-> **HolyArrs 1.0.18: yeni Minimal görünüm**; küçük afişler, büyük fotoğraf ve otomatik oynatma yok. Ayrıca TMDB'nin ikiye böldüğü animeler dahil 8 düzeltme. [Yenilikler](https://holyarrs.com/whats-new/)
+> **HolyArrs 1.0.19: İndirici olarak rTorrent ve ruTorrent**, seedbox'lar dahil. Biten Usenet indirmeleri artık kitaplığına kopyalanmak yerine taşınıyor. [Yenilikler](https://holyarrs.com/whats-new/)
>
-> <img src="https://github.com/user-attachments/assets/f7e6987d-33eb-4fec-a8fe-ce2c2e264cdf" alt="HolyArrs 1.0.18" width="100%">
+> <img src="https://github.com/user-attachments/assets/3f087371-bae1-496e-bda8-77b9a97c59bf" alt="HolyArrs 1.0.19" width="100%">
> HolyArrs'ındaki her afiş, fragman ve puan, kendim çalıştırıp ödediğim bir sunucudan geliyor; böylece herkes için ücretsiz kalıyor. HolyArrs film gecene biraz güzellik kattıysa, sponsor olmak hepimiz için ışıkları açık tutar 💛
>
@@ -152,7 +152,7 @@ Biri bir başlık ister. HolyArrs Kaynaklarını arar, Seçim kurallarınla en i
<picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-dark.png"><img src="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-light.png" width="100%" alt="İndiriciler: qBittorrent, Transmission, Deluge, SABnzbd, NZBGet. Medya sunucuları: Plex, Jellyfin, Emby." /></picture>
-- **İndiriciler:** qBittorrent, Transmission, Deluge, SABnzbd, NZBGet
+- **İndiriciler:** qBittorrent, Transmission, Deluge, rTorrent, SABnzbd, NZBGet
- **Medya sunucuları:** Plex, Jellyfin, Emby
- **Kaynaklar:** herhangi bir Torznab ya da Newznab indeksleyicisi, ya da Prowlarr veya Jackett
- **Kurulumunu şuradan taşır:** Sonarr, Radarr, Lidarr, Prowlarr, Bazarr, Seerr, Overseerr, qBittorrent, SABnzbd
@@ -222,7 +222,7 @@ NAS mı kullanıyorsun? [Unraid, Synology ve diğer NAS cihazları](https://docs
| Etiket | Ne için kullanılır |
| :----: | --- |
| `latest` | En yeni sürüm. |
-| `1.0.18` | Tam olarak tek bir sürüm. Asla değişmez. |
+| `1.0.19` | Tam olarak tek bir sürüm. Asla değişmez. |
## Kullanım
diff --git a/.github/readme/README.uk.md b/.github/readme/README.uk.md
index 1e0ceb9..7ee4f78 100644
--- a/.github/readme/README.uk.md
+++ b/.github/readme/README.uk.md
@@ -21,9 +21,9 @@
<p align="center"><a href="https://news.ycombinator.com/item?id=50439000"><img src="https://hackergit.org/badge/HolyArrs/HolyArrs.svg?style=rank" alt="#1 on Show HN" width="250" height="55"></a></p>
> [!NOTE]
-> **HolyArrs 1.0.18: новий вигляд Minimal**, з маленькими постерами, без великих фото й автовідтворення. І ще 8 виправлень, зокрема для аніме, яке TMDB ділить на дві частини. [Що нового](https://holyarrs.com/whats-new/)
+> **HolyArrs 1.0.19: rTorrent і ruTorrent як завантажувач**, зокрема на сідбоксі. Готові завантаження з Usenet тепер переміщуються в бібліотеку, а не копіюються. [Що нового](https://holyarrs.com/whats-new/)
>
-> <img src="https://github.com/user-attachments/assets/f7e6987d-33eb-4fec-a8fe-ce2c2e264cdf" alt="HolyArrs 1.0.18" width="100%">
+> <img src="https://github.com/user-attachments/assets/3f087371-bae1-496e-bda8-77b9a97c59bf" alt="HolyArrs 1.0.19" width="100%">
> Кожен постер, трейлер і оцінка у твоєму HolyArrs приходять із сервера, який я тримаю й оплачую сам, щоб він лишався безкоштовним для всіх. Якщо HolyArrs зробив твій кіновечір трохи кращим, спонсорство тримає світло увімкненим для всіх нас 💛
>
@@ -152,7 +152,7 @@ docker compose up -d
<picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-dark.png"><img src="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-light.png" width="100%" alt="Завантажувачі: qBittorrent, Transmission, Deluge, SABnzbd, NZBGet. Медіасервери: Plex, Jellyfin, Emby." /></picture>
-- **Завантажувачі:** qBittorrent, Transmission, Deluge, SABnzbd, NZBGet
+- **Завантажувачі:** qBittorrent, Transmission, Deluge, rTorrent, SABnzbd, NZBGet
- **Медіасервери:** Plex, Jellyfin, Emby
- **Джерела:** будь-який індексер Torznab або Newznab, а також Prowlarr чи Jackett
- **Переносить твої налаштування з:** Sonarr, Radarr, Lidarr, Prowlarr, Bazarr, Seerr, Overseerr, qBittorrent, SABnzbd
@@ -222,7 +222,7 @@ HolyArrs лише читає твої старі застосунки й ніч
| Тег | Для чого |
| :----: | --- |
| `latest` | Найновіша версія. |
-| `1.0.18` | Одна точна версія. Вона ніколи не змінюється. |
+| `1.0.19` | Одна точна версія. Вона ніколи не змінюється. |
## Використання
diff --git a/.github/readme/README.zh-CN.md b/.github/readme/README.zh-CN.md
index a77a00d..d578a42 100644
--- a/.github/readme/README.zh-CN.md
+++ b/.github/readme/README.zh-CN.md
@@ -21,9 +21,9 @@
<p align="center"><a href="https://news.ycombinator.com/item?id=50439000"><img src="https://hackergit.org/badge/HolyArrs/HolyArrs.svg?style=rank" alt="#1 on Show HN" width="250" height="55"></a></p>
> [!NOTE]
-> **HolyArrs 1.0.18:全新的 Minimal 外观**,小海报,没有大图,也不自动播放。另有 8 项修复,包括被 TMDB 分成两部分的动画。 [新功能](https://holyarrs.com/whats-new/)
+> **HolyArrs 1.0.19:支持 rTorrent 和 ruTorrent 作为下载器**,种子盒也可以。完成的 Usenet 下载现在会移动到媒体库,而不是复制。 [新功能](https://holyarrs.com/whats-new/)
>
-> <img src="https://github.com/user-attachments/assets/f7e6987d-33eb-4fec-a8fe-ce2c2e264cdf" alt="HolyArrs 1.0.18" width="100%">
+> <img src="https://github.com/user-attachments/assets/3f087371-bae1-496e-bda8-77b9a97c59bf" alt="HolyArrs 1.0.19" width="100%">
> 你的 HolyArrs 里每一张海报、每一段预告片和每一个评分,都来自我自己运营、自己付费的服务器,所以它对所有人都免费。如果 HolyArrs 让你的电影之夜更好了一点,赞助一下,就能为我们所有人留着这盏灯 💛
>
@@ -152,7 +152,7 @@ docker compose up -d
<picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-dark.png"><img src="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-light.png" width="100%" alt="下载器:qBittorrent、Transmission、Deluge、SABnzbd、NZBGet。媒体服务器:Plex、Jellyfin、Emby。" /></picture>
-- **下载器:** qBittorrent、Transmission、Deluge、SABnzbd、NZBGet
+- **下载器:** qBittorrent、Transmission、Deluge、rTorrent、SABnzbd、NZBGet
- **媒体服务器:** Plex、Jellyfin、Emby
- **Sources:** 任何 Torznab 或 Newznab 索引器,或者 Prowlarr、Jackett
- **可从这些应用迁移设置:** Sonarr、Radarr、Lidarr、Prowlarr、Bazarr、Seerr、Overseerr、qBittorrent、SABnzbd
@@ -222,7 +222,7 @@ HolyArrs 只读取你的旧应用,不会改动它们里面的任何东西,
| 标签 | 用途 |
| :----: | --- |
| `latest` | 最新版本。 |
-| `1.0.18` | 固定的某一个版本,永远不会变。 |
+| `1.0.19` | 固定的某一个版本,永远不会变。 |
## 用法
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 469cebb..ebf0a77 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,19 @@
All notable changes to HolyArrs are listed here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow [Semantic Versioning](https://semver.org/).
+## 1.0.19
+
+### Added
+
+- rTorrent and ruTorrent work as a Downloader, seedboxes too. ([#199](https://github.com/HolyArrs/HolyArrs/issues/199))
+
+### Fixed
+
+- Finished Usenet downloads move into the Library, and copies write each file once. ([#240](https://github.com/HolyArrs/HolyArrs/issues/240))
+- Downloads tabs count every torrent, and Show more works under each filter. ([#245](https://github.com/HolyArrs/HolyArrs/issues/245))
+- Free space on Downloads matches what qBittorrent and SABnzbd report. ([#246](https://github.com/HolyArrs/HolyArrs/issues/246))
+- A shared SABnzbd no longer asks you to match other apps' downloads. ([#248](https://github.com/HolyArrs/HolyArrs/issues/248))
+
## 1.0.18
### Added
diff --git a/README.md b/README.md
index 7e5bde1..5e3a31d 100644
--- a/README.md
+++ b/README.md
@@ -21,9 +21,9 @@
<p align="center"><a href="https://news.ycombinator.com/item?id=50439000"><img src="https://hackergit.org/badge/HolyArrs/HolyArrs.svg?style=rank" alt="#1 on Show HN" width="250" height="55"></a></p>
> [!NOTE]
-> **HolyArrs 1.0.18: a new Minimal look**, with small posters and no big photos or autoplay. Plus 8 fixes, including anime that TMDB splits into two parts. [See what's new](https://holyarrs.com/whats-new/)
+> **HolyArrs 1.0.19: rTorrent and ruTorrent as a Downloader**, seedboxes too. Finished Usenet downloads now move into your Library instead of being copied. [See what's new](https://holyarrs.com/whats-new/)
>
-> <img src="https://github.com/user-attachments/assets/f7e6987d-33eb-4fec-a8fe-ce2c2e264cdf" alt="HolyArrs 1.0.18" width="100%">
+> <img src="https://github.com/user-attachments/assets/3f087371-bae1-496e-bda8-77b9a97c59bf" alt="HolyArrs 1.0.19" width="100%">
> Every poster, trailer and score in your HolyArrs comes from a server I run and pay for myself, so it stays free for everyone. If HolyArrs made movie night a little better, a sponsor keeps the lights on for all of us 💛
>
@@ -152,7 +152,7 @@ Someone asks for a title. HolyArrs searches your Sources, picks the best release
<picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-dark.png"><img src="https://raw.githubusercontent.com/HolyArrs/.github/main/profile/works-light.png" width="100%" alt="Downloaders: qBittorrent, Transmission, Deluge, SABnzbd, NZBGet. Media servers: Plex, Jellyfin, Emby." /></picture>
-- **Downloaders:** qBittorrent, Transmission, Deluge, SABnzbd, NZBGet
+- **Downloaders:** qBittorrent, Transmission, Deluge, rTorrent, SABnzbd, NZBGet
- **Media servers:** Plex, Jellyfin, Emby
- **Sources:** any Torznab or Newznab indexer, or Prowlarr or Jackett
- **Moves your setup from:** Sonarr, Radarr, Lidarr, Prowlarr, Bazarr, Seerr, Overseerr, qBittorrent, SABnzbd
@@ -222,7 +222,7 @@ Images live on Docker Hub as [`holyarrs/holyarrs`](https://hub.docker.com/r/holy
| Tag | Use it for |
| :----: | --- |
| `latest` | The newest release. |
-| `1.0.18` | One exact version. It never moves. |
+| `1.0.19` | One exact version. It never moves. |
## Usage
diff --git a/VERSION b/VERSION
index f8f3c08..140333f 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.0.18
+1.0.19
diff --git a/app/backend/cmd/holyarrs/downloads_pin_test.go b/app/backend/cmd/holyarrs/downloads_pin_test.go
index d96d8ac..af8d241 100644
--- a/app/backend/cmd/holyarrs/downloads_pin_test.go
+++ b/app/backend/cmd/holyarrs/downloads_pin_test.go
@@ -238,7 +238,7 @@ func TestDlPinDownloadsViewShape(t *testing.T) {
keys = append(keys, k)
}
sort.Strings(keys)
- if got := strings.Join(keys, ","); got != "clients,downloads,next_cursor,outside_total,totals" {
+ if got := strings.Join(keys, ","); got != "clients,downloads,next_cursor,outside_rest,outside_total,totals" {
t.Fatalf("top-level keys %s", got)
}
var rows []map[string]any
diff --git a/app/backend/cmd/holyarrs/lab_rtorrent_test.go b/app/backend/cmd/holyarrs/lab_rtorrent_test.go
new file mode 100644
index 0000000..1df6c7e
--- /dev/null
+++ b/app/backend/cmd/holyarrs/lab_rtorrent_test.go
@@ -0,0 +1,193 @@
+//go:build lab
+
+package main
+
+import (
+ "context"
+ "database/sql"
+ "encoding/json"
+ "net/http"
+ "net/http/httptest"
+ "os"
+ "path/filepath"
+ "strings"
+ "testing"
+ "time"
+
+ "github.com/HolyArrs/holyarrs/app/backend/internal/core/database"
+ domain "github.com/HolyArrs/holyarrs/app/backend/internal/core/model"
+ "github.com/HolyArrs/holyarrs/app/backend/internal/downloads"
+ "github.com/HolyArrs/holyarrs/app/backend/internal/importer"
+ "github.com/HolyArrs/holyarrs/app/backend/internal/mediafiles"
+ "github.com/HolyArrs/holyarrs/app/backend/internal/metadata"
+)
+
+// TestLabRTorrentMovieZeroToDone follows the lab's own Dune test torrent from
+// a grab to Done through a real rTorrent:
+//
+// HOLYARRS_LAB_RTORRENT the XML-RPC address
+// HOLYARRS_LAB_RTORRENT_USER and HOLYARRS_LAB_RTORRENT_PASSWORD_FILE for a sign-in
+// HOLYARRS_LAB_RTORRENT_HERE rTorrent's /downloads as this test sees it (a path pair)
+// HOLYARRS_LAB_RTORRENT_TORRENT the lab's dune-part-two.torrent
+//
+// Its payload must already be in HERE/temp, so rTorrent finishes it by
+// checking the file. The torrent and its files are removed afterwards.
+func TestLabRTorrentMovieZeroToDone(t *testing.T) {
+ base, here, file := os.Getenv("HOLYARRS_LAB_RTORRENT"), os.Getenv("HOLYARRS_LAB_RTORRENT_HERE"), os.Getenv("HOLYARRS_LAB_RTORRENT_TORRENT")
+ if base == "" || here == "" || file == "" {
+ t.Skip("HOLYARRS_LAB_RTORRENT, _HERE and _TORRENT are not set")
+ }
+ torrent, err := os.ReadFile(file)
+ if err != nil {
+ t.Fatal(err)
+ }
+ pass := ""
+ if f := os.Getenv("HOLYARRS_LAB_RTORRENT_PASSWORD_FILE"); f != "" {
+ b, err := os.ReadFile(f)
+ if err != nil {
+ t.Fatal(err)
+ }
+ pass = strings.TrimSpace(string(b))
+ }
+ const hash = "29be7bfa8759643f2d5dac9f94d516c3378696ed"
+ const cat = "holyarrs-lab-rtorrent"
+ payload := filepath.Join(here, "temp", "Dune.Part.Two.2024.1080p.WEB.H264-HOLYARRS.mkv")
+ if _, err := os.Stat(payload); err != nil {
+ t.Fatalf("the payload is not in place: %v", err)
+ }
+ indexer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, _ = w.Write(torrent) }))
+ t.Cleanup(indexer.Close)
+
+ ctx := context.Background()
+ s, err := database.Open(t.TempDir(), database.Options{})
+ if err != nil {
+ t.Fatal(err)
+ }
+ t.Cleanup(func() { _ = s.Close() })
+ vault := map[int64]string{}
+ movies := t.TempDir()
+ var slotID, relID int64
+ var dl domain.Downloader
+ err = s.Write(ctx, func(tx *sql.Tx) error {
+ var pr int64
+ if err := tx.QueryRow("SELECT id FROM pick_rules LIMIT 1").Scan(&pr); err != nil {
+ return err
+ }
+ y := 2024
+ lf := &mediafiles.LibraryFolder{Path: movies, Kind: "movie", Label: "Movies", Health: "ok", SameDiskAs: []int64{}}
+ ti := &mediafiles.Title{Kind: "movie", GateDriver: "none", Name: "Dune: Part Two", SortName: "dune part two", Year: &y, Aliases: []string{},
+ SourceIDs: map[string]string{}, MetadataSource: "local", NewPartsPolicy: "all", ReleaseGate: "released", MusicTypes: []string{},
+ WhyAdded: "by_hand", Artwork: []string{}, Status: "released", State: "active", KeepUpToDate: true}
+ if _, err := database.Insert(tx, "library_folders", lf, domain.System); err != nil {
+ return err
+ }
+ if _, err := database.Insert(tx, "titles", ti, domain.System); err != nil {
+ return err
+ }
+ it := &mediafiles.Item{TitleID: ti.ID, Kind: "movie", KeepUpToDate: true}
+ if _, err := database.Insert(tx, "items", it, domain.System); err != nil {
+ return err
+ }
+ v := &mediafiles.Version{TitleID: ti.ID, Label: "HD", PickRulesID: pr, LibraryFolderID: lf.ID, FolderName: "Dune Part Two (2024)", IsMain: true, KeepUpToDate: true}
+ if _, err := database.Insert(tx, "versions", v, domain.System); err != nil {
+ return err
+ }
+ sl := &mediafiles.Slot{ItemID: it.ID, VersionID: v.ID, State: mediafiles.SlotChosen}
+ if _, err := database.Insert(tx, "slots", sl, domain.System); err != nil {
+ return err
+ }
+ src := &domain.Source{Name: "Lab", Protocol: "torrent", Format: "torznab", URL: indexer.URL + "/api", AllowLocal: true, Kinds: []string{}, Categories: map[string][]int{},
+ State: "enabled", Extra: map[string]string{}}
+ if _, err := database.Insert(tx, "sources", src, domain.System); err != nil {
+ return err
+ }
+ h := hash
+ rel := &domain.Release{SourceID: src.ID, Name: "Dune.Part.Two.2024.1080p.WEB.H264-HOLYARRS", LinkRef: indexer.URL + "/dune-part-two.torrent",
+ Protocol: "torrent", Size: 29588180, InfoHash: &h, Flags: []string{}, Parsed: map[string]any{}, MatchedSlotIDs: []int64{sl.ID},
+ Verdict: map[string]any{}, FoundBy: "auto_search", State: "chosen"}
+ if _, err := database.Insert(tx, "releases", rel, domain.System); err != nil {
+ return err
+ }
+ if _, err := tx.Exec("UPDATE slots SET chosen_release_id = ? WHERE id = ?", rel.ID, sl.ID); err != nil {
+ return err
+ }
+ dl = domain.Downloader{Name: "Lab rTorrent", Adapter: "rtorrent", Protocol: "torrent", URL: base, Username: os.Getenv("HOLYARRS_LAB_RTORRENT_USER"),
+ Category: cat, Priority: 1, PathMap: []domain.PathMap{{Theirs: "/downloads", Ours: here}}, AfterImport: "leave", State: "ok", AllowLocal: true}
+ if pass != "" {
+ ref := int64(1)
+ dl.SecretRef, vault[ref] = &ref, pass
+ }
+ if _, err := database.Insert(tx, "downloaders", &dl, domain.System); err != nil {
+ return err
+ }
+ slotID, relID = sl.ID, rel.ID
+ return nil
+ })
+ if err != nil {
+ t.Fatal(err)
+ }
+ im := &importer.Importer{Store: s}
+ m := &downloads.Manager{Store: s, SavePath: "/data/downloads", FromVault: func(_ context.Context, id int64) (string, error) { return vault[id], nil }}
+ srv := httptest.NewServer(routes(buildHandlers(services{Store: s, Metadata: metadata.Lab(), Version: "lab", Downloads: m}), config{}))
+ t.Cleanup(srv.Close)
+ view := func() downloads.DownloadRow {
+ var out struct {
+ Downloads []downloads.DownloadRow `json:"downloads"`
+ }
+ _ = json.Unmarshal(do(t, "GET", srv.URL+"/api/v1/downloads/view", "", 200), &out)
+ if len(out.Downloads) != 1 {
+ t.Fatalf("rows %+v", out.Downloads)
+ }
+ return out.Downloads[0]
+ }
+
+ id, err := m.Grab(ctx, slotID, relID, domain.System)
+ if err != nil {
+ t.Fatal(err)
+ }
+ e, err := m.EngineFor(ctx, dl)
+ if err != nil {
+ t.Fatal(err)
+ }
+ t.Cleanup(func() { _ = e.Remove(context.Background(), hash, true) })
+ seen := []string{view().Phase}
+ deadline := time.Now().Add(3 * time.Minute)
+ for {
+ if _, err := m.SyncOnce(ctx); err != nil {
+ t.Fatal(err)
+ }
+ r := view()
+ if seen[len(seen)-1] != r.Phase {
+ seen = append(seen, r.Phase)
+ }
+ if r.Phase == "waiting_to_import" {
+ break
+ }
+ if r.Phase == "failed" || r.Phase == "vanished" || time.Now().After(deadline) {
+ t.Fatalf("phases %v, last %+v", seen, r)
+ }
+ time.Sleep(time.Second)
+ }
+ imp, err := im.Import(ctx, id, false, domain.System)
+ if err != nil {
+ t.Fatal(err)
+ }
+ r := view()
+ seen = append(seen, r.Phase)
+ var st string
+ _ = s.Read().QueryRow("SELECT state FROM slots WHERE id = ?", slotID).Scan(&st)
+ if r.Phase != "done" || r.Label != "Done" || (st != string(mediafiles.SlotInLibrary) && st != string(mediafiles.SlotBetterWanted)) {
+ t.Fatalf("after import %s: slot %s, row %+v, phases %v", imp.State, st, r, seen)
+ }
+ placed := 0
+ _ = filepath.WalkDir(movies, func(p string, d os.DirEntry, err error) error {
+ if err == nil && !d.IsDir() && strings.HasSuffix(p, ".mkv") {
+ placed++
+ }
+ return nil
+ })
+ if placed != 1 {
+ t.Errorf("%d video files in the Library folder", placed)
+ }
+ t.Logf("0 -> done through the lab rTorrent: phases %v, import %s, slot %s, progress %.2f", seen, imp.State, st, r.Progress)
+}
diff --git a/app/backend/cmd/holyarrs/main.go b/app/backend/cmd/holyarrs/main.go
index 5eaf4fb..a24565a 100644
--- a/app/backend/cmd/holyarrs/main.go
+++ b/app/backend/cmd/holyarrs/main.go
@@ -386,6 +386,9 @@ func serve(ctx context.Context, c config, o runOpts) error {
}
// A finished Import: clear a Usenet download out of its Downloader.
im.OnImported = dm.ClearFinished
+ // Finished Usenet files move into the Library unless HolyArrs may not
+ // change that Downloader.
+ im.MayMove = func(d domain.Downloader) bool { return !downloads.ReadOnlyFor(d) }
// A failed Download: search its Slot for the next Release (a failed
// season pack: one season search for its episodes).
dm.OnFailed = func(ctx context.Context, slotID int64) {
@@ -583,7 +586,7 @@ func serve(ctx context.Context, c config, o runOpts) error {
return err
}
defer q.Stop()
- for p, label := range map[jobs.Pool]string{jobs.PoolCore: "Core workers", jobs.PoolIO: "Search and download workers", jobs.PoolHeavy: "Import and scan workers"} {
+ for p, label := range map[jobs.Pool]string{jobs.PoolCore: "Core workers", jobs.PoolIO: "Search and download workers", jobs.PoolHeavy: "Import and scan workers", jobs.PoolMigrate: "Import from other apps worker"} {
if pools[p] == 0 {
reg.Set(jobs.StageKey("jobs_"+string(p)), "stage", label, jobs.Off, notStarted)
continue
diff --git a/app/backend/cmd/holyarrs/openapi.json b/app/backend/cmd/holyarrs/openapi.json
index 8d19df1..9511af0 100644
--- a/app/backend/cmd/holyarrs/openapi.json
+++ b/app/backend/cmd/holyarrs/openapi.json
@@ -2080,7 +2080,8 @@
"sabnzbd",
"transmission",
"nzbget",
- "deluge"
+ "deluge",
+ "rtorrent"
],
"type": "string"
},
@@ -2102,7 +2103,7 @@
"type": "integer"
},
"secret": {
- "description": "the SABnzbd API key or the qBittorrent, Transmission, Deluge or NZBGet password; the masked value or empty keeps the stored one. Needed again when the address moves to another host.",
+ "description": "the SABnzbd API key or the qBittorrent, Transmission, Deluge, rTorrent or NZBGet password; the masked value or empty keeps the stored one. Needed again when the address moves to another host.",
"type": "string"
},
"tags": {
@@ -13100,7 +13101,7 @@
"x-holyarrs-scope": "read"
},
"post": {
- "description": "Adds qBittorrent, Transmission or Deluge for torrents, or SABnzbd or NZBGet for Usenet. The key or password goes to the vault. Needs a recent sign-in.",
+ "description": "Adds qBittorrent, Transmission, Deluge or rTorrent for torrents, or SABnzbd or NZBGet for Usenet. The key or password goes to the vault. Needs a recent sign-in.",
"operationId": "addDownloader",
"requestBody": {
"content": {
diff --git a/app/backend/cmd/holyarrs/supervise_test.go b/app/backend/cmd/holyarrs/supervise_test.go
index 7275b37..263136d 100644
--- a/app/backend/cmd/holyarrs/supervise_test.go
+++ b/app/backend/cmd/holyarrs/supervise_test.go
@@ -152,7 +152,7 @@ func TestEveryJobKindHasAPool(t *testing.T) {
func TestSafeModeStartsOnlyTheCore(t *testing.T) {
reg, addr := startApp(t, config{SafeMode: true}, runOpts{})
base := "http://" + addr
- for _, name := range []string{"schedules", "downloads", "stranded_imports", "gates", "wishlist", "jobs_io", "jobs_heavy", "media_servers"} {
+ for _, name := range []string{"schedules", "downloads", "stranded_imports", "gates", "wishlist", "jobs_io", "jobs_heavy", "jobs_migrate", "media_servers"} {
st, _ := reg.Get(jobs.StageKey(name))
if st.State != jobs.Off || !strings.Contains(st.Reason, "Safe mode") {
t.Errorf("%s: %+v", name, st)
diff --git a/app/backend/cmd/holyarrs/testdata/rdp_ai_tool_answers.golden.json b/app/backend/cmd/holyarrs/testdata/rdp_ai_tool_answers.golden.json
index ab303d9..412f0f4 100644
--- a/app/backend/cmd/holyarrs/testdata/rdp_ai_tool_answers.golden.json
+++ b/app/backend/cmd/holyarrs/testdata/rdp_ai_tool_answers.golden.json
@@ -11,6 +11,7 @@
"clients": [],
"downloads": [],
"next_cursor": "string",
+ "outside_rest": {},
"outside_total": "number",
"totals": {
"speed": "number",
diff --git a/app/backend/internal/core/database/downloaders_migration_test.go b/app/backend/internal/core/database/downloaders_migration_test.go
index cc4199b..bf49a0e 100644
--- a/app/backend/internal/core/database/downloaders_migration_test.go
+++ b/app/backend/internal/core/database/downloaders_migration_test.go
@@ -118,7 +118,7 @@ func TestOptionalDownloadersMigrationKeepsData(t *testing.T) {
if got := downloaderRows(t, s.Read(), "PRAGMA foreign_key_list(downloads)"); len(got) == 0 {
t.Fatal("dependent foreign key removed")
}
- for _, kind := range []string{"transmission", "nzbget", "deluge"} {
+ for _, kind := range []string{"transmission", "nzbget", "deluge", "rtorrent"} {
err = s.Write(context.Background(), func(tx *sql.Tx) error {
_, err := tx.Exec(`INSERT INTO downloaders(created_at,created_by,updated_at,updated_by,name,adapter,protocol,url) VALUES('t','{}','t','{}',?,?,?,'http://owned-fixture')`, kind, kind, map[bool]string{true: "usenet", false: "torrent"}[kind == "nzbget"])
return err
diff --git a/app/backend/internal/core/database/migrations/main/0106_rtorrent_downloader.sql b/app/backend/internal/core/database/migrations/main/0106_rtorrent_downloader.sql
new file mode 100644
index 0000000..cc7c96e
--- /dev/null
+++ b/app/backend/internal/core/database/migrations/main/0106_rtorrent_downloader.sql
@@ -0,0 +1,61 @@
+-- holyarrs:foreign-key-rebuild
+-- Widen the adapter check to add rTorrent while preserving Downloader
+-- identities and every dependent Download. The runner pins one connection,
+-- disables FK enforcement outside the transaction, checks every FK before
+-- commit, then restores it.
+
+DROP TRIGGER import_created_downloader_resumed;
+DROP TRIGGER import_created_downloader_gone;
+
+CREATE TABLE downloaders_new (
+ id INTEGER PRIMARY KEY,
+ created_at TEXT NOT NULL, created_by TEXT NOT NULL,
+ updated_at TEXT NOT NULL, updated_by TEXT NOT NULL,
+ name TEXT NOT NULL UNIQUE,
+ adapter TEXT NOT NULL CHECK (adapter IN ('qbittorrent', 'sabnzbd', 'transmission', 'nzbget', 'deluge', 'rtorrent')),
+ protocol TEXT NOT NULL CHECK (protocol IN ('torrent', 'usenet')),
+ url TEXT NOT NULL,
+ secret_ref INTEGER,
+ category TEXT NOT NULL DEFAULT 'holyarrs',
+ priority INTEGER NOT NULL DEFAULT 1,
+ path_map TEXT NOT NULL DEFAULT '[]',
+ after_import TEXT NOT NULL DEFAULT 'leave' CHECK (after_import IN ('leave', 'remove', 'recategorize')),
+ seed_goal TEXT NOT NULL DEFAULT '{}',
+ state TEXT NOT NULL DEFAULT 'ok' CHECK (state IN ('ok', 'unreachable', 'auth_failed', 'disabled')),
+ username TEXT NOT NULL DEFAULT '',
+ allow_local_network INTEGER NOT NULL DEFAULT 0,
+ backoff_until TEXT,
+ fail_count INTEGER NOT NULL DEFAULT 0,
+ last_error TEXT NOT NULL DEFAULT '',
+ checked_at TEXT,
+ removed INTEGER NOT NULL DEFAULT 0,
+ writable INTEGER NOT NULL DEFAULT 1,
+ clear_finished INTEGER NOT NULL DEFAULT 1,
+ tags TEXT NOT NULL DEFAULT '[]' CHECK(json_valid(tags)),
+ category_movies TEXT NOT NULL DEFAULT '',
+ category_shows TEXT NOT NULL DEFAULT '',
+ category_music TEXT NOT NULL DEFAULT ''
+);
+
+INSERT INTO downloaders_new(id, created_at, created_by, updated_at, updated_by, name, adapter, protocol, url,
+ secret_ref, category, priority, path_map, after_import, seed_goal, state, username, allow_local_network,
+ backoff_until, fail_count, last_error, checked_at, removed, writable, clear_finished, tags,
+ category_movies, category_shows, category_music)
+SELECT id, created_at, created_by, updated_at, updated_by, name, adapter, protocol, url,
+ secret_ref, category, priority, path_map, after_import, seed_goal, state, username, allow_local_network,
+ backoff_until, fail_count, last_error, checked_at, removed, writable, clear_finished, tags,
+ category_movies, category_shows, category_music FROM downloaders;
+
+DROP TABLE downloaders;
+ALTER TABLE downloaders_new RENAME TO downloaders;
+
+CREATE TRIGGER import_created_downloader_resumed AFTER UPDATE OF state ON downloaders
+WHEN OLD.state = 'disabled' AND NEW.state <> 'disabled'
+BEGIN
+ UPDATE import_created SET live = 0 WHERE tbl = 'downloaders' AND item_id = NEW.id;
+END;
+
+CREATE TRIGGER import_created_downloader_gone AFTER DELETE ON downloaders
+BEGIN
+ UPDATE import_created SET live = 0 WHERE tbl = 'downloaders' AND item_id = OLD.id;
+END;
diff --git a/app/backend/internal/core/database/rtorrent_migration_test.go b/app/backend/internal/core/database/rtorrent_migration_test.go
new file mode 100644
index 0000000..550f3e7
--- /dev/null
+++ b/app/backend/internal/core/database/rtorrent_migration_test.go
@@ -0,0 +1,108 @@
+package database
+
+import (
+ "context"
+ "database/sql"
+ "reflect"
+ "testing"
+)
+
+// 0106 rebuilds downloaders to allow the rtorrent adapter and keeps every
+// Downloader, its later columns, the rows that point at it and both
+// import_created triggers.
+func TestDownloadersKeptByRTorrentMigration(t *testing.T) {
+ dir := t.TempDir()
+ ctx := context.Background()
+ old, err := Open(dir, Options{MainMigrations: upTo(t, 103)})
+ if err != nil {
+ t.Fatal(err)
+ }
+ err = old.Write(ctx, func(tx *sql.Tx) error {
+ for _, q := range []string{
+ `INSERT INTO secrets(id,created_at,created_by,updated_at,updated_by,kind,value) VALUES(71,'t','{}','t','{}','downloader_secret','v1:synthetic-encrypted-value')`,
+ `INSERT INTO downloaders(id,created_at,created_by,updated_at,updated_by,name,adapter,protocol,url,secret_ref,category,priority,path_map,after_import,seed_goal,state,username,allow_local_network,backoff_until,fail_count,last_error,checked_at,removed,writable,clear_finished,tags,category_movies,category_shows,category_music) VALUES(7,'a','{"kind":"user","id":1}','b','{}','Saved Deluge','deluge','torrent','http://owned-fixture',71,'owned',7,'[{"theirs":"/d","ours":"/m"}]','remove','{"ratio":2}','disabled','saved-user',1,'later',3,'safe error','checked',0,0,0,'["4k"]','films','tv','tunes')`,
+ `INSERT INTO downloaders(id,created_at,created_by,updated_at,updated_by,name,adapter,protocol,url,state,removed) VALUES(11,'c','{}','d','{}','Saved SAB','sabnzbd','usenet','http://owned-sab','auth_failed',1)`,
+ `INSERT INTO downloads(id,created_at,created_by,updated_at,updated_by,downloader_id,external_id,progress,state,started_by) VALUES(13,'a','{}','b','{}',7,'owned-external-id',0.4,'paused','{}')`,
+ `INSERT INTO downloader_attempts(id,downloader_id,release_id,slot_id,marker,category,state,created_at,updated_at) VALUES(5,7,1,2,'owned-marker','owned','pending','a','b')`,
+ `INSERT INTO import_created(tbl,item_id,live) VALUES('downloaders',7,1),('downloaders',11,0)`,
+ } {
+ if _, err := tx.Exec(q); err != nil {
+ return err
+ }
+ }
+ return nil
+ })
+ if err != nil {
+ t.Fatal(err)
+ }
+ cols := downloaderRows(t, old.Read(), "SELECT name, type, \"notnull\", dflt_value, pk FROM pragma_table_info('downloaders') ORDER BY cid")
+ before := downloaderRows(t, old.Read(), "SELECT * FROM downloaders ORDER BY id")
+ deps := downloaderRows(t, old.Read(), "SELECT * FROM downloads ORDER BY id")
+ attempts := downloaderRows(t, old.Read(), "SELECT * FROM downloader_attempts ORDER BY id")
+ _ = old.Close()
+
+ s, err := Open(dir, Options{})
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer s.Close()
+ if got := downloaderRows(t, s.Read(), "SELECT name, type, \"notnull\", dflt_value, pk FROM pragma_table_info('downloaders') ORDER BY cid"); !reflect.DeepEqual(got, cols) {
+ t.Fatalf("columns changed: %v", got)
+ }
+ if got := downloaderRows(t, s.Read(), "SELECT * FROM downloaders ORDER BY id"); !reflect.DeepEqual(got, before) {
+ t.Fatal("saved Downloader row changed during rebuild")
+ }
+ if got := downloaderRows(t, s.Read(), "SELECT * FROM downloads ORDER BY id"); !reflect.DeepEqual(got, deps) {
+ t.Fatal("dependent Download changed during rebuild")
+ }
+ if got := downloaderRows(t, s.Read(), "SELECT * FROM downloader_attempts ORDER BY id"); !reflect.DeepEqual(got, attempts) {
+ t.Fatal("Downloader attempt changed during rebuild")
+ }
+ if got := downloaderRows(t, s.Read(), "PRAGMA foreign_key_check"); len(got) != 0 {
+ t.Fatalf("foreign key violations=%v", got)
+ }
+ var check string
+ if err := s.Read().QueryRow("PRAGMA quick_check").Scan(&check); err != nil || check != "ok" {
+ t.Fatal("database integrity check failed")
+ }
+ for _, tbl := range []string{"downloads", "downloader_attempts"} {
+ if got := downloaderRows(t, s.Read(), "SELECT \"table\" FROM pragma_foreign_key_list('"+tbl+"') WHERE \"table\"='downloaders'"); len(got) == 0 {
+ t.Fatalf("%s lost its foreign key", tbl)
+ }
+ }
+ err = s.Write(ctx, func(tx *sql.Tx) error {
+ _, err := tx.Exec(`INSERT INTO downloaders(created_at,created_by,updated_at,updated_by,name,adapter,protocol,url) VALUES('t','{}','t','{}','rTorrent','rtorrent','torrent','http://owned-fixture:8000/RPC2')`)
+ return err
+ })
+ if err != nil {
+ t.Fatalf("rtorrent refused: %v", err)
+ }
+ for _, q := range []string{
+ `INSERT INTO downloaders(created_at,created_by,updated_at,updated_by,name,adapter,protocol,url) VALUES('t','{}','t','{}','Odd','unsupported','torrent','http://x')`,
+ `UPDATE downloaders SET tags='not json' WHERE id=7`,
+ `UPDATE downloaders SET name='Saved SAB' WHERE id=7`,
+ `UPDATE downloads SET downloader_id=999999 WHERE id=13`,
+ } {
+ if err := s.Write(ctx, func(tx *sql.Tx) error { _, err := tx.Exec(q); return err }); err == nil {
+ t.Fatalf("constraint lost: %s", q)
+ }
+ }
+ for _, q := range []string{`UPDATE downloaders SET state='ok' WHERE id=7`, `UPDATE import_created SET live=1 WHERE item_id=11 AND tbl='downloaders'`, `DELETE FROM downloaders WHERE id=11`} {
+ if err := s.Write(ctx, func(tx *sql.Tx) error { _, err := tx.Exec(q); return err }); err != nil {
+ t.Fatal(err)
+ }
+ }
+ if got := downloaderRows(t, s.Read(), "SELECT live FROM import_created WHERE tbl='downloaders' ORDER BY item_id"); !reflect.DeepEqual(got, [][]any{{int64(0)}, {int64(0)}}) {
+ t.Fatal("import ownership triggers lost")
+ }
+ _ = s.Close()
+ s, err = Open(dir, Options{})
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer s.Close()
+ var count int
+ if err := s.Read().QueryRow("SELECT count(*) FROM schema_migrations WHERE version=106").Scan(&count); err != nil || count != 1 {
+ t.Fatal("migration not recorded once")
+ }
+}
diff --git a/app/backend/internal/core/database/upgrade_path_test.go b/app/backend/internal/core/database/upgrade_path_test.go
index 7c49b09..e1332a6 100644
--- a/app/backend/internal/core/database/upgrade_path_test.go
+++ b/app/backend/internal/core/database/upgrade_path_test.go
@@ -47,6 +47,18 @@ func latestMain(t *testing.T) int {
return ms[len(ms)-1].version
}
+// mainBack is the main migration version n steps before the latest one.
+// Numbers may skip, so latest-n is not always a real version.
+func mainBack(t *testing.T, n int) int {
+ t.Helper()
+ src, _ := fs.Sub(embedded, "migrations/main")
+ ms, err := loadMigrations(src)
+ if err != nil {
+ t.Fatal(err)
+ }
+ return ms[len(ms)-1-n].version
+}
+
const (
ts = "'2026-10-01T00:00:00.000000000Z'"
by = `'{"kind":"system"}'`
@@ -142,7 +154,7 @@ func historyLine(t *testing.T, s *Store) string {
// one checked pre-update backup is written, and a second start runs none.
func TestUpgradeFromOlderSchemas(t *testing.T) {
latest := latestMain(t)
- for _, from := range []int{40, 90, latest - 1} {
+ for _, from := range []int{40, 90, mainBack(t, 1)} {
t.Run("from_"+strconv.Itoa(from), func(t *testing.T) {
dir := oldFolder(t, from)
updating := 0
@@ -252,9 +264,10 @@ func TestRealDowngradeIsRefused(t *testing.T) {
t.Fatal(err)
}
_ = s.Close()
- _, err = Open(dir, Options{MainMigrations: mainUpTo(t, latest-2, nil)})
+ older := mainBack(t, 2)
+ _, err = Open(dir, Options{MainMigrations: mainUpTo(t, older, nil)})
var nd *NewerDataError
- if !errors.As(err, &nd) || nd.Have != latest || nd.Know != latest-2 || !strings.Contains(err.Error(), "newer HolyArrs") {
+ if !errors.As(err, &nd) || nd.Have != latest || nd.Know != older || !strings.Contains(err.Error(), "newer HolyArrs") {
t.Fatalf("got %v", err)
}
s, err = Open(dir, Options{})
diff --git a/app/backend/internal/core/jobs/jobs.go b/app/backend/internal/core/jobs/jobs.go
index b5ef454..9767a31 100644
--- a/app/backend/internal/core/jobs/jobs.go
+++ b/app/backend/internal/core/jobs/jobs.go
@@ -203,7 +203,7 @@ func (q *Queue) Start(ctx context.Context) error {
}
return nil
}
- for _, p := range []Pool{PoolCore, PoolIO, PoolHeavy} {
+ for _, p := range []Pool{PoolCore, PoolIO, PoolHeavy, PoolMigrate} {
for range q.opt.Pools[p] {
q.wg.Add(1)
go q.work(ctx, p)
diff --git a/app/backend/internal/core/jobs/pools.go b/app/backend/internal/core/jobs/pools.go
index 9d61b0c..d2650d3 100644
--- a/app/backend/internal/core/jobs/pools.go
+++ b/app/backend/internal/core/jobs/pools.go
@@ -9,10 +9,13 @@ const (
PoolCore Pool = "core"
PoolIO Pool = "io"
PoolHeavy Pool = "heavy"
+ // PoolMigrate runs Import from other apps, so it never queues behind
+ // imports and scans.
+ PoolMigrate Pool = "migrate"
)
// DefaultPools are the worker counts the app starts with.
-var DefaultPools = map[Pool]int{PoolCore: 1, PoolIO: 2, PoolHeavy: 1}
+var DefaultPools = map[Pool]int{PoolCore: 1, PoolIO: 2, PoolHeavy: 1, PoolMigrate: 1}
// kindPools assigns every Job kind to a pool. A kind not listed runs in
// the I/O pool; a test in cmd/holyarrs fails for a registered kind that
@@ -49,8 +52,8 @@ var kindPools = map[string]Pool{
"clean_holding": PoolHeavy,
"scan_library_folder": PoolHeavy,
"adopt_library": PoolHeavy,
- "migrate_move": PoolHeavy,
- "migrate_undo": PoolHeavy,
+ "migrate_move": PoolMigrate,
+ "migrate_undo": PoolMigrate,
"rescan_library": PoolHeavy,
"subtitle_look": PoolHeavy,
"recheck_pick_rules": PoolHeavy,
diff --git a/app/backend/internal/core/jobs/pools_test.go b/app/backend/internal/core/jobs/pools_test.go
index a67962c..a8bed10 100644
--- a/app/backend/internal/core/jobs/pools_test.go
+++ b/app/backend/internal/core/jobs/pools_test.go
@@ -11,13 +11,13 @@ import (
// searches do not delay a health check; hung imports or health checks do not
// delay searches or the other pools.
func TestStallInOnePoolLeavesTheOthers(t *testing.T) {
- kindOf := map[Pool]string{PoolCore: "health_check", PoolIO: "search_slot", PoolHeavy: "import_download"}
- for _, stalled := range []Pool{PoolCore, PoolIO, PoolHeavy} {
+ kindOf := map[Pool]string{PoolCore: "health_check", PoolIO: "search_slot", PoolHeavy: "import_download", PoolMigrate: "migrate_move"}
+ for _, stalled := range []Pool{PoolCore, PoolIO, PoolHeavy, PoolMigrate} {
t.Run(string(stalled), func(t *testing.T) {
s := newStore(t, t.TempDir())
defer s.Close()
o := fastOpts()
- o.Pools = map[Pool]int{PoolCore: 1, PoolIO: 2, PoolHeavy: 1}
+ o.Pools = map[Pool]int{PoolCore: 1, PoolIO: 2, PoolHeavy: 1, PoolMigrate: 1}
q := New(s, o)
hold := make(chan struct{})
started := make(chan struct{}, 8)
@@ -71,7 +71,7 @@ func TestStallInOnePoolLeavesTheOthers(t *testing.T) {
func TestPoolOf(t *testing.T) {
for kind, want := range map[string]Pool{"health_check": PoolCore, "search_slot": PoolIO, "grab": PoolIO,
- "subtitle_search": PoolIO, "import_download": PoolHeavy, "rename_files": PoolHeavy, "scan_title": PoolHeavy, "something_new": PoolIO} {
+ "subtitle_search": PoolIO, "import_download": PoolHeavy, "rename_files": PoolHeavy, "scan_title": PoolHeavy, "migrate_move": PoolMigrate, "migrate_undo": PoolMigrate, "something_new": PoolIO} {
if got := PoolOf(kind); got != want {
t.Errorf("PoolOf(%s) = %s, want %s", kind, got, want)
}
diff --git a/app/backend/internal/core/parts/table_screens.go b/app/backend/internal/core/parts/table_screens.go
index e0bf314..bee61a9 100644
--- a/app/backend/internal/core/parts/table_screens.go
+++ b/app/backend/internal/core/parts/table_screens.go
@@ -96,6 +96,7 @@ var loopOwners = map[string]Owner{
"jobs_core": Core,
"jobs_io": Core,
"jobs_heavy": Core,
+ "jobs_migrate": Core,
"stranded_imports": Media,
"gates": movies,
"wishlist": wishlist,
diff --git a/app/backend/internal/downloads/attempts.go b/app/backend/internal/downloads/attempts.go
index 13ecc92..e724fc0 100644
--- a/app/backend/internal/downloads/attempts.go
+++ b/app/backend/internal/downloads/attempts.go
@@ -276,8 +276,8 @@ func (m *Manager) claimAttempt(ctx context.Context, d domain.Downloader, release
if d.Protocol == "torrent" {
if releasename.ValidInfoHash(strings.ToLower(hash.String)) {
expected = strings.ToLower(hash.String)
- } else if magnetHash, ok := delugeMagnetHash(link); ok {
- expected = magnetHash
+ } else if h, ok := magnetHash(link); ok {
+ expected = h
}
}
a = &sendAttempt{Attempt: Attempt{DownloaderID: d.ID, ReleaseID: releaseID, SlotID: slotID, State: "pending", CreatedAt: now, UpdatedAt: now},
@@ -294,7 +294,7 @@ func (m *Manager) claimAttempt(ctx context.Context, d domain.Downloader, release
}
func journalAdapter(adapter string) bool {
- return adapter == "nzbget" || adapter == "transmission" || adapter == "deluge"
+ return adapter == "nzbget" || adapter == "transmission" || adapter == "deluge" || adapter == "rtorrent"
}
func pendingAttemptCount(tx *sql.Tx, downloaderID int64) (int, error) {
diff --git a/app/backend/internal/downloads/attempts_test.go b/app/backend/internal/downloads/attempts_test.go
index 041a137..1acc875 100644
--- a/app/backend/internal/downloads/attempts_test.go
+++ b/app/backend/internal/downloads/attempts_test.go
@@ -549,7 +549,7 @@ func TestOptionalJournalDoesNotBindReusedIDs(t *testing.T) {
}
func TestOptionalTorrentJournalPinsUnknownOutcomeAcrossRestart(t *testing.T) {
- for _, kind := range []string{"transmission", "deluge"} {
+ for _, kind := range []string{"transmission", "deluge", "rtorrent"} {
t.Run(kind, func(t *testing.T) {
w, m := setup(t)
ctx := context.Background()
diff --git a/app/backend/internal/downloads/client_deluge.go b/app/backend/internal/downloads/client_deluge.go
index bb298f9..63f8abc 100644
--- a/app/backend/internal/downloads/client_deluge.go
+++ b/app/backend/internal/downloads/client_deluge.go
@@ -3,7 +3,9 @@ package downloads
import (
"bytes"
"context"
+ "encoding/base32"
"encoding/base64"
+ "encoding/hex"
"encoding/json"
"errors"
"fmt"
@@ -135,7 +137,7 @@ func (d *Deluge) Add(ctx context.Context, r AddRequest) (string, error) {
var id string
var add func() error
- if magnetHash, magnet := delugeMagnetHash(r.URL); magnet {
+ if magnetHash, magnet := magnetHash(r.URL); magnet {
if expected != "" && expected != magnetHash {
return "", errors.New("the torrent address and expected info hash do not match")
}
@@ -497,7 +499,9 @@ func (d *Deluge) setLabel(ctx context.Context, id, label string) error {
return fmt.Errorf("deluge set label: %w", err)
}
-func delugeMagnetHash(raw string) (string, bool) {
+// magnetHash returns the lowercase hex info hash of a magnet link. A 32
+// character base32 hash is turned into hex.
+func magnetHash(raw string) (string, bool) {
u, err := url.Parse(raw)
if err != nil || !strings.EqualFold(u.Scheme, "magnet") {
return "", false
@@ -506,6 +510,11 @@ func delugeMagnetHash(raw string) (string, bool) {
const prefix = "urn:btih:"
if len(xt) > len(prefix) && strings.EqualFold(xt[:len(prefix)], prefix) {
hash := strings.ToLower(xt[len(prefix):])
+ if len(hash) == 32 {
+ if b, err := base32.StdEncoding.DecodeString(strings.ToUpper(hash)); err == nil {
+ hash = hex.EncodeToString(b)
+ }
+ }
if releasename.ValidInfoHash(hash) {
return hash, true
}
@@ -582,7 +591,7 @@ func (d *Deluge) status(ctx context.Context, id string) (delugeTorrent, error) {
return torrent, nil
}
-func safeDelugeFileName(name string) string {
+func safeRelName(name string) string {
name = strings.ReplaceAll(name, `\`, "/")
name = strings.TrimLeft(name, "/")
name = path.Clean(name)
@@ -619,7 +628,7 @@ func appendDelugeFiles(value any, out *[]File) {
if progress > 1 {
progress = 1
}
- if name = safeDelugeFileName(name); name != "" {
+ if name = safeRelName(name); name != "" {
*out = append(*out, File{Name: name, Size: int64(size), Progress: progress})
}
return
diff --git a/app/backend/internal/downloads/client_rtorrent.go b/app/backend/internal/downloads/client_rtorrent.go
new file mode 100644
index 0000000..413cdd6
--- /dev/null
+++ b/app/backend/internal/downloads/client_rtorrent.go
@@ -0,0 +1,637 @@
+package downloads
+
+import (
+ "bytes"
+ "context"
+ "errors"
+ "fmt"
+ "io"
+ "math"
+ "net/http"
+ "net/url"
+ "path"
+ "slices"
+ "strconv"
+ "strings"
+ "time"
+
+ domain "github.com/HolyArrs/holyarrs/app/backend/internal/core/model"
+ "github.com/HolyArrs/holyarrs/app/backend/internal/core/outbound"
+ "github.com/HolyArrs/holyarrs/app/backend/internal/core/releasename"
+)
+
+// rtorrentNoHash is a target no torrent has. The connection test sends write
+// calls to it to learn whether rTorrent allows them, without changing anything.
+const rtorrentNoHash = "0000000000000000000000000000000000000000"
+
+// rtorrentConfirm is how often and how long an add is looked for. rTorrent
+// answers every load with 0, so only finding the hash proves the add.
+var rtorrentConfirm = struct {
+ tries int
+ every time.Duration
+}{10, 500 * time.Millisecond}
+
+// rtorrentAnswerMax caps an answer. A large rTorrent lists thousands of torrents
+// in one d.multicall2, as large as qBittorrent's full list.
+const rtorrentAnswerMax = 64 << 20
+
+// rtorrentFields are the d.multicall2 fields, in the order rtRow reads them.
+var rtorrentFields = []string{
+ "d.hash=", "d.name=", "d.custom1=", "d.size_bytes=", "d.completed_bytes=", "d.down.rate=", "d.up.rate=", "d.up.total=",
+ "d.ratio=", "d.state=", "d.is_open=", "d.is_active=", "d.complete=", "d.hashing=", "d.message=", "d.base_path=",
+ "d.directory=", "d.is_multi_file=", "d.peers_connected=", "d.peers_complete=", "d.timestamp.finished=",
+}
+
+// RTorrent is a Client for rTorrent's XML-RPC interface, reached over HTTP: the
+// /RPC2 mount of the web server in front of it, or ruTorrent's RPC plugins.
+type RTorrent struct {
+ Category string
+ Others []string // more categories that are also ours
+ // PathMap and SaveRoot tell where HolyArrs sees the files, so a remove that
+ // asks for the files can delete them here. rTorrent cannot delete them.
+ PathMap []domain.PathMap
+ SaveRoot string
+ // Keep lists folders that are never deleted, nor anything in or around
+ // them: the Library folders. Without it nothing is deleted.
+ Keep func(ctx context.Context) ([]string, error)
+
+ endpoint, user, pass string
+ http *http.Client
+ now func() time.Time
+}
+
+// rtRow is one torrent as d.multicall2 or a single-torrent read reports it.
+type rtRow struct {
+ hash, name, label, message, basePath, dir string
+ size, done, down, up, upTotal, ratio, finished int64
+ state, open, active, complete, hashing, multi, conns, seeds int64
+}
+
+// NewRTorrent returns a client for the rTorrent at base. An address with no
+// path gets /RPC2, the usual mount.
+func NewRTorrent(base, user, pass string, h *http.Client) *RTorrent {
+ if h == nil {
+ h = &http.Client{Timeout: clientTimeout}
+ }
+ base = strings.TrimSpace(base)
+ if u, err := url.Parse(base); err == nil && u.Host != "" && (u.Path == "" || u.Path == "/") {
+ u.Path = "/RPC2"
+ base = u.String()
+ }
+ return &RTorrent{endpoint: base, user: user, pass: pass, http: h, now: time.Now}
+}
+
+// Health reports whether rTorrent answers, accepts the sign-in and allows the
+// calls HolyArrs makes.
+func (r *RTorrent) Health(ctx context.Context) (Health, error) {
+ v, err := r.call(ctx, "system.client_version", "")
+ if err != nil {
+ return Health{}, err
+ }
+ version := asStr(v)
+ if version == "" {
+ return Health{}, errors.New("the address answered XML-RPC, but did not say an rTorrent version")
+ }
+ major, rest, _ := strings.Cut(version, ".")
+ minor, _, _ := strings.Cut(rest, ".")
+ if a, err := strconv.Atoi(major); err == nil {
+ if b, err := strconv.Atoi(minor); err == nil && a == 0 && b < 9 {
+ return Health{}, fmt.Errorf("rTorrent %s is too old; HolyArrs needs 0.9 or newer", version)
+ }
+ }
+ if _, err := r.rows(ctx); err != nil {
+ return Health{}, err
+ }
+ answers, err := r.multicall(ctx, [][]any{{"d.custom1.set", rtorrentNoHash, "holyarrs"}, {"d.stop", rtorrentNoHash}, {"d.erase", rtorrentNoHash}})
+ if err != nil {
+ return Health{}, err
+ }
+ for _, a := range answers {
+ var f *xmlrpcFault
+ if e, ok := a.(error); ok && errors.As(e, &f) && f.untrusted() {
+ return Health{}, untrustedError(f)
+ }
+ }
+ return Health{Version: version, At: time.Now().UTC()}, nil
+}
+
+// List returns the torrents with the category's label. An empty category
+// returns every torrent.
+func (r *RTorrent) List(ctx context.Context, category string) ([]Job, error) {
+ rows, err := r.rows(ctx)
+ if err != nil {
+ return nil, err
+ }
+ jobs := []Job{}
+ for _, row := range rows {
+ if category == "" || labelIs(row.label, category) {
+ jobs = append(jobs, r.job(row))
+ }
+ }
+ return jobs, nil
+}
+
+// Get returns the torrent with the given id, with its files.
+func (r *RTorrent) Get(ctx context.Context, id string) (Job, error) {
+ row, err := r.row(ctx, id)
+ if err != nil {
+ return Job{}, err
+ }
+ j := r.job(row)
+ v, err := r.call(ctx, "f.multicall", strings.ToUpper(row.hash), "", "f.path=", "f.size_bytes=", "f.completed_chunks=", "f.size_chunks=")
+ if err != nil {
+ return Job{}, rtNotFound(err)
+ }
+ files, _ := v.([]any)
+ for _, f := range files {
+ cols, _ := f.([]any)
+ if len(cols) < 4 {
+ continue
+ }
+ name := safeRelName(asStr(cols[0]))
+ if name == "" {
+ continue
+ }
+ if row.multi == 1 {
+ if folder := path.Base(row.content()); row.content() != "" {
+ name = folder + "/" + name
+ }
+ }
+ progress := float64(0)
+ if total := asInt(cols[3]); total > 0 {
+ progress = max(0, min(1, float64(asInt(cols[2]))/float64(total)))
+ }
+ j.Files = append(j.Files, File{Name: name, Size: max(0, asInt(cols[1])), Progress: progress})
+ }
+ return j, nil
+}
+
+// Add sends a torrent with the category's label and returns its hash. HolyArrs
+// fetches a .torrent itself and sends its bytes, so rTorrent never contacts the
+// Source.
+func (r *RTorrent) Add(ctx context.Context, req AddRequest) (string, error) {
+ if req.Category == "" {
+ return "", ErrCategory
+ }
+ expected := strings.ToLower(req.InfoHash)
+ if expected != "" && !releasename.ValidInfoHash(expected) {
+ return "", errBadHash
+ }
+ if req.ReconcileOnly {
+ if expected == "" || req.Skip[expected] {
+ return "", ErrUncertain
+ }
+ j, err := r.Get(ctx, expected)
+ if err != nil || !labelIs(j.Category, req.Category) || req.Skip[j.ID] {
+ return "", errors.Join(ErrUncertain, err)
+ }
+ return j.ID, nil
+ }
+ var method string
+ var payload any
+ if h, ok := magnetHash(req.URL); ok {
+ if expected != "" && expected != h {
+ return "", errors.New("the magnet and the expected info hash do not match")
+ }
+ expected, method, payload = h, "load.start", req.URL
+ } else {
+ b, err := req.File, error(nil)
+ if len(b) == 0 {
+ b, err = fetchRelease(ctx, req.URL, req.AllowLocal, torrentFetchMax)
+ }
+ if err != nil {
+ return "", err
+ }
+ if !req.AllowLocal {
+ if b, err = safeTorrent(b); err != nil {
+ return "", err
+ }
+ }
+ h, err := torrentFileHash(b)
+ if err != nil {
+ return "", err
+ }
+ if expected != "" && expected != h {
+ return "", errors.New("the torrent file does not match its info hash")
+ }
+ expected, method, payload = h, "load.raw_start", b
+ }
+ if req.Skip[expected] {
+ return "", errors.New("the torrent belongs to another download")
+ }
+ if j, err := r.Get(ctx, expected); err == nil {
+ if !labelIs(j.Category, req.Category) {
+ return "", errors.New("the torrent is already in rTorrent under another label")
+ }
+ return j.ID, nil
+ } else if !errors.Is(err, ErrNotFound) {
+ return "", err
+ }
+ args := []any{"", payload, "d.custom1.set=" + labelValue(req.Category)}
+ if dir, ok := r.saveDir(req.SavePath); ok {
+ args = append(args, `d.directory.set="`+dir+`"`)
+ }
+ _, sendErr := r.call(ctx, method, args...)
+ var fault *xmlrpcFault
+ if errors.As(sendErr, &fault) {
+ if fault.untrusted() {
+ return "", untrustedError(fault)
+ }
+ return "", sendErr
+ }
+ var refusedSize rtorrentTooLarge
+ if errors.Is(sendErr, ErrAuth) || errors.Is(sendErr, outbound.ErrAddressRefused) || errors.As(sendErr, &refusedSize) {
+ return "", sendErr
+ }
+ for i := 0; i < rtorrentConfirm.tries && ctx.Err() == nil; i++ {
+ if i > 0 {
+ select {
+ case <-ctx.Done():
+ case <-time.After(rtorrentConfirm.every):
+ }
+ }
+ row, err := r.row(ctx, expected)
+ if errors.Is(err, ErrNotFound) {
+ continue
+ }
+ if err != nil {
+ return "", errors.Join(ErrUncertain, sendErr, err)
+ }
+ if row.label == "" {
+ // Seen without the label that went with the load: put it back.
+ if _, err := r.call(ctx, "d.custom1.set", strings.ToUpper(expected), labelValue(req.Category)); err != nil {
+ return "", errors.Join(ErrUncertain, err)
+ }
+ row.label = labelValue(req.Category)
+ }
+ if !labelIs(row.label, req.Category) {
+ return "", errors.Join(ErrUncertain, errors.New("the torrent is in rTorrent under another label"))
+ }
+ return expected, nil
+ }
+ return "", errors.Join(ErrUncertain, sendErr, errors.New("rTorrent did not show the torrent yet"))
+}
+
+// Remove takes the torrent out of rTorrent. rTorrent keeps the files, so when
+// deleteFiles is set HolyArrs deletes them itself where it can see them.
+func (r *RTorrent) Remove(ctx context.Context, id string, deleteFiles bool) error {
+ row, err := r.row(ctx, id)
+ if err != nil {
+ return err
+ }
+ if r.Category != "" && !labelIs(row.label, r.Category) && !slices.ContainsFunc(r.Others, func(c string) bool { return labelIs(row.label, c) }) {
+ return errors.New("refusing to remove a torrent outside the configured category")
+ }
+ var target filesTarget
+ why := ""
+ if deleteFiles {
+ others, err := r.rows(ctx)
+ if err != nil {
+ return err
+ }
+ var keep []string
+ if r.Keep == nil {
+ why = "HolyArrs does not know its Library folders here"
+ } else if keep, err = r.Keep(ctx); err != nil {
+ why = "HolyArrs could not read its Library folders"
+ }
+ if why == "" {
+ target, why = r.deleteTarget(row, others, keep)
+ }
+ }
+ if _, err := r.call(ctx, "d.erase", strings.ToUpper(row.hash)); err != nil {
+ var f *xmlrpcFault
+ if !(errors.As(err, &f) && f.unknownHash()) {
+ if _, getErr := r.row(ctx, row.hash); !errors.Is(getErr, ErrNotFound) {
+ return err
+ }
+ }
+ }
+ if !deleteFiles {
+ return nil
+ }
+ if why == "" {
+ why = target.remove()
+ }
+ if why != "" {
+ logf("rtorrent: removed %s but kept its files: %s", row.hash, why)
+ }
+ return nil
+}
+
+func (r *RTorrent) row(ctx context.Context, id string) (rtRow, error) {
+ id = strings.ToLower(id)
+ if !releasename.ValidInfoHash(id) {
+ return rtRow{}, errBadHash
+ }
+ calls := make([][]any, len(rtorrentFields))
+ for i, f := range rtorrentFields {
+ calls[i] = []any{strings.TrimSuffix(f, "="), strings.ToUpper(id)}
+ }
+ answers, err := r.multicall(ctx, calls)
+ if err != nil {
+ return rtRow{}, err
+ }
+ for _, a := range answers {
+ if e, ok := a.(error); ok {
+ return rtRow{}, rtNotFound(e)
+ }
+ }
+ return rowOf(answers)
+}
+
+func (r *RTorrent) rows(ctx context.Context) ([]rtRow, error) {
+ args := []any{"", "main"}
+ for _, f := range rtorrentFields {
+ args = append(args, f)
+ }
+ v, err := r.call(ctx, "d.multicall2", args...)
+ if err != nil {
+ return nil, err
+ }
+ list, ok := v.([]any)
+ if !ok {
+ return nil, errXMLRPCAnswer
+ }
+ out := make([]rtRow, 0, len(list))
+ for _, item := range list {
+ cols, _ := item.([]any)
+ row, err := rowOf(cols)
+ if err != nil || !releasename.ValidInfoHash(row.hash) {
+ continue
+ }
+ out = append(out, row)
+ }
+ return out, nil
+}
+
+func rowOf(cols []any) (rtRow, error) {
+ if len(cols) < len(rtorrentFields) {
+ return rtRow{}, errXMLRPCAnswer
+ }
+ n := func(i int) int64 { return asInt(cols[i]) }
+ return rtRow{
+ hash: strings.ToLower(asStr(cols[0])), name: asStr(cols[1]), label: asStr(cols[2]), size: n(3), done: n(4),
+ down: n(5), up: n(6), upTotal: n(7), ratio: n(8), state: n(9), open: n(10), active: n(11), complete: n(12),
+ hashing: n(13), message: asStr(cols[14]), basePath: asStr(cols[15]), dir: asStr(cols[16]), multi: n(17),
+ conns: n(18), seeds: n(19), finished: n(20),
+ }, nil
+}
+
+// content is where the torrent's data is, as rTorrent sees it. Older builds
+// leave d.base_path empty for a stopped torrent, so it is rebuilt from the
+// folder and the name.
+func (row rtRow) content() string {
+ p := row.basePath
+ if p == "" && row.dir != "" {
+ p = row.dir
+ if row.multi != 1 && row.name != "" {
+ p = path.Join(row.dir, row.name)
+ }
+ }
+ if p == "" || !path.IsAbs(p) {
+ return ""
+ }
+ return path.Clean(p)
+}
+
+func (r *RTorrent) job(row rtRow) Job {
+ content := row.content()
+ state, detail := rtState(row, content)
+ progress := float64(0)
+ if row.size > 0 {
+ progress = max(0, min(1, float64(row.done)/float64(row.size)))
+ }
+ if row.complete == 1 {
+ progress = 1
+ }
+ eta := int64(0)
+ if row.down > 0 && row.size > row.done {
+ eta = (row.size - row.done) / row.down
+ }
+ j := Job{ID: row.hash, Name: row.name, Category: labelText(row.label), ContentPath: content, Size: max(0, row.size),
+ Progress: progress, Speed: max(0, row.down), UpSpeed: max(0, row.up), Seeds: count32(row.seeds),
+ Peers: count32(row.conns - row.seeds), ETA: eta, State: state, Detail: detail, Ratio: float64(max(0, row.ratio)) / 1000,
+ Uploaded: max(0, row.upTotal)}
+ if content != "" {
+ j.SavePath = path.Dir(content)
+ }
+ if row.complete == 1 && row.finished > 0 {
+ j.DoneAt = row.finished
+ if now := r.now().Unix(); now > row.finished {
+ j.SeedingTime = now - row.finished
+ }
+ }
+ if strings.HasPrefix(strings.ToLower(row.message), "tracker") {
+ j.TrackerProblem = "warning"
+ }
+ return j
+}
+
+// rtState maps rTorrent's flags onto ours. rTorrent has no failed state; a
+// storage error closes the torrent and leaves the reason in d.message.
+func rtState(row rtRow, content string) (string, string) {
+ msg := strings.ToLower(row.message)
+ switch {
+ case row.hashing != 0:
+ return StateQueued, "checking"
+ case row.complete == 0 && (row.size == 0 || strings.HasSuffix(row.name, ".meta")):
+ return StateDownloading, "metadata"
+ case row.state == 1 && row.open == 0 && row.message != "" && !strings.HasPrefix(msg, "tracker"):
+ return StatePaused, "error: " + redactURLs(cleanDetail(row.message))
+ case row.complete == 1 && content != "":
+ if row.state == 1 && row.active == 1 {
+ return StateFinished, "seeding"
+ }
+ return StateFinished, "complete"
+ case row.state == 0 || row.open == 0:
+ return StatePaused, "stopped"
+ case row.active == 0:
+ return StatePaused, "paused"
+ }
+ return StateDownloading, "downloading"
+}
+
+// saveDir is the folder sent with a load. A Downloader with path pairs sees
+// other paths than HolyArrs, so it keeps rTorrent's own folder instead.
+func (r *RTorrent) saveDir(p string) (string, bool) {
+ if p == "" || len(r.PathMap) > 0 || !path.IsAbs(p) || strings.ContainsAny(p, "\"\\") {
+ return "", false
+ }
+ for _, c := range p {
+ if c < 0x20 || c == 0x7f {
+ return "", false
+ }
+ }
+ return p, true
+}
+
+// labelValue is the label as written to d.custom1. ruTorrent writes labels
+// percent-encoded, so HolyArrs does too and a label with spaces reads the same
+// in both.
+func labelValue(s string) string { return strings.ReplaceAll(url.QueryEscape(s), "+", "%20") }
+
+// labelText is the label as shown: decoded when it was percent-encoded.
+func labelText(raw string) string {
+ if s, err := url.PathUnescape(raw); err == nil {
+ return s
+ }
+ return raw
+}
+
+// labelIs reports whether a stored label is the category, written plainly (as
+// another app may have) or percent-encoded.
+func labelIs(raw, category string) bool {
+ return category != "" && (raw == category || labelText(raw) == category)
+}
+
+// rtorrentTooLarge is a call refused for its size before rTorrent took it.
+type rtorrentTooLarge struct{ error }
+
+// Unwrap gives the cause.
+func (e rtorrentTooLarge) Unwrap() error { return e.error }
+
+func rtNotFound(err error) error {
+ var f *xmlrpcFault
+ if errors.As(err, &f) && f.unknownHash() {
+ return ErrNotFound
+ }
+ return err
+}
+
+func untrustedError(f *xmlrpcFault) error {
+ return fmt.Errorf("rTorrent refused a call HolyArrs needs (%s); update ruTorrent, or point HolyArrs at rTorrent's /RPC2 address", redactURLs(cleanDetail(f.Message)))
+}
+
+// call sends one XML-RPC call and returns its value.
+func (r *RTorrent) call(ctx context.Context, method string, params ...any) (any, error) {
+ body, err := xmlrpcCall(method, params...)
+ if err != nil {
+ return nil, err
+ }
+ req, err := http.NewRequestWithContext(ctx, http.MethodPost, r.endpoint, bytes.NewReader(body))
+ if err != nil {
+ return nil, errors.New("rtorrent: invalid address")
+ }
+ req.Header.Set("Content-Type", "text/xml")
+ if r.user != "" || r.pass != "" {
+ req.SetBasicAuth(r.user, r.pass)
+ }
+ resp, err := r.http.Do(req)
+ if err != nil {
+ if ctx.Err() != nil {
+ return nil, ctx.Err()
+ }
+ if errors.Is(err, outbound.ErrAddressRefused) {
+ return nil, outbound.ErrAddressRefused
+ }
+ return nil, errDownloaderUnavailable
+ }
+ defer resp.Body.Close()
+ if resp.StatusCode == http.StatusUnauthorized {
+ return nil, ErrAuth
+ }
+ if resp.StatusCode == http.StatusNotFound || resp.StatusCode == http.StatusMethodNotAllowed {
+ return nil, fmt.Errorf("%w: nothing answers XML-RPC at this path; crazymax images serve it on port 8000 at /RPC2 (8080 is the ruTorrent page), and through ruTorrent it is /plugins/httprpc/action.php", adapterHTTPError{resp.StatusCode})
+ }
+ if resp.StatusCode == http.StatusRequestEntityTooLarge {
+ return nil, rtorrentTooLarge{fmt.Errorf("%w: the call is over the web server's or rTorrent's size limit; raise network.xmlrpc.size_limit or the web server's body size limit", ErrTooLarge)}
+ }
+ if resp.StatusCode < 200 || resp.StatusCode > 299 {
+ return nil, adapterHTTPError{resp.StatusCode}
+ }
+ b, err := io.ReadAll(io.LimitReader(resp.Body, rtorrentAnswerMax+1))
+ if err != nil {
+ if ctx.Err() != nil {
+ return nil, ctx.Err()
+ }
+ return nil, errDownloaderUnavailable
+ }
+ if len(b) > rtorrentAnswerMax {
+ return nil, ErrTooLarge
+ }
+ v, err := xmlrpcResponse(b)
+ var f *xmlrpcFault
+ if errors.As(err, &f) && f.tooLarge() {
+ return nil, rtorrentTooLarge{fmt.Errorf("%w: raise rTorrent's network.xmlrpc.size_limit (crazymax: XMLRPC_SIZE_LIMIT)", ErrTooLarge)}
+ }
+ if errors.Is(err, errXMLRPCAnswer) {
+ return nil, errors.New("this address answered, but not with rTorrent's XML-RPC; check the path (usually /RPC2)")
+ }
+ return v, err
+}
+
+// multicall sends calls in one system.multicall. Each answer is the call's
+// value, or an error for a call rTorrent refused.
+func (r *RTorrent) multicall(ctx context.Context, calls [][]any) ([]any, error) {
+ list := make([]any, len(calls))
+ for i, c := range calls {
+ params := []any{}
+ for _, p := range c[1:] {
+ params = append(params, p)
+ }
+ list[i] = map[string]any{"methodName": c[0], "params": params}
+ }
+ v, err := r.call(ctx, "system.multicall", list)
+ if err != nil {
+ return nil, err
+ }
+ answers, ok := v.([]any)
+ if !ok || len(answers) != len(calls) {
+ return nil, errXMLRPCAnswer
+ }
+ out := make([]any, len(answers))
+ for i, a := range answers {
+ switch x := a.(type) {
+ case []any:
+ if len(x) > 0 {
+ out[i] = x[0]
+ }
+ case map[string]any:
+ f := &xmlrpcFault{Message: asStr(x["faultString"])}
+ f.Code = asInt(x["faultCode"])
+ out[i] = error(f)
+ }
+ }
+ return out, nil
+}
+
+func asStr(v any) string {
+ switch x := v.(type) {
+ case string:
+ return strings.TrimRight(x, "\n")
+ case []byte:
+ return string(x)
+ case int64:
+ return strconv.FormatInt(x, 10)
+ }
+ return ""
+}
+
+func asInt(v any) int64 {
+ switch x := v.(type) {
+ case int64:
+ return x
+ case float64:
+ return int64(x)
+ case bool:
+ if x {
+ return 1
+ }
+ case string:
+ n, _ := strconv.ParseInt(strings.TrimSpace(x), 10, 64)
+ return n
+ }
+ return 0
+}
+
+// count32 keeps a peer count inside int on every build, 32-bit ones included.
+func count32(v int64) int {
+ if v <= 0 {
+ return 0
+ }
+ if v > math.MaxInt32 {
+ return math.MaxInt32
+ }
+ return int(v)
+}
diff --git a/app/backend/internal/downloads/client_rtorrent_control.go b/app/backend/internal/downloads/client_rtorrent_control.go
new file mode 100644
index 0000000..289b138
--- /dev/null
+++ b/app/backend/internal/downloads/client_rtorrent_control.go
@@ -0,0 +1,230 @@
+package downloads
+
+import (
+ "context"
+ "errors"
+ "log"
+ "os"
+ "path"
+ "path/filepath"
+ "slices"
+ "strings"
+)
+
+// logf is the package log line, a variable so tests can read it.
+var logf = log.Printf
+
+// PauseItem stops one torrent. It stays open, so its files and place are kept.
+func (r *RTorrent) PauseItem(ctx context.Context, id string) error {
+ row, err := r.ownRow(ctx, id)
+ if err != nil {
+ return err
+ }
+ _, err = r.call(ctx, "d.stop", strings.ToUpper(row.hash))
+ return rtNotFound(err)
+}
+
+// ResumeItem starts one torrent again.
+func (r *RTorrent) ResumeItem(ctx context.Context, id string) error {
+ row, err := r.ownRow(ctx, id)
+ if err != nil {
+ return err
+ }
+ method := "d.start"
+ if row.open == 1 && row.state == 1 && row.active == 0 {
+ method = "d.resume"
+ }
+ _, err = r.call(ctx, method, strings.ToUpper(row.hash))
+ return rtNotFound(err)
+}
+
+// PauseAll stops every torrent with one of this Downloader's labels. Torrents of
+// other apps are left alone.
+func (r *RTorrent) PauseAll(ctx context.Context) error { return r.everyOwn(ctx, false) }
+
+// ResumeAll starts every torrent with one of this Downloader's labels.
+func (r *RTorrent) ResumeAll(ctx context.Context) error { return r.everyOwn(ctx, true) }
+
+// MoveTop is not supported: rTorrent has no queue order.
+func (r *RTorrent) MoveTop(context.Context, string) error { return ErrNotSupported }
+
+// SetSpeedLimit caps rTorrent's total speeds in bytes per second; 0 removes a cap.
+func (r *RTorrent) SetSpeedLimit(ctx context.Context, down, up int64) error {
+ answers, err := r.multicall(ctx, [][]any{{"throttle.global_down.max_rate.set", "", max(0, down)}, {"throttle.global_up.max_rate.set", "", max(0, up)}})
+ if err != nil {
+ return err
+ }
+ return answerErrors(answers)
+}
+
+// Status reports rTorrent's speeds, caps and session totals.
+func (r *RTorrent) Status(ctx context.Context) (ClientStatus, error) {
+ answers, err := r.multicall(ctx, [][]any{
+ {"throttle.global_down.rate", ""}, {"throttle.global_up.rate", ""},
+ {"throttle.global_down.max_rate", ""}, {"throttle.global_up.max_rate", ""},
+ {"throttle.global_down.total", ""}, {"throttle.global_up.total", ""},
+ })
+ if err != nil {
+ return ClientStatus{}, err
+ }
+ if err := answerErrors(answers); err != nil {
+ return ClientStatus{}, err
+ }
+ st := ClientStatus{Speed: asInt(answers[0]), UpSpeed: asInt(answers[1]), SpeedLimit: max(0, asInt(answers[2])),
+ UpLimit: max(0, asInt(answers[3])), SessionDown: asInt(answers[4]), SessionUp: asInt(answers[5])}
+ rows, err := r.rows(ctx)
+ if err != nil {
+ return ClientStatus{}, err
+ }
+ // Paused as a whole when there are torrents of ours and none of them runs.
+ for _, row := range rows {
+ if r.owns(row.label) {
+ if row.state == 1 && row.active == 1 {
+ st.Paused = false
+ break
+ }
+ st.Paused = true
+ }
+ }
+ return st, nil
+}
+
+func (r *RTorrent) everyOwn(ctx context.Context, start bool) error {
+ rows, err := r.rows(ctx)
+ if err != nil {
+ return err
+ }
+ calls := [][]any{}
+ for _, row := range rows {
+ if !r.owns(row.label) {
+ continue
+ }
+ switch {
+ case !start:
+ calls = append(calls, []any{"d.stop", strings.ToUpper(row.hash)})
+ case row.open == 1 && row.state == 1 && row.active == 0:
+ calls = append(calls, []any{"d.resume", strings.ToUpper(row.hash)})
+ default:
+ calls = append(calls, []any{"d.start", strings.ToUpper(row.hash)})
+ }
+ }
+ if len(calls) == 0 {
+ return nil
+ }
+ answers, err := r.multicall(ctx, calls)
+ if err != nil {
+ return err
+ }
+ return answerErrors(answers)
+}
+
+// ownRow reads a torrent and refuses one without this Downloader's labels.
+func (r *RTorrent) ownRow(ctx context.Context, id string) (rtRow, error) {
+ row, err := r.row(ctx, id)
+ if err != nil {
+ return rtRow{}, err
+ }
+ if r.Category != "" && !r.owns(row.label) {
+ return rtRow{}, ErrNotFound
+ }
+ return row, nil
+}
+
+func (r *RTorrent) owns(label string) bool {
+ return labelIs(label, r.Category) || slices.ContainsFunc(r.Others, func(c string) bool { return labelIs(label, c) })
+}
+
+func answerErrors(answers []any) error {
+ var errs []error
+ for _, a := range answers {
+ if e, ok := a.(error); ok {
+ errs = append(errs, rtNotFound(e))
+ }
+ }
+ return errors.Join(errs...)
+}
+
+// filesTarget is a torrent's data that HolyArrs may delete: rel inside root.
+type filesTarget struct{ root, rel string }
+
+// deleteTarget decides whether HolyArrs may delete a torrent's files after
+// rTorrent lets go of it. It only says yes for a file or folder named like the
+// torrent, inside the save folder or a path pair, that no other torrent in
+// rTorrent uses. Otherwise it says why the files stay.
+func (r *RTorrent) deleteTarget(row rtRow, all []rtRow, keep []string) (filesTarget, string) {
+ content := row.content()
+ if content == "" {
+ return filesTarget{}, "rTorrent did not say where they are"
+ }
+ if row.name == "" || row.name == "." || row.name == ".." || path.Base(content) != row.name {
+ return filesTarget{}, content + " is not named like the torrent"
+ }
+ for _, o := range all {
+ oc := o.content()
+ if o.hash == row.hash || oc == "" {
+ continue
+ }
+ if oc == content || strings.HasPrefix(oc, content+"/") || strings.HasPrefix(content, oc+"/") {
+ return filesTarget{}, "another torrent in rTorrent uses " + content
+ }
+ }
+ local := filepath.Clean(mapLocal(content, r.PathMap))
+ if filepath.Base(local) != row.name {
+ // A name holding this system's own separator would point elsewhere here.
+ return filesTarget{}, local + " is not named like the torrent here"
+ }
+ for _, k := range keep {
+ if k = strings.TrimSpace(k); k != "" && (underAny(local, []string{k}) || underAny(filepath.Clean(k), []string{local})) {
+ return filesTarget{}, local + " is a Library folder or holds one"
+ }
+ }
+ roots := []string{}
+ if r.SaveRoot != "" {
+ roots = append(roots, r.SaveRoot)
+ }
+ for _, m := range r.PathMap {
+ if m.Ours != "" {
+ roots = append(roots, m.Ours)
+ }
+ }
+ for _, root := range roots {
+ root = filepath.Clean(root)
+ if local == root || !underAny(local, []string{root}) {
+ continue
+ }
+ for _, c := range append([]string{r.Category}, r.Others...) {
+ if c != "" && local == filepath.Join(root, c) {
+ return filesTarget{}, local + " is the label's own folder"
+ }
+ }
+ fi, err := os.Lstat(local)
+ if err != nil {
+ return filesTarget{}, "HolyArrs cannot see " + local + "; they stay where rTorrent put them (" + content + ")"
+ }
+ if !fi.Mode().IsRegular() && !fi.IsDir() {
+ return filesTarget{}, local + " is a link or a special file"
+ }
+ rel, err := filepath.Rel(root, local)
+ if err != nil {
+ return filesTarget{}, err.Error()
+ }
+ return filesTarget{root: root, rel: rel}, ""
+ }
+ return filesTarget{}, "they are at " + content + " on the rTorrent machine, outside HolyArrs's save folder and path pairs; add a path pair to reach them, or delete them by hand"
+}
+
+// remove deletes the target without leaving its root. It says why on failure.
+func (t filesTarget) remove() string {
+ if t.root == "" || t.rel == "" || t.rel == "." {
+ return "nothing to delete"
+ }
+ root, err := os.OpenRoot(t.root)
+ if err != nil {
+ return err.Error()
+ }
+ defer root.Close()
+ if err := root.RemoveAll(t.rel); err != nil {
+ return err.Error()
+ }
+ return ""
+}
diff --git a/app/backend/internal/downloads/client_rtorrent_lab_test.go b/app/backend/internal/downloads/client_rtorrent_lab_test.go
new file mode 100644
index 0000000..27688ae
--- /dev/null
+++ b/app/backend/internal/downloads/client_rtorrent_lab_test.go
@@ -0,0 +1,151 @@
+//go:build lab
+
+package downloads
+
+import (
+ "context"
+ "errors"
+ "net/http"
+ "net/http/httptest"
+ "os"
+ "path/filepath"
+ "strings"
+ "testing"
+ "time"
+
+ domain "github.com/HolyArrs/holyarrs/app/backend/internal/core/model"
+)
+
+// TestLabRTorrent runs against a disposable rTorrent:
+//
+// HOLYARRS_LAB_RTORRENT the XML-RPC address, e.g. http://127.0.0.1:8000/RPC2
+// HOLYARRS_LAB_RTORRENT_USER and HOLYARRS_LAB_RTORRENT_PASSWORD_FILE when it asks for a sign-in
+// HOLYARRS_LAB_RTORRENT_THEIRS rTorrent's download folder (default /downloads)
+// HOLYARRS_LAB_RTORRENT_HERE the same folder as this test sees it
+//
+// The payload is placed in rTorrent's default folder first, so the torrent
+// finishes by checking the files, with no peers and no tracker.
+func TestLabRTorrent(t *testing.T) {
+ base := os.Getenv("HOLYARRS_LAB_RTORRENT")
+ here := os.Getenv("HOLYARRS_LAB_RTORRENT_HERE")
+ if base == "" || here == "" {
+ t.Skip("HOLYARRS_LAB_RTORRENT and HOLYARRS_LAB_RTORRENT_HERE are not set")
+ }
+ theirs := os.Getenv("HOLYARRS_LAB_RTORRENT_THEIRS")
+ if theirs == "" {
+ theirs = "/downloads"
+ }
+ pass := ""
+ if f := os.Getenv("HOLYARRS_LAB_RTORRENT_PASSWORD_FILE"); f != "" {
+ b, err := os.ReadFile(f)
+ if err != nil {
+ t.Fatal(err)
+ }
+ pass = strings.TrimSpace(string(b))
+ }
+ ctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute)
+ defer cancel()
+ const category = "holyarrs labtest"
+ e := NewRTorrent(base, os.Getenv("HOLYARRS_LAB_RTORRENT_USER"), pass, Client(base, true))
+ e.Category = category
+ e.PathMap = []domain.PathMap{{Theirs: theirs, Ours: here}}
+ e.Keep = func(context.Context) ([]string, error) { return []string{"/data/media"}, nil }
+
+ h, err := e.Health(ctx)
+ if err != nil {
+ t.Fatalf("health: %v", err)
+ }
+ t.Logf("rTorrent %s", h.Version)
+ if os.Getenv("HOLYARRS_LAB_RTORRENT_USER") != "" {
+ bad := NewRTorrent(base, os.Getenv("HOLYARRS_LAB_RTORRENT_USER"), "wrong", Client(base, true))
+ if _, err := bad.Health(ctx); !errors.Is(err, ErrAuth) {
+ t.Errorf("wrong password: %v", err)
+ }
+ }
+
+ name := "HolyArrs.Lab.rTorrent.Acceptance.2026.mkv"
+ payload := []byte("HolyArrs disposable rTorrent acceptance\n")
+ local := filepath.Join(here, "temp", name)
+ if err := os.MkdirAll(filepath.Dir(local), 0o777); err != nil {
+ t.Fatal(err)
+ }
+ if err := os.WriteFile(local, payload, 0o666); err != nil {
+ t.Fatal(err)
+ }
+ torrent := rtTorrentFile(name, payload)
+ hash, _ := torrentFileHash(torrent)
+ src := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, _ = w.Write(torrent) }))
+ defer src.Close()
+ req := AddRequest{URL: src.URL + "/lab.torrent", Name: name, Category: category, InfoHash: hash, AllowLocal: true, SavePath: "/data/downloads"}
+
+ id, err := e.Add(ctx, req)
+ if err != nil || id != hash {
+ t.Fatalf("add: %q %v", id, err)
+ }
+ again, err := e.Add(ctx, req)
+ if err != nil || again != id {
+ t.Errorf("second add: %q %v", again, err)
+ }
+ if got, err := e.Add(ctx, AddRequest{InfoHash: hash, Category: category, ReconcileOnly: true}); err != nil || got != id {
+ t.Errorf("reconcile: %q %v", got, err)
+ }
+ if jobs, err := e.List(ctx, category); err != nil || !hasJob(jobs, id) {
+ t.Errorf("list: %v %v", jobs, err)
+ }
+ if jobs, err := e.List(ctx, "tv-sonarr"); err != nil || hasJob(jobs, id) {
+ t.Errorf("another label lists it: %v", err)
+ }
+
+ var j Job
+ for ctx.Err() == nil {
+ if j, err = e.Get(ctx, id); err == nil && j.State == StateFinished {
+ break
+ }
+ time.Sleep(500 * time.Millisecond)
+ }
+ if j.State != StateFinished || j.Progress != 1 || len(j.Files) != 1 || j.Files[0].Name != name || j.Category != category {
+ t.Fatalf("finished: %+v %v", j, err)
+ }
+ if j.ContentPath != theirs+"/temp/"+name {
+ t.Errorf("content path %q", j.ContentPath)
+ }
+ t.Logf("finished: %s %s ratio %.2f", j.State, j.Detail, j.Ratio)
+
+ if err := e.PauseItem(ctx, id); err != nil {
+ t.Fatal(err)
+ }
+ if j, _ = e.Get(ctx, id); j.Detail != "complete" || j.ContentPath == "" {
+ t.Errorf("paused: %+v", j)
+ }
+ if st, err := e.Status(ctx); err != nil || !st.Paused {
+ t.Errorf("status while paused: %+v %v", st, err)
+ }
+ if err := e.ResumeItem(ctx, id); err != nil {
+ t.Fatal(err)
+ }
+ if j, _ = e.Get(ctx, id); j.Detail != "seeding" {
+ t.Errorf("resumed: %+v", j)
+ }
+
+ if err := e.Remove(ctx, id, true); err != nil {
+ t.Fatalf("remove: %v", err)
+ }
+ if _, err := e.Get(ctx, id); !errors.Is(err, ErrNotFound) {
+ t.Errorf("after remove: %v", err)
+ }
+ if _, err := os.Stat(local); !errors.Is(err, os.ErrNotExist) {
+ t.Errorf("the files were not deleted: %v", err)
+ }
+ if _, err := os.Stat(filepath.Join(here, "temp")); err != nil {
+ t.Errorf("the save folder went too: %v", err)
+ }
+}
+
+func hasJob(jobs []Job, id string) bool {
+ for _, j := range jobs {
+ if j.ID == id {
+ return true
+ }
+ }
+ return false
+}
diff --git a/app/backend/internal/downloads/client_rtorrent_test.go b/app/backend/internal/downloads/client_rtorrent_test.go
new file mode 100644
index 0000000..5ed4446
--- /dev/null
+++ b/app/backend/internal/downloads/client_rtorrent_test.go
@@ -0,0 +1,730 @@
+package downloads
+
+import (
+ "bytes"
+ "context"
+ "crypto/sha1"
+ "errors"
+ "fmt"
+ "io"
+ "net/http"
+ "net/http/httptest"
+ "os"
+ "path/filepath"
+ "regexp"
+ "strconv"
+ "strings"
+ "sync"
+ "testing"
+ "time"
+
+ domain "github.com/HolyArrs/holyarrs/app/backend/internal/core/model"
+)
+
+const rtHash = "29be7bfa8759643f2d5dac9f94d516c3378696ed"
+
+// fakeRTorrent is an rTorrent behind a web server's /RPC2, holding torrents in memory.
+type fakeRTorrent struct {
+ mu sync.Mutex
+ user string
+ pass string
+ version string
+ items map[string]*rtItem // by upper-case hash
+ loads int
+ calls []string
+ untrusted bool // refuse write calls the way ruTorrent's plugins do
+ dropLoad bool // answer a load with 0 but keep nothing
+ tooLarge bool // refuse a load for its size
+ hideFor int // lookups that miss a fresh item
+ path string // where it answers, /RPC2 when empty
+}
+
+type rtItem struct {
+ name, label, message, dir string
+ size, done int64
+ state, open, active int64
+ complete, hashing, multi int64
+ files [][]any
+}
+
+var rtCallParam = regexp.MustCompile(`(?s)<param>(.*?)</param>`)
+var rtMethodName = regexp.MustCompile(`<methodName>([^<]*)</methodName>`)
+
+func startRTorrent(t *testing.T, f *fakeRTorrent) string {
+ t.Helper()
+ if f.items == nil {
+ f.items = map[string]*rtItem{}
+ }
+ if f.version == "" {
+ f.version = "0.16.25"
+ }
+ if f.path == "" {
+ f.path = "/RPC2"
+ }
+ s := httptest.NewServer(http.HandlerFunc(f.serveHTTP))
+ t.Cleanup(s.Close)
+ return s.URL
+}
+
+func (f *fakeRTorrent) serveHTTP(w http.ResponseWriter, r *http.Request) {
+ if r.Method != http.MethodPost || r.URL.Path != f.path {
+ http.NotFound(w, r)
+ return
+ }
+ if f.user != "" || f.pass != "" {
+ u, p, ok := r.BasicAuth()
+ if !ok || u != f.user || p != f.pass {
+ w.WriteHeader(http.StatusUnauthorized)
+ return
+ }
+ }
+ body, _ := io.ReadAll(r.Body)
+ m := rtMethodName.FindSubmatch(body)
+ if m == nil {
+ http.Error(w, "bad call", http.StatusBadRequest)
+ return
+ }
+ var params []any
+ for _, p := range rtCallParam.FindAllSubmatch(body, -1) {
+ v, err := xmlrpcResponse([]byte("<methodResponse><params><param>" + string(p[1]) + "</param></params></methodResponse>"))
+ if err != nil {
+ http.Error(w, "bad param", http.StatusBadRequest)
+ return
+ }
+ params = append(params, v)
+ }
+ f.mu.Lock()
+ v, fault := f.dispatch(string(m[1]), params)
+ f.mu.Unlock()
+ var b bytes.Buffer
+ b.WriteString(`<?xml version="1.0"?><methodResponse>`)
+ if fault != nil {
+ b.WriteString(`<fault>`)
+ _ = xmlrpcValue(&b, map[string]any{"faultCode": fault.Code, "faultString": fault.Message})
+ b.WriteString(`</fault>`)
+ } else {
+ b.WriteString(`<params><param>`)
+ _ = xmlrpcValue(&b, v)
+ b.WriteString(`</param></params>`)
+ }
+ b.WriteString(`</methodResponse>`)
+ w.Header().Set("Content-Type", "text/xml")
+ _, _ = w.Write(b.Bytes())
+}
+
+func rtNoHashFault() *xmlrpcFault {
+ return &xmlrpcFault{Code: -500, Message: "invalid parameters: info-hash not found"}
+}
+
+// dispatch answers one call. The lock is held.
+func (f *fakeRTorrent) dispatch(method string, params []any) (any, *xmlrpcFault) {
+ f.calls = append(f.calls, method)
+ if strings.HasPrefix(method, "execute") || method == "d.delete_tied" || strings.HasPrefix(method, "d.custom5") {
+ return nil, &xmlrpcFault{Code: -1, Message: "test: forbidden call " + method}
+ }
+ write := strings.HasSuffix(method, ".set") || strings.HasPrefix(method, "load.") || method == "d.erase" || method == "d.stop" || method == "d.start"
+ if f.untrusted && write {
+ return nil, &xmlrpcFault{Code: -500, Message: fmt.Sprintf("Command \"%s\" is not allowed for untrusted connections", method)}
+ }
+ target := ""
+ if len(params) > 0 {
+ target, _ = params[0].(string)
+ }
+ if method == "system.multicall" {
+ list, _ := params[0].([]any)
+ out := []any{}
+ for _, c := range list {
+ mc, _ := c.(map[string]any)
+ name, _ := mc["methodName"].(string)
+ ps, _ := mc["params"].([]any)
+ v, fault := f.dispatch(name, ps)
+ if fault != nil {
+ out = append(out, map[string]any{"faultCode": fault.Code, "faultString": fault.Message})
+ } else {
+ out = append(out, []any{v})
+ }
+ }
+ return out, nil
+ }
+ switch method {
+ case "system.client_version":
+ return f.version, nil
+ case "throttle.global_down.rate", "throttle.global_up.rate", "throttle.global_down.total", "throttle.global_up.total":
+ return int64(7), nil
+ case "throttle.global_down.max_rate", "throttle.global_up.max_rate":
+ return int64(0), nil
+ case "throttle.global_down.max_rate.set", "throttle.global_up.max_rate.set":
+ return int64(0), nil
+ case "d.multicall2":
+ out := []any{}
+ for h, it := range f.items {
+ row := []any{}
+ for _, field := range params[2:] {
+ row = append(row, f.field(h, it, strings.TrimSuffix(field.(string), "=")))
+ }
+ out = append(out, row)
+ }
+ return out, nil
+ case "load.raw_start", "load.start":
+ f.loads++
+ if f.tooLarge {
+ return nil, &xmlrpcFault{Code: -509, Message: "XML-RPC request too large"}
+ }
+ if target != "" {
+ return nil, &xmlrpcFault{Code: -500, Message: "invalid parameters: target must be empty"}
+ }
+ it := &rtItem{state: 1, open: 1, active: 1, dir: "/downloads/temp"}
+ h := ""
+ if method == "load.raw_start" {
+ b, _ := params[1].([]byte)
+ hash, err := torrentFileHash(b)
+ if err != nil {
+ return int64(0), nil
+ }
+ h = strings.ToUpper(hash)
+ if m := regexp.MustCompile(`4:name(\d+):`).FindSubmatchIndex(b); m != nil {
+ n, _ := strconv.Atoi(string(b[m[2]:m[3]]))
+ it.name = string(b[m[1] : m[1]+n])
+ }
+ it.size, it.done = 1000, 0
+ it.files = [][]any{{it.name, int64(1000), int64(0), int64(1)}}
+ } else {
+ link, _ := params[1].(string)
+ if mh, ok := magnetHash(link); ok {
+ h = strings.ToUpper(mh)
+ }
+ it.name = h + ".meta"
+ }
+ for _, c := range params[2:] {
+ cmd, _ := c.(string)
+ k, v, _ := strings.Cut(cmd, "=")
+ switch k {
+ case "d.custom1.set":
+ it.label = v
+ case "d.directory.set":
+ it.dir = strings.Trim(v, `"`)
+ }
+ }
+ if h != "" && !f.dropLoad {
+ f.items[h] = it
+ }
+ return int64(0), nil
+ }
+ it, ok := f.items[target]
+ if !ok {
+ return nil, rtNoHashFault()
+ }
+ switch method {
+ case "d.custom1.set":
+ it.label, _ = params[1].(string)
+ return int64(0), nil
+ case "d.erase":
+ delete(f.items, target)
+ return int64(0), nil
+ case "d.stop":
+ it.state, it.active = 0, 0
+ return int64(0), nil
+ case "d.start":
+ it.state, it.open, it.active = 1, 1, 1
+ return int64(0), nil
+ case "d.resume":
+ it.active = 1
+ return int64(0), nil
+ case "f.multicall":
+ out := []any{}
+ for _, fl := range it.files {
+ out = append(out, fl)
+ }
+ return out, nil
+ }
+ if f.hideFor > 0 {
+ f.hideFor--
+ return nil, rtNoHashFault()
+ }
+ return f.field(target, it, method), nil
+}
+
+func (f *fakeRTorrent) field(h string, it *rtItem, name string) any {
+ switch name {
+ case "d.hash":
+ return h
+ case "d.name":
+ return it.name
+ case "d.custom1":
+ return it.label
+ case "d.size_bytes":
+ return it.size
+ case "d.completed_bytes":
+ return it.done
+ case "d.state":
+ return it.state
+ case "d.is_open":
+ return it.open
+ case "d.is_active":
+ return it.active
+ case "d.complete":
+ return it.complete
+ case "d.hashing":
+ return it.hashing
+ case "d.message":
+ return it.message
+ case "d.base_path":
+ if it.open == 0 {
+ return ""
+ }
+ if it.multi == 1 {
+ return it.dir
+ }
+ return it.dir + "/" + it.name
+ case "d.directory":
+ return it.dir
+ case "d.is_multi_file":
+ return it.multi
+ case "d.ratio":
+ return int64(1500)
+ }
+ return int64(0)
+}
+
+func (f *fakeRTorrent) called(method string) int {
+ f.mu.Lock()
+ defer f.mu.Unlock()
+ n := 0
+ for _, c := range f.calls {
+ if c == method {
+ n++
+ }
+ }
+ return n
+}
+
+// rtTorrentFile is a one-file torrent for name holding payload.
+func rtTorrentFile(name string, payload []byte) []byte {
+ piece := sha1.Sum(payload)
+ info := fmt.Sprintf("d6:lengthi%de4:name%d:%s12:piece lengthi16384e6:pieces20:%se", len(payload), len(name), name, piece[:])
+ announce := "http://127.0.0.1:9/announce"
+ return []byte(fmt.Sprintf("d8:announce%d:%s4:info%se", len(announce), announce, info))
+}
+
+func rtorrentHarness(t *testing.T) conformance {
+ t.Helper()
+ f := &fakeRTorrent{user: "lab", pass: "<rtorrent-test-password>"}
+ base := startRTorrent(t, f)
+ return conformance{
+ name: "rtorrent",
+ engine: NewRTorrent(base, f.user, f.pass, nil),
+ badKey: NewRTorrent(base, f.user, "wrong-password", nil),
+ at: func(base string) Engine { return NewRTorrent(base, f.user, f.pass, nil) },
+ secret: f.pass,
+ release: AddRequest{URL: "magnet:?xt=urn:btih:" + rtHash + "&dn=Lab", Name: "Lab.Torrent.Movie.2024.1080p.WEB.H264-HOLYARRS", Category: "movies", InfoHash: rtHash},
+ unknown: "0000000000000000000000000000000000000001",
+ appear: func() {
+ f.mu.Lock()
+ it := f.items[strings.ToUpper(rtHash)]
+ it.name, it.size, it.done = "Lab.Torrent.Movie.2024.1080p.WEB.H264-HOLYARRS.mkv", 1000, 500
+ it.files = [][]any{{it.name, int64(1000), int64(1), int64(2)}}
+ f.mu.Unlock()
+ },
+ adds: func() int { f.mu.Lock(); defer f.mu.Unlock(); return f.loads },
+ states: func(word string) {
+ f.mu.Lock()
+ defer f.mu.Unlock()
+ it := f.items[strings.ToUpper(rtHash)]
+ it.state, it.open, it.active, it.complete, it.hashing, it.message, it.done = 1, 1, 1, 0, 0, "", 500
+ switch word {
+ case "checking":
+ it.hashing = 1
+ case "stopped":
+ it.state, it.active = 0, 0
+ case "paused":
+ it.active = 0
+ case "seeding":
+ it.complete, it.done = 1, 1000
+ case "complete":
+ it.complete, it.done, it.state, it.active = 1, 1000, 0, 0
+ case "error":
+ it.open, it.active, it.message = 0, 0, "Storage error: [File chunk read error: No such file or directory]"
+ }
+ },
+ words: map[string]string{
+ "downloading": StateDownloading, "checking": StateQueued, "stopped": StatePaused, "paused": StatePaused,
+ "seeding": StateFinished, "complete": StateFinished, "error": StatePaused,
+ },
+ }
+}
+
+func TestRTorrentConformance(t *testing.T) { runConformance(t, rtorrentHarness(t)) }
+
+func TestRTorrentAddressGetsRPC2(t *testing.T) {
+ for in, want := range map[string]string{
+ "http://box:8000": "http://box:8000/RPC2",
+ "http://box:8000/": "http://box:8000/RPC2",
+ "https://seed.example/user/RPC2": "https://seed.example/user/RPC2",
+ "http://box:8080/plugins/httprpc/action.php": "http://box:8080/plugins/httprpc/action.php",
+ } {
+ if got := NewRTorrent(in, "", "", nil).endpoint; got != want {
+ t.Errorf("%s: %s, want %s", in, got, want)
+ }
+ }
+}
+
+func TestRTorrentFetchesTorrentAndSendsBytes(t *testing.T) {
+ payload := rtTorrentFile("Lab.Movie.2024.mkv", []byte("x"))
+ want, _ := torrentFileHash(payload)
+ source := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { _, _ = w.Write(payload) }))
+ defer source.Close()
+ f := &fakeRTorrent{}
+ e := NewRTorrent(startRTorrent(t, f), "", "", nil)
+ id, err := e.Add(context.Background(), AddRequest{URL: source.URL + "/a.torrent", Category: "tv shows", SavePath: "/data/my downloads, new", AllowLocal: true})
+ if err != nil || id != want {
+ t.Fatalf("add: %q %v", id, err)
+ }
+ it := f.items[strings.ToUpper(want)]
+ if it.label != "tv%20shows" || it.dir != "/data/my downloads, new" || f.called("load.start") != 0 {
+ t.Errorf("sent label %q folder %q, load.start %d", it.label, it.dir, f.called("load.start"))
+ }
+ j, err := e.Get(context.Background(), want)
+ if err != nil || j.Category != "tv shows" || len(j.Files) != 1 || j.Ratio != 1.5 {
+ t.Errorf("get: %+v %v", j, err)
+ }
+ jobs, _ := e.List(context.Background(), "tv shows")
+ if len(jobs) != 1 {
+ t.Errorf("list by decoded label: %d", len(jobs))
+ }
+}
+
+func TestRTorrentLabelWrittenPlainlyStillMatches(t *testing.T) {
+ f := &fakeRTorrent{items: map[string]*rtItem{strings.ToUpper(rtHash): {name: "x", label: "tv-sonarr", open: 1, state: 1}}}
+ e := NewRTorrent(startRTorrent(t, f), "", "", nil)
+ jobs, err := e.List(context.Background(), "tv-sonarr")
+ if err != nil || len(jobs) != 1 {
+ t.Fatalf("list: %v %v", jobs, err)
+ }
+ other, _ := e.List(context.Background(), "movies")
+ if len(other) != 0 {
+ t.Errorf("another label listed %d", len(other))
+ }
+}
+
+func TestRTorrentNoSaveFolderWithPathPairs(t *testing.T) {
+ f := &fakeRTorrent{}
+ e := NewRTorrent(startRTorrent(t, f), "", "", nil)
+ e.PathMap = []domain.PathMap{{Theirs: "/home/u/downloads", Ours: "/data/seedbox"}}
+ if _, err := e.Add(context.Background(), AddRequest{URL: "magnet:?xt=urn:btih:" + rtHash, Category: "movies", SavePath: "/data/downloads"}); err != nil {
+ t.Fatal(err)
+ }
+ if it := f.items[strings.ToUpper(rtHash)]; it.dir != "/downloads/temp" {
+ t.Errorf("a HolyArrs path went to a remote rTorrent: %q", it.dir)
+ }
+}
+
+func TestRTorrentMagnetBase32(t *testing.T) {
+ h, ok := magnetHash("magnet:?xt=urn:btih:FG7HX6UHLFSD6LK5VSPZJVIWYM3YNFXN")
+ if !ok || h != rtHash {
+ t.Errorf("base32 magnet: %q %v", h, ok)
+ }
+}
+
+func TestRTorrentReconcileOnlySendsNothing(t *testing.T) {
+ f := &fakeRTorrent{}
+ e := NewRTorrent(startRTorrent(t, f), "", "", nil)
+ if _, err := e.Add(context.Background(), AddRequest{InfoHash: rtHash, Category: "movies", ReconcileOnly: true}); !errors.Is(err, ErrUncertain) {
+ t.Errorf("unknown torrent: %v", err)
+ }
+ if f.loads != 0 || f.called("d.custom1.set") != 0 {
+ t.Errorf("a reconcile sent %d loads", f.loads)
+ }
+}
+
+func TestRTorrentUnseenAddIsUncertain(t *testing.T) {
+ old := rtorrentConfirm
+ rtorrentConfirm.tries, rtorrentConfirm.every = 3, time.Millisecond
+ t.Cleanup(func() { rtorrentConfirm = old })
+ f := &fakeRTorrent{dropLoad: true}
+ e := NewRTorrent(startRTorrent(t, f), "", "", nil)
+ _, err := e.Add(context.Background(), AddRequest{URL: "magnet:?xt=urn:btih:" + rtHash, Category: "movies"})
+ if !errors.Is(err, ErrUncertain) || f.loads != 1 {
+ t.Errorf("got %v after %d loads, want uncertain after 1", err, f.loads)
+ }
+}
+
+func TestRTorrentLateAddConfirmed(t *testing.T) {
+ old := rtorrentConfirm
+ rtorrentConfirm.every = time.Millisecond
+ t.Cleanup(func() { rtorrentConfirm = old })
+ f := &fakeRTorrent{}
+ base := startRTorrent(t, f)
+ e := NewRTorrent(base, "", "", nil)
+ f.mu.Lock()
+ f.hideFor = 1 + 2*len(rtorrentFields) // the lookup before the send, then two confirm rounds
+ f.mu.Unlock()
+ id, err := e.Add(context.Background(), AddRequest{URL: "magnet:?xt=urn:btih:" + rtHash, Category: "movies"})
+ if err != nil || id != rtHash || f.loads != 1 {
+ t.Errorf("late add: %q %v, %d loads", id, err, f.loads)
+ }
+}
+
+func TestRTorrentForeignLabelNotTaken(t *testing.T) {
+ f := &fakeRTorrent{items: map[string]*rtItem{strings.ToUpper(rtHash): {name: "x", label: "tv-sonarr", open: 1, state: 1}}}
+ e := NewRTorrent(startRTorrent(t, f), "", "", nil)
+ if _, err := e.Add(context.Background(), AddRequest{URL: "magnet:?xt=urn:btih:" + rtHash, Category: "movies"}); err == nil {
+ t.Error("a torrent of another label was taken")
+ }
+ if f.items[strings.ToUpper(rtHash)].label != "tv-sonarr" || f.loads != 0 {
+ t.Error("another app's torrent was relabelled or loaded again")
+ }
+ e.Category = "movies"
+ if err := e.Remove(context.Background(), rtHash, true); err == nil {
+ t.Error("another app's torrent was removed")
+ }
+ if err := e.PauseItem(context.Background(), rtHash); !errors.Is(err, ErrNotFound) {
+ t.Errorf("pause of another app's torrent: %v", err)
+ }
+}
+
+func TestRTorrentUntrustedCallsNamed(t *testing.T) {
+ f := &fakeRTorrent{untrusted: true}
+ _, err := NewRTorrent(startRTorrent(t, f), "", "", nil).Health(context.Background())
+ if err == nil || !strings.Contains(err.Error(), "untrusted") || !strings.Contains(err.Error(), "/RPC2") {
+ t.Errorf("health: %v", err)
+ }
+}
+
+func TestRTorrentHealthHints(t *testing.T) {
+ f := &fakeRTorrent{path: "/RPC2"}
+ base := startRTorrent(t, f)
+ if _, err := NewRTorrent(base+"/rutorrent", "", "", nil).Health(context.Background()); err == nil || !strings.Contains(err.Error(), "port 8000") {
+ t.Errorf("404: %v", err)
+ }
+ page := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { _, _ = w.Write([]byte("<html>ruTorrent</html>")) }))
+ defer page.Close()
+ if _, err := NewRTorrent(page.URL, "", "", nil).Health(context.Background()); err == nil || !strings.Contains(err.Error(), "check the path") {
+ t.Errorf("web page: %v", err)
+ }
+ f.version = "0.8.9"
+ if _, err := NewRTorrent(base, "", "", nil).Health(context.Background()); err == nil || !strings.Contains(err.Error(), "too old") {
+ t.Errorf("old: %v", err)
+ }
+}
+
+func TestRTorrentStates(t *testing.T) {
+ for _, c := range []struct {
+ row rtRow
+ state string
+ detail string
+ }{
+ {rtRow{hashing: 1, state: 1, open: 1}, StateQueued, "checking"},
+ {rtRow{name: "ABC.meta", state: 1, open: 1, active: 1}, StateDownloading, "metadata"},
+ {rtRow{size: 10, state: 1, open: 0, message: "Storage error: http://t.example/a?passkey=secret"}, StatePaused, "error: Storage error: http://t.example"},
+ {rtRow{size: 10, state: 0, open: 0, message: "Storage error: old"}, StatePaused, "stopped"},
+ {rtRow{size: 10, complete: 1, state: 1, open: 1, active: 1, basePath: "/d/x", name: "x"}, StateFinished, "seeding"},
+ {rtRow{size: 10, complete: 1, state: 0, open: 1, basePath: "/d/x", name: "x"}, StateFinished, "complete"},
+ {rtRow{size: 10, state: 1, open: 1, active: 0}, StatePaused, "paused"},
+ {rtRow{size: 10, state: 1, open: 1, active: 1, message: "Tracker: [Timeout was reached]"}, StateDownloading, "downloading"},
+ } {
+ state, detail := rtState(c.row, c.row.content())
+ if state != c.state || !strings.HasPrefix(detail, c.detail) || strings.Contains(detail, "secret") {
+ t.Errorf("%+v: %s %q, want %s %q", c.row, state, detail, c.state, c.detail)
+ }
+ }
+ if !cantUseFiles(Job{State: StatePaused, Detail: "error: Storage error"}) {
+ t.Error("an rTorrent storage error does not wait for a late mount")
+ }
+}
+
+func TestRTorrentContentPath(t *testing.T) {
+ for _, c := range []struct {
+ row rtRow
+ want string
+ }{
+ {rtRow{basePath: "/d/x.mkv"}, "/d/x.mkv"},
+ {rtRow{dir: "/d", name: "x.mkv"}, "/d/x.mkv"},
+ {rtRow{dir: "/d/Show.S01", name: "Show.S01", multi: 1}, "/d/Show.S01"},
+ {rtRow{dir: "relative", name: "x"}, ""},
+ {rtRow{}, ""},
+ } {
+ if got := c.row.content(); got != c.want {
+ t.Errorf("%+v: %q, want %q", c.row, got, c.want)
+ }
+ }
+}
+
+func TestRTorrentRemoveDeletesOnlySafeFiles(t *testing.T) {
+ here := t.TempDir()
+ put := func(rel string) string {
+ p := filepath.Join(here, filepath.FromSlash(rel))
+ _ = os.MkdirAll(filepath.Dir(p), 0o755)
+ _ = os.WriteFile(p, []byte("x"), 0o644)
+ return p
+ }
+ type item struct{ hash, name, dir string }
+ for _, c := range []struct {
+ name string
+ items []item
+ pathMap []domain.PathMap
+ gone bool
+ }{
+ {"inside a path pair", []item{{rtHash, "a.mkv", "/remote/movies"}}, []domain.PathMap{{Theirs: "/remote", Ours: here}}, true},
+ {"no path pair reaches it", []item{{rtHash, "a.mkv", "/elsewhere/movies"}}, []domain.PathMap{{Theirs: "/remote", Ours: here}}, false},
+ {"no pairs at all", []item{{rtHash, "a.mkv", "/remote/movies"}}, nil, false},
+ {"another torrent uses it", []item{{rtHash, "a.mkv", "/remote/movies"}, {"1111111111111111111111111111111111111111", "a.mkv", "/remote/movies"}}, []domain.PathMap{{Theirs: "/remote", Ours: here}}, false},
+ {"not visible", []item{{rtHash, "missing.mkv", "/remote/movies"}}, []domain.PathMap{{Theirs: "/remote", Ours: here}}, false},
+ {"names a Library folder", []item{{rtHash, "library", "/remote"}}, []domain.PathMap{{Theirs: "/remote", Ours: here}}, false},
+ {"holds a Library folder", []item{{rtHash, "movies", "/remote"}}, []domain.PathMap{{Theirs: "/remote", Ours: here}}, false},
+ {"a name with a backslash", []item{{rtHash, `movies.mkv`, "/remote"}}, []domain.PathMap{{Theirs: "/remote", Ours: here}}, false},
+ } {
+ t.Run(c.name, func(t *testing.T) {
+ file := put("movies/a.mkv")
+ kept := put("library/Film (2024)/Film.mkv")
+ if c.name == "holds a Library folder" {
+ kept = put("movies/Film (2024)/Film.mkv")
+ }
+ f := &fakeRTorrent{items: map[string]*rtItem{}}
+ for _, it := range c.items {
+ f.items[strings.ToUpper(it.hash)] = &rtItem{name: it.name, label: "movies", dir: it.dir, open: 1, state: 1, complete: 1, size: 1, done: 1}
+ }
+ e := NewRTorrent(startRTorrent(t, f), "", "", nil)
+ e.Category, e.PathMap = "movies", c.pathMap
+ e.Keep = func(context.Context) ([]string, error) {
+ return []string{filepath.Join(here, "library"), filepath.Join(here, "movies", "Film (2024)")}, nil
+ }
+ var logged []string
+ old := logf
+ logf = func(format string, a ...any) { logged = append(logged, fmt.Sprintf(format, a...)) }
+ t.Cleanup(func() { logf = old })
+ if err := e.Remove(context.Background(), rtHash, true); err != nil {
+ t.Fatalf("remove: %v", err)
+ }
+ if _, ok := f.items[strings.ToUpper(rtHash)]; ok {
+ t.Error("the torrent is still in rTorrent")
+ }
+ _, statErr := os.Stat(file)
+ if gone := errors.Is(statErr, os.ErrNotExist); gone != c.gone {
+ t.Errorf("files gone %v, want %v (log %v)", gone, c.gone, logged)
+ }
+ if !c.gone && len(logged) == 0 {
+ t.Error("kept files were not logged")
+ }
+ if _, err := os.Stat(filepath.Join(here, "movies")); err != nil {
+ t.Error("the label folder went too")
+ }
+ if _, err := os.Stat(kept); err != nil {
+ t.Errorf("a Library file went: %v", err)
+ }
+ _ = os.RemoveAll(filepath.Join(here, "movies", "Film (2024)"))
+ })
+ }
+}
+
+func TestRTorrentRemoveDeletesNothingWithoutLibraryFolders(t *testing.T) {
+ here := t.TempDir()
+ file := filepath.Join(here, "a.mkv")
+ _ = os.WriteFile(file, []byte("x"), 0o644)
+ f := &fakeRTorrent{items: map[string]*rtItem{strings.ToUpper(rtHash): {name: "a.mkv", label: "movies", dir: "/remote", open: 1, state: 1, size: 1}}}
+ e := NewRTorrent(startRTorrent(t, f), "", "", nil)
+ e.PathMap = []domain.PathMap{{Theirs: "/remote", Ours: here}}
+ old := logf
+ logf = func(string, ...any) {}
+ t.Cleanup(func() { logf = old })
+ for _, keep := range []func(context.Context) ([]string, error){nil, func(context.Context) ([]string, error) { return nil, errors.New("locked") }} {
+ f.items[strings.ToUpper(rtHash)] = &rtItem{name: "a.mkv", label: "movies", dir: "/remote", open: 1, state: 1, size: 1}
+ e.Keep = keep
+ if err := e.Remove(context.Background(), rtHash, true); err != nil {
+ t.Fatal(err)
+ }
+ if _, err := os.Stat(file); err != nil {
+ t.Errorf("deleted without knowing the Library folders: %v", err)
+ }
+ }
+}
+
+func TestRTorrentRemoveUnknownAndKeep(t *testing.T) {
+ f := &fakeRTorrent{items: map[string]*rtItem{strings.ToUpper(rtHash): {name: "x", label: "movies", open: 1, state: 1}}}
+ e := NewRTorrent(startRTorrent(t, f), "", "", nil)
+ if err := e.Remove(context.Background(), "1111111111111111111111111111111111111111", false); !errors.Is(err, ErrNotFound) {
+ t.Errorf("unknown: %v", err)
+ }
+ if err := e.Remove(context.Background(), "../etc", false); err == nil {
+ t.Error("a bad id was sent")
+ }
+ if err := e.Remove(context.Background(), rtHash, false); err != nil || len(f.items) != 0 {
+ t.Errorf("remove: %v", err)
+ }
+}
+
+func TestRTorrentPauseResumeAndStatus(t *testing.T) {
+ f := &fakeRTorrent{items: map[string]*rtItem{
+ strings.ToUpper(rtHash): {name: "ours", label: "movies", open: 1, state: 1, active: 1, size: 10},
+ "2222222222222222222222222222222222222222": {name: "theirs", label: "tv-sonarr", open: 1, state: 1, active: 1, size: 10},
+ }}
+ e := NewRTorrent(startRTorrent(t, f), "", "", nil)
+ e.Category = "movies"
+ ctx := context.Background()
+ if err := e.PauseItem(ctx, rtHash); err != nil {
+ t.Fatal(err)
+ }
+ if j, _ := e.Get(ctx, rtHash); j.State != StatePaused {
+ t.Errorf("paused: %s", j.State)
+ }
+ if st, err := e.Status(ctx); err != nil || !st.Paused {
+ t.Errorf("status: %+v %v", st, err)
+ }
+ if err := e.ResumeItem(ctx, rtHash); err != nil {
+ t.Fatal(err)
+ }
+ if err := e.PauseAll(ctx); err != nil {
+ t.Fatal(err)
+ }
+ if f.items["2222222222222222222222222222222222222222"].state != 1 {
+ t.Error("pause all stopped another app's torrent")
+ }
+ if err := e.ResumeAll(ctx); err != nil || f.items[strings.ToUpper(rtHash)].active != 1 {
+ t.Errorf("resume all: %v", err)
+ }
+ if err := e.MoveTop(ctx, rtHash); !errors.Is(err, ErrNotSupported) {
+ t.Errorf("move top: %v", err)
+ }
+ var _ Controller = e
+}
+
+func TestRTorrentSizeRefusalIsFinal(t *testing.T) {
+ f := &fakeRTorrent{tooLarge: true}
+ e := NewRTorrent(startRTorrent(t, f), "", "", nil)
+ _, err := e.Add(context.Background(), AddRequest{URL: "magnet:?xt=urn:btih:" + rtHash, Category: "movies"})
+ if err == nil || errors.Is(err, ErrUncertain) || !errors.Is(err, ErrTooLarge) || !strings.Contains(err.Error(), "size_limit") || f.loads != 1 {
+ t.Errorf("got %v after %d loads, want a final size refusal", err, f.loads)
+ }
+ big := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusRequestEntityTooLarge) }))
+ defer big.Close()
+ _, err = NewRTorrent(big.URL, "", "", nil).Add(context.Background(), AddRequest{URL: "magnet:?xt=urn:btih:" + rtHash, Category: "movies"})
+ if err == nil || errors.Is(err, ErrUncertain) || !errors.Is(err, ErrTooLarge) {
+ t.Errorf("413: %v", err)
+ }
+}
+
+func TestXMLRPCOddNameKeepsTheList(t *testing.T) {
+ body := "<methodResponse><params><param><value><array><data>" +
+ "<value><array><data><value><string>badnameÿ&#1;</string></value></data></array></value>" +
+ "<value><array><data><value><string>good</string></value></data></array></value>" +
+ "</data></array></value></param></params></methodResponse>"
+ v, err := xmlrpcResponse([]byte(body))
+ if err != nil {
+ t.Fatal(err)
+ }
+ rows := v.([]any)
+ if len(rows) != 2 || rows[1].([]any)[0] != "good" || !strings.HasPrefix(rows[0].([]any)[0].(string), "bad") {
+ t.Errorf("rows: %#v", rows)
+ }
+}
+
+func TestRTorrentMultiFilePaths(t *testing.T) {
+ f := &fakeRTorrent{items: map[string]*rtItem{strings.ToUpper(rtHash): {name: "Show.S01", label: "tv", dir: "/downloads/Show.S01", multi: 1, open: 1, state: 1, size: 10,
+ files: [][]any{{"Show.S01E01.mkv", int64(5), int64(1), int64(1)}, {"Subs/en.srt", int64(5), int64(0), int64(1)}}}}}
+ j, err := NewRTorrent(startRTorrent(t, f), "", "", nil).Get(context.Background(), rtHash)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if j.SavePath != "/downloads" || j.ContentPath != "/downloads/Show.S01" || len(j.Files) != 2 || j.Files[0].Name != "Show.S01/Show.S01E01.mkv" || j.Files[1].Name != "Show.S01/Subs/en.srt" {
+ t.Errorf("paths: save %q content %q files %+v", j.SavePath, j.ContentPath, j.Files)
+ }
+}
diff --git a/app/backend/internal/downloads/client_rtorrent_xmlrpc.go b/app/backend/internal/downloads/client_rtorrent_xmlrpc.go
new file mode 100644
index 0000000..292b701
--- /dev/null
+++ b/app/backend/internal/downloads/client_rtorrent_xmlrpc.go
@@ -0,0 +1,408 @@
+package downloads
+
+import (
+ "bytes"
+ "encoding/base64"
+ "encoding/xml"
+ "errors"
+ "fmt"
+ "math"
+ "regexp"
+ "slices"
+ "strconv"
+ "strings"
+)
+
+// xmlrpcMaxDepth bounds nested arrays and structs in an answer. rTorrent answers
+// nest three deep at most (a list of rows of values).
+const xmlrpcMaxDepth = 16
+
+var errXMLRPCAnswer = errors.New("the address answered, but not like rTorrent's XML-RPC")
+
+// xmlrpcFault is an XML-RPC fault answer.
+type xmlrpcFault struct {
+ Code int64
+ Message string
+}
+
+// Error implements error.
+func (f *xmlrpcFault) Error() string {
+ return fmt.Sprintf("rTorrent refused the call (%d): %s", f.Code, cleanDetail(f.Message))
+}
+
+// unknownHash reports a fault for an info hash rTorrent does not hold. Older
+// builds say "Could not find info-hash.", newer ones "info-hash not found".
+func (f *xmlrpcFault) unknownHash() bool {
+ m := strings.ToLower(f.Message)
+ return strings.Contains(m, "could not find info-hash") || strings.Contains(m, "info-hash not found")
+}
+
+// untrusted reports ruTorrent or rTorrent refusing a command for the
+// connection, as newer builds do for calls passed through ruTorrent's plugins.
+func (f *xmlrpcFault) untrusted() bool {
+ return strings.Contains(strings.ToLower(f.Message), "not allowed")
+}
+
+// tooLarge reports an answer or a call over rTorrent's XML-RPC size limit.
+func (f *xmlrpcFault) tooLarge() bool {
+ m := strings.ToLower(f.Message)
+ return strings.Contains(m, "size limit") || strings.Contains(m, "too large")
+}
+
+// xmlrpcCall encodes one method call. Arguments are strings, integers, byte
+// slices (sent as base64) and slices of those.
+func xmlrpcCall(method string, args ...any) ([]byte, error) {
+ var b bytes.Buffer
+ b.WriteString(`<?xml version="1.0"?><methodCall><methodName>`)
+ _ = xml.EscapeText(&b, []byte(method))
+ b.WriteString(`</methodName><params>`)
+ for _, a := range args {
+ b.WriteString(`<param>`)
+ if err := xmlrpcValue(&b, a); err != nil {
+ return nil, err
+ }
+ b.WriteString(`</param>`)
+ }
+ b.WriteString(`</params></methodCall>`)
+ return b.Bytes(), nil
+}
+
+func xmlrpcValue(b *bytes.Buffer, v any) error {
+ b.WriteString(`<value>`)
+ switch x := v.(type) {
+ case string:
+ b.WriteString(`<string>`)
+ _ = xml.EscapeText(b, []byte(x))
+ b.WriteString(`</string>`)
+ case int:
+ xmlrpcInt(b, int64(x))
+ case int64:
+ xmlrpcInt(b, x)
+ case []byte:
+ b.WriteString(`<base64>`)
+ b.WriteString(base64.StdEncoding.EncodeToString(x))
+ b.WriteString(`</base64>`)
+ case []string:
+ b.WriteString(`<array><data>`)
+ for _, s := range x {
+ _ = xmlrpcValue(b, s)
+ }
+ b.WriteString(`</data></array>`)
+ case map[string]any:
+ keys := make([]string, 0, len(x))
+ for k := range x {
+ keys = append(keys, k)
+ }
+ slices.Sort(keys)
+ b.WriteString(`<struct>`)
+ for _, k := range keys {
+ b.WriteString(`<member><name>`)
+ _ = xml.EscapeText(b, []byte(k))
+ b.WriteString(`</name>`)
+ if err := xmlrpcValue(b, x[k]); err != nil {
+ return err
+ }
+ b.WriteString(`</member>`)
+ }
+ b.WriteString(`</struct>`)
+ case []any:
+ b.WriteString(`<array><data>`)
+ for _, item := range x {
+ if err := xmlrpcValue(b, item); err != nil {
+ return err
+ }
+ }
+ b.WriteString(`</data></array>`)
+ default:
+ return fmt.Errorf("xml-rpc: cannot send a %T", v)
+ }
+ b.WriteString(`</value>`)
+ return nil
+}
+
+func xmlrpcInt(b *bytes.Buffer, n int64) {
+ tag := "i8"
+ if n >= math.MinInt32 && n <= math.MaxInt32 {
+ tag = "i4"
+ }
+ fmt.Fprintf(b, "<%s>%d</%s>", tag, n, tag)
+}
+
+// xmlrpcResponse decodes a methodResponse into its one value: string, int64,
+// bool, float64, []byte, []any or map[string]any. A fault comes back as
+// *xmlrpcFault.
+func xmlrpcResponse(body []byte) (any, error) {
+ d := xml.NewDecoder(bytes.NewReader(xmlrpcClean(body)))
+ d.Strict = true
+ d.Entity = map[string]string{}
+ start, err := xmlrpcNext(d)
+ if err != nil || start.Name.Local != "methodResponse" {
+ return nil, errXMLRPCAnswer
+ }
+ el, err := xmlrpcNext(d)
+ if err != nil {
+ return nil, errXMLRPCAnswer
+ }
+ switch el.Name.Local {
+ case "params":
+ if p, err := xmlrpcNext(d); err != nil || p.Name.Local != "param" {
+ return nil, errXMLRPCAnswer
+ }
+ if v, err := xmlrpcNext(d); err != nil || v.Name.Local != "value" {
+ return nil, errXMLRPCAnswer
+ }
+ return xmlrpcReadValue(d, 0)
+ case "fault":
+ if v, err := xmlrpcNext(d); err != nil || v.Name.Local != "value" {
+ return nil, errXMLRPCAnswer
+ }
+ v, err := xmlrpcReadValue(d, 0)
+ if err != nil {
+ return nil, err
+ }
+ m, ok := v.(map[string]any)
+ if !ok {
+ return nil, errXMLRPCAnswer
+ }
+ f := &xmlrpcFault{}
+ f.Code, _ = m["faultCode"].(int64)
+ f.Message, _ = m["faultString"].(string)
+ return nil, f
+ }
+ return nil, errXMLRPCAnswer
+}
+
+// xmlrpcNext returns the next start element, skipping text, comments and the
+// prolog. A directive (a DOCTYPE with entities) is refused.
+func xmlrpcNext(d *xml.Decoder) (xml.StartElement, error) {
+ for {
+ tok, err := d.Token()
+ if err != nil {
+ return xml.StartElement{}, err
+ }
+ switch t := tok.(type) {
+ case xml.StartElement:
+ return t, nil
+ case xml.EndElement:
+ return xml.StartElement{}, errXMLRPCAnswer
+ case xml.Directive:
+ return xml.StartElement{}, errXMLRPCAnswer
+ }
+ }
+}
+
+// xmlrpcReadValue reads what follows an opened <value> up to its </value>.
+func xmlrpcReadValue(d *xml.Decoder, depth int) (any, error) {
+ if depth > xmlrpcMaxDepth {
+ return nil, errXMLRPCAnswer
+ }
+ var text strings.Builder
+ for {
+ tok, err := d.Token()
+ if err != nil {
+ return nil, errXMLRPCAnswer
+ }
+ switch t := tok.(type) {
+ case xml.CharData:
+ text.Write(t)
+ case xml.Directive:
+ return nil, errXMLRPCAnswer
+ case xml.EndElement:
+ // A value with no type tag is a string.
+ return text.String(), nil
+ case xml.StartElement:
+ v, err := xmlrpcTyped(d, t.Name.Local, depth)
+ if err != nil {
+ return nil, err
+ }
+ if err := xmlrpcClose(d); err != nil {
+ return nil, err
+ }
+ return v, nil
+ }
+ }
+}
+
+// xmlrpcClose skips whitespace up to the </value> that ends a typed value.
+func xmlrpcClose(d *xml.Decoder) error {
+ for {
+ tok, err := d.Token()
+ if err != nil {
+ return errXMLRPCAnswer
+ }
+ switch t := tok.(type) {
+ case xml.EndElement:
+ return nil
+ case xml.CharData:
+ if len(bytes.TrimSpace(t)) != 0 {
+ return errXMLRPCAnswer
+ }
+ case xml.StartElement, xml.Directive:
+ return errXMLRPCAnswer
+ }
+ }
+}
+
+func xmlrpcTyped(d *xml.Decoder, tag string, depth int) (any, error) {
+ switch tag {
+ case "array":
+ return xmlrpcArray(d, depth)
+ case "struct":
+ return xmlrpcStruct(d, depth)
+ }
+ var s string
+ if err := xmlrpcText(d, &s); err != nil {
+ return nil, err
+ }
+ switch tag {
+ case "string":
+ return s, nil
+ case "i4", "i8", "int":
+ n, err := strconv.ParseInt(strings.TrimSpace(s), 10, 64)
+ if err != nil {
+ return nil, errXMLRPCAnswer
+ }
+ return n, nil
+ case "boolean":
+ return strings.TrimSpace(s) == "1", nil
+ case "double":
+ f, err := strconv.ParseFloat(strings.TrimSpace(s), 64)
+ if err != nil {
+ return nil, errXMLRPCAnswer
+ }
+ return f, nil
+ case "base64":
+ b, err := base64.StdEncoding.DecodeString(strings.Join(strings.Fields(s), ""))
+ if err != nil {
+ return nil, errXMLRPCAnswer
+ }
+ return b, nil
+ case "nil":
+ return nil, nil
+ }
+ return s, nil
+}
+
+// xmlrpcText reads plain text up to the end of the current element.
+func xmlrpcText(d *xml.Decoder, out *string) error {
+ var b strings.Builder
+ for {
+ tok, err := d.Token()
+ if err != nil {
+ return errXMLRPCAnswer
+ }
+ switch t := tok.(type) {
+ case xml.CharData:
+ b.Write(t)
+ case xml.EndElement:
+ *out = b.String()
+ return nil
+ case xml.StartElement, xml.Directive:
+ return errXMLRPCAnswer
+ }
+ }
+}
+
+func xmlrpcArray(d *xml.Decoder, depth int) (any, error) {
+ if s, err := xmlrpcNext(d); err != nil || s.Name.Local != "data" {
+ return nil, errXMLRPCAnswer
+ }
+ out := []any{}
+ for {
+ tok, err := d.Token()
+ if err != nil {
+ return nil, errXMLRPCAnswer
+ }
+ switch t := tok.(type) {
+ case xml.StartElement:
+ if t.Name.Local != "value" {
+ return nil, errXMLRPCAnswer
+ }
+ v, err := xmlrpcReadValue(d, depth+1)
+ if err != nil {
+ return nil, err
+ }
+ out = append(out, v)
+ case xml.EndElement:
+ // </data>, then </array>.
+ if err := xmlrpcClose(d); err != nil {
+ return nil, err
+ }
+ return out, nil
+ case xml.Directive:
+ return nil, errXMLRPCAnswer
+ }
+ }
+}
+
+func xmlrpcStruct(d *xml.Decoder, depth int) (any, error) {
+ out := map[string]any{}
+ for {
+ tok, err := d.Token()
+ if err != nil {
+ return nil, errXMLRPCAnswer
+ }
+ switch t := tok.(type) {
+ case xml.StartElement:
+ if t.Name.Local != "member" {
+ return nil, errXMLRPCAnswer
+ }
+ n, err := xmlrpcNext(d)
+ if err != nil || n.Name.Local != "name" {
+ return nil, errXMLRPCAnswer
+ }
+ var name string
+ if err := xmlrpcText(d, &name); err != nil {
+ return nil, err
+ }
+ if v, err := xmlrpcNext(d); err != nil || v.Name.Local != "value" {
+ return nil, errXMLRPCAnswer
+ }
+ v, err := xmlrpcReadValue(d, depth+1)
+ if err != nil {
+ return nil, err
+ }
+ out[name] = v
+ if err := xmlrpcClose(d); err != nil {
+ return nil, err
+ }
+ case xml.EndElement:
+ return out, nil
+ case xml.Directive:
+ return nil, errXMLRPCAnswer
+ }
+ }
+}
+
+// badCharRef matches character references to control characters, which XML
+// forbids and the decoder refuses.
+var badCharRef = regexp.MustCompile(`&#(x0*[0-8bBcCeEfF]|x0*1[0-9a-fA-F]|0*([0-8]|1[124-9]|2[0-9]|3[01]));`)
+
+// xmlrpcClean makes an answer decodable when a torrent name or message holds
+// bytes XML does not allow: invalid UTF-8 and control characters become U+FFFD,
+// so one odd name never hides every other torrent.
+func xmlrpcClean(b []byte) []byte {
+ bad := func(r rune) bool { return r < 0x20 && r != '\t' && r != '\n' && r != '\r' }
+ b = bytes.ToValidUTF8(b, []byte("\uFFFD"))
+ if bytes.IndexFunc(b, bad) >= 0 {
+ b = bytes.Map(func(r rune) rune {
+ if bad(r) {
+ return '\uFFFD'
+ }
+ return r
+ }, b)
+ }
+ if bytes.Contains(b, []byte("&#")) {
+ b = badCharRef.ReplaceAll(b, []byte("\uFFFD"))
+ }
+ return b
+}
+
+// cleanDetail folds whitespace and cuts a client message to 160 characters.
+func cleanDetail(s string) string {
+ s = strings.Join(strings.Fields(s), " ")
+ if r := []rune(s); len(r) > 160 {
+ s = string(r[:160])
+ }
+ return s
+}
diff --git a/app/backend/internal/downloads/client_rtorrent_xmlrpc_test.go b/app/backend/internal/downloads/client_rtorrent_xmlrpc_test.go
new file mode 100644
index 0000000..25a261e
--- /dev/null
+++ b/app/backend/internal/downloads/client_rtorrent_xmlrpc_test.go
@@ -0,0 +1,114 @@
+package downloads
+
+import (
+ "errors"
+ "strings"
+ "testing"
+)
+
+func TestXMLRPCEncodeCall(t *testing.T) {
+ b, err := xmlrpcCall("load.raw_start", "", []byte("d4:infoe"), "d.custom1.set=movies", int64(7), []any{"a", int64(1)})
+ if err != nil {
+ t.Fatal(err)
+ }
+ s := string(b)
+ for _, want := range []string{
+ "<methodName>load.raw_start</methodName>",
+ "<param><value><string></string></value></param>",
+ "<base64>ZDQ6aW5mb2U=</base64>",
+ "<string>d.custom1.set=movies</string>",
+ "<i4>7</i4>",
+ "<array><data><value><string>a</string></value><value><i4>1</i4></value></data></array>",
+ } {
+ if !strings.Contains(s, want) {
+ t.Errorf("call lacks %q:\n%s", want, s)
+ }
+ }
+ if b, _ := xmlrpcCall("x", "<&>\"'"); !strings.Contains(string(b), "&lt;&amp;&gt;") {
+ t.Errorf("text not escaped: %s", b)
+ }
+ if _, err := xmlrpcCall("x", struct{}{}); err == nil {
+ t.Error("an unknown argument type was encoded")
+ }
+}
+
+func TestXMLRPCDecodeValues(t *testing.T) {
+ body := `<?xml version="1.0" encoding="UTF-8"?>
+<methodResponse><params><param><value><array><data>
+ <value><array><data>
+ <value><string>ABCDEF</string></value>
+ <value>bare text</value>
+ <value><i8>10737418240</i8></value>
+ <value><i4>-3</i4></value>
+ <value><int>5</int></value>
+ <value><string/></value>
+ <value></value>
+ <value><boolean>1</boolean></value>
+ <value><double>1.5</double></value>
+ <value><base64>aGk=</base64></value>
+ <value><struct><member><name>k</name><value><i4>2</i4></value></member></struct></value>
+ </data></array></value>
+</data></array></value></param></params></methodResponse>`
+ v, err := xmlrpcResponse([]byte(body))
+ if err != nil {
+ t.Fatal(err)
+ }
+ rows, ok := v.([]any)
+ if !ok || len(rows) != 1 {
+ t.Fatalf("rows: %#v", v)
+ }
+ row := rows[0].([]any)
+ want := []any{"ABCDEF", "bare text", int64(10737418240), int64(-3), int64(5), "", "", true, 1.5, []byte("hi")}
+ for i, w := range want {
+ got := row[i]
+ if gb, ok := got.([]byte); ok {
+ if string(gb) != string(w.([]byte)) {
+ t.Errorf("value %d: %q, want %q", i, gb, w)
+ }
+ continue
+ }
+ if got != w {
+ t.Errorf("value %d: %#v, want %#v", i, got, w)
+ }
+ }
+ if m, ok := row[10].(map[string]any); !ok || m["k"] != int64(2) {
+ t.Errorf("struct: %#v", row[10])
+ }
+}
+
+func TestXMLRPCDecodeFault(t *testing.T) {
+ body := `<methodResponse><fault><value><struct>
+<member><name>faultCode</name><value><i4>-501</i4></value></member>
+<member><name>faultString</name><value><string>Could not find info-hash.</string></value></member>
+</struct></value></fault></methodResponse>`
+ _, err := xmlrpcResponse([]byte(body))
+ var f *xmlrpcFault
+ if !errors.As(err, &f) || f.Code != -501 || f.Message != "Could not find info-hash." {
+ t.Fatalf("fault: %#v %v", f, err)
+ }
+ if !f.unknownHash() {
+ t.Error("an unknown hash fault was not recognised")
+ }
+ newer := `<methodResponse><fault><value><struct><member><name>faultCode</name><value><i8>-500</i8></value></member><member><name>faultString</name><value><string>invalid parameters: info-hash not found</string></value></member></struct></value></fault></methodResponse>`
+ if _, err := xmlrpcResponse([]byte(newer)); !errors.As(err, &f) || !f.unknownHash() || f.Code != -500 {
+ t.Errorf("rTorrent 0.16 unknown hash fault: %v", err)
+ }
+ if _, err := xmlrpcResponse([]byte(`<methodResponse><params><param><value><array><data/></array></value></param></params></methodResponse>`)); err != nil {
+ t.Errorf("empty list: %v", err)
+ }
+}
+
+func TestXMLRPCDecodeRefusesJunk(t *testing.T) {
+ for name, body := range map[string]string{
+ "html": `<html><body>login</body></html>`,
+ "empty": ``,
+ "no value": `<methodResponse><params><param></param></params></methodResponse>`,
+ "bad int": `<methodResponse><params><param><value><i4>x</i4></value></param></params></methodResponse>`,
+ "doctype": `<!DOCTYPE x [<!ENTITY a "b">]><methodResponse><params><param><value>&a;</value></param></params></methodResponse>`,
+ "deep": `<methodResponse><params><param><value>` + strings.Repeat("<array><data><value>", 80) + `x` + strings.Repeat("</value></data></array>", 80) + `</value></param></params></methodResponse>`,
+ } {
+ if _, err := xmlrpcResponse([]byte(body)); err == nil {
+ t.Errorf("%s: decoded", name)
+ }
+ }
+}
diff --git a/app/backend/internal/downloads/client_sync_test.go b/app/backend/internal/downloads/client_sync_test.go
index e7e6540..9804501 100644
--- a/app/backend/internal/downloads/client_sync_test.go
+++ b/app/backend/internal/downloads/client_sync_test.go
@@ -391,7 +391,7 @@ func TestSabHistoryCounter(t *testing.T) {
func adapterEngines(t *testing.T, base string) map[string]Engine {
t.Helper()
out := map[string]Engine{}
- for _, kind := range []string{"qbittorrent", "sabnzbd", "transmission", "deluge", "nzbget"} {
+ for _, kind := range []string{"qbittorrent", "sabnzbd", "transmission", "deluge", "rtorrent", "nzbget"} {
e, err := (&Manager{}).EngineFor(context.Background(), domain.Downloader{Adapter: kind, URL: base, AllowLocal: true})
if err != nil {
t.Fatalf("%s: %v", kind, err)
diff --git a/app/backend/internal/downloads/downloader_settings.go b/app/backend/internal/downloads/downloader_settings.go
index 8cc0af6..c4da39c 100644
--- a/app/backend/internal/downloads/downloader_settings.go
+++ b/app/backend/internal/downloads/downloader_settings.go
@@ -250,7 +250,7 @@ func fill(in Input, d *domain.Downloader, isNew bool) error {
d.Name = name
if isNew || in.Adapter != "" {
switch in.Adapter {
- case "qbittorrent", "transmission", "deluge":
+ case "qbittorrent", "transmission", "deluge", "rtorrent":
d.Protocol = "torrent"
case "sabnzbd", "nzbget":
d.Protocol = "usenet"
diff --git a/app/backend/internal/downloads/downloads_view_rest_test.go b/app/backend/internal/downloads/downloads_view_rest_test.go
new file mode 100644
index 0000000..36ae548
--- /dev/null
+++ b/app/backend/internal/downloads/downloads_view_rest_test.go
@@ -0,0 +1,143 @@
+package downloads
+
+import (
+ "encoding/json"
+ "fmt"
+ "strconv"
+ "strings"
+ "testing"
+
+ "github.com/HolyArrs/holyarrs/app/backend/internal/mediafiles"
+)
+
+// mixedTorrents is outside torrents in four qBittorrent states; each name
+// carries the stage the page should file it under.
+func mixedTorrents(counts map[string]int) string {
+ stage := map[string]string{"uploading": "seeding", "downloading": "downloading", "pausedDL": "paused", "queuedDL": "queued"}
+ var parts []string
+ i := 0
+ for _, state := range []string{"uploading", "downloading", "pausedDL", "queuedDL"} {
+ progress := "0.5"
+ if state == "uploading" {
+ progress = "1"
+ }
+ for range counts[state] {
+ i++
+ parts = append(parts, fmt.Sprintf(`{"hash":"%040x","name":"Outside.%s.%d","category":"linux","size":100,"progress":%s,"dlspeed":0,"state":"%s","added_on":%d}`,
+ i, stage[state], i, progress, state, 1700000000+i))
+ }
+ }
+ return "[" + strings.Join(parts, ",") + "]"
+}
+
+type restAnswer struct {
+ Downloads []DownloadRow `json:"downloads"`
+ OutsideTotal int `json:"outside_total"`
+ OutsideRest map[string]RestOf `json:"outside_rest"`
+}
+
+func restView(t *testing.T, url string) restAnswer {
+ t.Helper()
+ var v restAnswer
+ if err := json.Unmarshal(do(t, "GET", url, "", 200), &v); err != nil {
+ t.Fatal(err)
+ }
+ return v
+}
+
+// The view says, per Downloader and stage, how many outside rows it did not
+// send, so the tabs can count every torrent the Downloader holds.
+func TestDownloadsViewRestCountsRowsPastThePage(t *testing.T) {
+ t.Parallel()
+ x := seed41(t, mediafiles.SlotDownloading, "downloading")
+ seeded := map[string]int{"uploading": 300, "downloading": 100, "pausedDL": 25, "queuedDL": 25}
+ pointQB(t, x, qbList(t, mixedTorrents(seeded)).URL)
+ feedStore(t, x.dl)
+ want := map[string]int{"seeding": 300, "downloading": 100, "paused": 25, "queued": 25}
+
+ v := restView(t, x.srv.URL+"/api/v1/downloads/view")
+ if v.OutsideTotal != 450 {
+ t.Fatalf("outside_total %d", v.OutsideTotal)
+ }
+ if len(v.OutsideRest) != 1 {
+ t.Fatalf("outside_rest %v, want one Downloader", v.OutsideRest)
+ }
+ got := map[string]int{}
+ sent := 0
+ for _, r := range v.Downloads {
+ if r.ClientItem {
+ sent++
+ got[strings.Split(r.Name, ".")[1]]++
+ }
+ }
+ rest := 0
+ for _, e := range v.OutsideRest {
+ if e.Protocol != "torrent" {
+ t.Fatalf("protocol %q, want torrent", e.Protocol)
+ }
+ for s, n := range e.Stages {
+ got[s] += n
+ rest += n
+ }
+ }
+ if sent != OutsideCap || rest != 450-OutsideCap {
+ t.Fatalf("sent %d rest %d", sent, rest)
+ }
+ for s, n := range want {
+ if got[s] != n {
+ t.Fatalf("stage %s: sent + rest = %d, want %d (all %v)", s, got[s], n, got)
+ }
+ }
+
+ if all := restView(t, x.srv.URL+"/api/v1/downloads/view?outside_limit=2000"); len(all.OutsideRest) != 0 {
+ t.Fatalf("every row sent, rest %v", all.OutsideRest)
+ }
+}
+
+// With ?client= only that Downloader's rest comes back.
+func TestDownloadsViewRestFollowsClient(t *testing.T) {
+ t.Parallel()
+ x := seed41(t, mediafiles.SlotDownloading, "downloading")
+ pointQB(t, x, qbList(t, outsideTorrents(250, 0)).URL)
+ feedStore(t, x.dl)
+ var id int64
+ _ = x.s.Read().QueryRow("SELECT id FROM downloaders LIMIT 1").Scan(&id)
+ key := strconv.FormatInt(id, 10)
+ v := restView(t, x.srv.URL+"/api/v1/downloads/view?client="+key)
+ if len(v.OutsideRest) != 1 || v.OutsideRest[key].Stages["seeding"] != 50 {
+ t.Fatalf("rest %v, want only %s with 50 seeding", v.OutsideRest, key)
+ }
+ if other := restView(t, x.srv.URL+"/api/v1/downloads/view?client="+strconv.FormatInt(id+99, 10)); len(other.OutsideRest) != 0 {
+ t.Fatalf("another client: rest %v", other.OutsideRest)
+ }
+}
+
+// stageOf must file a row the way the page's tabs do.
+func TestStageOfMatchesTabs(t *testing.T) {
+ t.Parallel()
+ for _, c := range []struct {
+ row DownloadRow
+ want string
+ }{
+ {DownloadRow{Phase: "downloading", ClientHint: "checking"}, "checking"},
+ {DownloadRow{Phase: "waiting", ClientHint: "moving"}, "checking"},
+ {DownloadRow{Phase: "waiting"}, "queued"},
+ {DownloadRow{Phase: "paused"}, "paused"},
+ {DownloadRow{Phase: "downloading", DownloadView: DownloadView{Progress: 0.4}}, "downloading"},
+ {DownloadRow{Phase: "downloading", DownloadView: DownloadView{Progress: 1}}, "importing"},
+ {DownloadRow{Phase: "stalled"}, "stalled"},
+ {DownloadRow{Phase: "waiting_to_import"}, "importing"},
+ {DownloadRow{Phase: "importing"}, "importing"},
+ {DownloadRow{Phase: "needs_a_decision"}, "decide"},
+ {DownloadRow{Phase: "failed"}, "failed"},
+ {DownloadRow{Phase: "vanished", Replaced: true}, "done"},
+ {DownloadRow{Phase: "import_refused"}, "failed"},
+ {DownloadRow{Phase: "done", DownloadView: DownloadView{State: "seeding"}}, "seeding"},
+ {DownloadRow{Phase: "done"}, "done"},
+ {DownloadRow{Phase: "removed"}, "done"},
+ } {
+ if got := stageOf(c.row); got != c.want {
+ t.Errorf("%+v: %s, want %s", c.row, got, c.want)
+ }
+ }
+}
diff --git a/app/backend/internal/downloads/grab.go b/app/backend/internal/downloads/grab.go
index 0f884f4..6385805 100644
--- a/app/backend/internal/downloads/grab.go
+++ b/app/backend/internal/downloads/grab.go
@@ -456,7 +456,7 @@ func (m *Manager) send(ctx context.Context, d domain.Downloader, rel domain.Rele
}
if hash != "" {
if j, err := e.Get(ctx, hash); err == nil {
- if skip[j.ID] || (d.Adapter == "transmission" || d.Adapter == "deluge") && j.Category != d.Category {
+ if skip[j.ID] || (d.Adapter == "transmission" || d.Adapter == "deluge" || d.Adapter == "rtorrent") && j.Category != d.Category {
return "", errors.New("the torrent belongs to another download or category")
}
if j.ID != "" {
@@ -476,7 +476,7 @@ func (m *Manager) send(ctx context.Context, d domain.Downloader, rel domain.Rele
return "", errors.New("the Release's Source could not be read")
}
allowLocal := src.AllowLocal
- if d.Adapter == "transmission" || d.Adapter == "deluge" || d.Adapter == "nzbget" {
+ if d.Adapter == "transmission" || d.Adapter == "deluge" || d.Adapter == "rtorrent" || d.Adapter == "nzbget" {
if !strings.HasPrefix(link, "magnet:") && src.ProxyURL != "" {
return "", errors.New("this Downloader cannot yet fetch Release files through a Source proxy")
}
@@ -517,10 +517,10 @@ func (m *Manager) send(ctx context.Context, d domain.Downloader, rel domain.Rele
}
}
// Prowlarr and Jackett answer magnet-only sites with a redirect to a magnet,
- // which Transmission, Deluge and some qBittorrent stand-ins cannot follow. A
+ // which Transmission, Deluge, rTorrent and some qBittorrent stand-ins cannot follow. A
// torrent link not read above (a home Source whose Release has a hash) is read
// here and the magnet or file is sent; if that fails the link is sent as before.
- torrentAdapter := d.Adapter == "transmission" || d.Adapter == "deluge" || d.Adapter == "qbittorrent" && src.ProxyURL == ""
+ torrentAdapter := d.Adapter == "transmission" || d.Adapter == "deluge" || d.Adapter == "rtorrent" || d.Adapter == "qbittorrent" && src.ProxyURL == ""
if torrentAdapter && file == nil && !strings.HasPrefix(link, "magnet:") {
link, file = prefetchTorrent(ctx, link, allowLocal, sourceLocalHost(src.URL, allowLocal))
if hash == "" {
diff --git a/app/backend/internal/downloads/grab_fetch.go b/app/backend/internal/downloads/grab_fetch.go
index 2ea8ac3..72f9291 100644
--- a/app/backend/internal/downloads/grab_fetch.go
+++ b/app/backend/internal/downloads/grab_fetch.go
@@ -136,5 +136,5 @@ func prefetchTorrent(ctx context.Context, link string, allowLocal bool, localHos
return link, file
}
-// torrentFetchMax caps a .torrent read for Transmission and Deluge.
+// torrentFetchMax caps a .torrent read for Transmission, Deluge and rTorrent.
const torrentFetchMax int64 = 8 << 20
diff --git a/app/backend/internal/downloads/guard_test.go b/app/backend/internal/downloads/guard_test.go
index c1efdd7..258e67f 100644
--- a/app/backend/internal/downloads/guard_test.go
+++ b/app/backend/internal/downloads/guard_test.go
@@ -73,7 +73,7 @@ func TestDownloaderGuardClassifiesTemporaryHTTPFailures(t *testing.T) {
}
func TestOptionalPolicyRefusalDoesNotTripDownloaderGuard(t *testing.T) {
- for _, kind := range []string{"transmission", "nzbget", "deluge"} {
+ for _, kind := range []string{"transmission", "nzbget", "deluge", "rtorrent"} {
t.Run(kind, func(t *testing.T) {
e, err := (&Manager{}).EngineFor(context.Background(), domain.Downloader{Adapter: kind, URL: "http://127.0.0.1:1"})
if err != nil {
diff --git a/app/backend/internal/downloads/manager.go b/app/backend/internal/downloads/manager.go
index 041e4d9..f4884ec 100644
--- a/app/backend/internal/downloads/manager.go
+++ b/app/backend/internal/downloads/manager.go
@@ -2,6 +2,7 @@ package downloads
import (
"context"
+ "database/sql"
"errors"
"fmt"
"net/http"
@@ -12,6 +13,7 @@ import (
domain "github.com/HolyArrs/holyarrs/app/backend/internal/core/model"
"github.com/HolyArrs/holyarrs/app/backend/internal/core/database"
+ "github.com/HolyArrs/holyarrs/app/backend/internal/mediafiles"
)
// KindGrab is the Job kind that sends a chosen Release to a Downloader.
@@ -186,10 +188,33 @@ func (m *Manager) EngineFor(ctx context.Context, d domain.Downloader) (Engine, e
e := NewDeluge(d.URL, secret, h)
e.Category, e.Others = d.Category, otherCategories(d)
return e, nil
+ case "rtorrent":
+ e := NewRTorrent(d.URL, d.Username, secret, h)
+ e.Category, e.Others = d.Category, otherCategories(d)
+ e.PathMap, e.SaveRoot = d.PathMap, m.SavePath
+ e.Keep = m.libraryFolders
+ return e, nil
}
return nil, fmt.Errorf("no engine for adapter %q", d.Adapter)
}
+// libraryFolders are the Library folders' paths. An rTorrent remove never
+// deletes in or around them, whatever path rTorrent reports.
+func (m *Manager) libraryFolders(ctx context.Context) ([]string, error) {
+ if m.Store == nil {
+ return nil, errors.New("no database")
+ }
+ fs, err := database.Select[mediafiles.LibraryFolder](ctx, m.Store.Read(), "library_folders", "1 = 1")
+ if err != nil && !errors.Is(err, sql.ErrNoRows) {
+ return nil, err
+ }
+ out := make([]string, 0, len(fs))
+ for _, f := range fs {
+ out = append(out, f.Path)
+ }
+ return out, nil
+}
+
func (e *TagsError) Error() string {
if len(e.Title) == 0 {
return fmt.Sprintf("not sent: every %s Downloader has tags and this title has none of them; tag the title, or leave one Downloader without tags", e.Protocol)
diff --git a/app/backend/internal/downloads/optional_test.go b/app/backend/internal/downloads/optional_test.go
index c4bfcee..b3b3720 100644
--- a/app/backend/internal/downloads/optional_test.go
+++ b/app/backend/internal/downloads/optional_test.go
@@ -132,7 +132,7 @@ func TestOptionalGrabUsesSourcePolicyAndStableOperation(t *testing.T) {
func TestOptionalFactoryUsesGuardedClient(t *testing.T) {
m := &Manager{}
- for _, kind := range []string{"transmission", "nzbget", "deluge"} {
+ for _, kind := range []string{"transmission", "nzbget", "deluge", "rtorrent"} {
e, err := m.EngineFor(context.Background(), domain.Downloader{Adapter: kind, URL: "http://127.0.0.1:1", Category: "holyarrs"})
if err != nil {
t.Fatal(err)
@@ -144,7 +144,7 @@ func TestOptionalFactoryUsesGuardedClient(t *testing.T) {
}
func TestOptionalDownloaderKinds(t *testing.T) {
- for _, c := range []struct{ kind, protocol string }{{"transmission", "torrent"}, {"nzbget", "usenet"}, {"deluge", "torrent"}} {
+ for _, c := range []struct{ kind, protocol string }{{"transmission", "torrent"}, {"nzbget", "usenet"}, {"deluge", "torrent"}, {"rtorrent", "torrent"}} {
t.Run(c.kind, func(t *testing.T) {
var d domain.Downloader
if err := fill(Input{Name: "Optional", Adapter: c.kind, URL: "http://downloader:9091"}, &d, true); err != nil {
diff --git a/app/backend/internal/downloads/optionaldownloaders_test.go b/app/backend/internal/downloads/optionaldownloaders_test.go
index 9debca0..eb4dcf6 100644
--- a/app/backend/internal/downloads/optionaldownloaders_test.go
+++ b/app/backend/internal/downloads/optionaldownloaders_test.go
@@ -9,7 +9,7 @@ import (
func TestOptionalDownloaderSecretsRoundTrip(t *testing.T) {
t.Parallel()
srv, _ := dlServer(t)
- for _, kind := range []string{"transmission", "nzbget", "deluge"} {
+ for _, kind := range []string{"transmission", "nzbget", "deluge", "rtorrent"} {
t.Run(kind, func(t *testing.T) {
secret := "optional-downloader-test-password"
in := map[string]any{"name": kind, "kind": kind, "url": "http://downloader:9091", "username": "task-user", "secret": secret}
diff --git a/app/backend/internal/downloads/other_app_match_test.go b/app/backend/internal/downloads/other_app_match_test.go
new file mode 100644
index 0000000..137160a
--- /dev/null
+++ b/app/backend/internal/downloads/other_app_match_test.go
@@ -0,0 +1,153 @@
+package downloads
+
+import (
+ "context"
+ "database/sql"
+ "encoding/json"
+ "strings"
+ "testing"
+ "time"
+
+ "github.com/HolyArrs/holyarrs/app/backend/internal/core/database"
+ domain "github.com/HolyArrs/holyarrs/app/backend/internal/core/model"
+ "github.com/HolyArrs/holyarrs/app/backend/internal/mediafiles"
+ "github.com/HolyArrs/holyarrs/app/backend/internal/metadata"
+)
+
+// addUsenet adds a SABnzbd Downloader with the given category and returns
+// its id.
+func addUsenet(t *testing.T, s *database.Store, name, cat, shows string) int64 {
+ t.Helper()
+ d := &domain.Downloader{Writable: true, Name: name, Adapter: "sabnzbd", Protocol: "usenet", URL: "http://sab-" + name, Category: cat, CategoryShows: shows,
+ Priority: 1, PathMap: []domain.PathMap{}, AfterImport: "leave", State: "ok", AllowLocal: true}
+ if err := s.Write(context.Background(), func(tx *sql.Tx) error {
+ _, err := database.Insert(tx, "downloaders", d, domain.System)
+ return err
+ }); err != nil {
+ t.Fatal(err)
+ }
+ return d.ID
+}
+
+// A shared SABnzbd: jobs in other apps' categories are never matched and
+// never offered in Confirm match, as Sonarr and Radarr leave other
+// categories alone. Own categories, torrent clients and a Usenet client
+// with no category of its own match as before.
+func TestUsenetOtherCategoriesNotMatched(t *testing.T) {
+ t.Parallel()
+ x := seed41(t, mediafiles.SlotDownloading, "downloading")
+ ctx := context.Background()
+ sab := addUsenet(t, x.s, "S", "holyarrs", "holyarrs-tv")
+ open := addUsenet(t, x.s, "O", "", "")
+ x.dl.Match.SearchMovies = func(context.Context, string, int) ([]metadata.Movie, error) { return nil, nil }
+ x.dl.Match.SearchShows = func(context.Context, string) ([]metadata.Show, error) { return nil, nil }
+
+ out, _, err := x.dl.MatchLinkOnly(ctx, sab, "SABnzbd_nzo_sonarr1", "QI.XL.S24E02.720p.WEB", "tv")
+ if err != nil || out != matchOtherApp {
+ t.Fatalf("other app's job: %q %v", out, err)
+ }
+ var n int
+ _ = x.s.Read().QueryRow("SELECT COUNT(*) FROM client_links WHERE downloader_id = ?", sab).Scan(&n)
+ if n != 0 {
+ t.Fatalf("other app's job saved %d links", n)
+ }
+ for _, c := range []struct {
+ id int64
+ cat string
+ }{{sab, "holyarrs"}, {sab, "HolyArrs-TV"}, {open, "tv"}, {1, "tv"}} {
+ if out, _, err := x.dl.MatchLinkOnly(ctx, c.id, "k-"+c.cat, "QI.XL.S24E02.720p.WEB", c.cat); err != nil || out != LinkUnsure {
+ t.Fatalf("downloader %d category %q: %q %v", c.id, c.cat, out, err)
+ }
+ }
+
+ // Rows already waiting: the other app's one is left out of the list.
+ exec41(t, x.s, `DELETE FROM client_links`)
+ for _, r := range []struct {
+ id int64
+ key, cat string
+ }{{sab, "sabnzbd_nzo_a", "tv"}, {sab, "sabnzbd_nzo_b", "holyarrs"}, {1, "eeee", "tv"}} {
+ exec41(t, x.s, `INSERT INTO client_links (downloader_id, hash, name, state, slot_ids, covers, candidates, how, matched_at) VALUES (?, ?, ?, 'unsure', '[]', '', '[]', 'unsure', '')`, r.id, r.key, r.key)
+ exec41(t, x.s, `INSERT INTO dl_match_queue (downloader_id, key, name, category, priority, next_try_at, outcome) VALUES (?, ?, ?, ?, 0, '', 'unsure')`, r.id, strings.ToUpper(r.key), r.key, r.cat)
+ }
+ var got struct {
+ Matches []MatchView `json:"matches"`
+ Counts map[string]int `json:"counts"`
+ }
+ if err := json.Unmarshal(do(t, "GET", x.srv.URL+"/api/v1/downloads/matches", "", 200), &got); err != nil {
+ t.Fatal(err)
+ }
+ names := map[string]bool{}
+ for _, m := range got.Matches {
+ names[m.Name] = true
+ }
+ if len(got.Matches) != 2 || !names["sabnzbd_nzo_b"] || !names["eeee"] || got.Counts[LinkUnsure] != 2 {
+ t.Fatalf("matches %v counts %v", names, got.Counts)
+ }
+
+ // Match now looks at them again (the categories may have changed).
+ exec41(t, x.s, `INSERT INTO dl_match_queue (downloader_id, key, name, category, priority, next_try_at, outcome) VALUES (?, 'x', 'x', 'tv', 0, '', ?)`, sab, matchOtherApp)
+ if n := x.dl.Rematch(ctx); n != 1 {
+ t.Fatalf("rematch %d", n)
+ }
+}
+
+func TestOtherApp(t *testing.T) {
+ t.Parallel()
+ sab := domain.Downloader{Protocol: "usenet", Category: "holyarrs", CategoryMovies: "holyarrs-movies"}
+ for _, c := range []struct {
+ d domain.Downloader
+ cat string
+ want bool
+ }{
+ {sab, "holyarrs", false},
+ {sab, "HOLYARRS-MOVIES", false},
+ {sab, "tv", true},
+ {sab, "", true},
+ {domain.Downloader{Protocol: "usenet"}, "tv", false},
+ {domain.Downloader{Protocol: "usenet", Category: "*"}, "tv", false},
+ {domain.Downloader{Protocol: "torrent", Category: "holyarrs"}, "tv", false},
+ } {
+ if got := otherApp(c.d, c.cat); got != c.want {
+ t.Errorf("%+v %q: %v", c.d, c.cat, got)
+ }
+ }
+}
+
+// A job moved into HolyArrs's own category in a shared SABnzbd is matched
+// on the next look, as Sonarr picks it up on its next poll.
+func TestUsenetJobMovedIntoOwnCategoryIsMatched(t *testing.T) {
+ t.Parallel()
+ x := seed41(t, mediafiles.SlotDownloading, "downloading")
+ ctx := context.Background()
+ sab := addUsenet(t, x.s, "S", "holyarrs", "")
+ var lookups int
+ x.dl.Match.SearchMovies = func(context.Context, string, int) ([]metadata.Movie, error) { lookups++; return nil, nil }
+ x.dl.Match.SearchShows = func(context.Context, string) ([]metadata.Show, error) { lookups++; return nil, nil }
+ p := &persister{db: x.s, now: time.Now}
+ s := &Sync{Store: &Store{}, DB: x.s, Match: x.dl.MatchLinkOnly}
+ s.init()
+ job := Job{ID: "SABnzbd_nzo_m", Name: "QI.XL.S24E02.720p.WEB", Category: "tv"}
+ p.note(sab, Changes{Added: []string{job.ID}}, nil, map[string]Job{job.ID: job}, "")
+ if err := p.flush(ctx); err != nil {
+ t.Fatal(err)
+ }
+ s.matchStep(ctx)
+ outcome := func() (out, cat string) {
+ _ = x.s.Read().QueryRow("SELECT outcome, category FROM dl_match_queue WHERE downloader_id = ? AND key = ?", sab, job.ID).Scan(&out, &cat)
+ return
+ }
+ if out, _ := outcome(); out != matchOtherApp || lookups != 0 {
+ t.Fatalf("job in tv: outcome %q lookups %d", out, lookups)
+ }
+
+ moved := job
+ moved.Category = "holyarrs"
+ p.note(sab, Changes{Changed: []FieldChange{{ID: job.ID, Fields: []string{"Category"}}}}, map[string]Job{job.ID: job}, map[string]Job{job.ID: moved}, "")
+ if err := p.flush(ctx); err != nil {
+ t.Fatal(err)
+ }
+ s.matchStep(ctx)
+ if out, cat := outcome(); out == matchOtherApp || cat != "holyarrs" || lookups == 0 {
+ t.Fatalf("job now in own category: outcome %q queue category %q lookups %d", out, cat, lookups)
+ }
+}
diff --git a/app/backend/internal/downloads/poll.go b/app/backend/internal/downloads/poll.go
index e9b0f8d..e514d48 100644
--- a/app/backend/internal/downloads/poll.go
+++ b/app/backend/internal/downloads/poll.go
@@ -431,7 +431,7 @@ func lastMoved(d domain.Download) time.Time {
// cantUseFiles reports a paused job its client paused because it lost sight of
// the files: qBittorrent error, missingFiles or unknown, Deluge Error,
-// Transmission local error 3.
+// Transmission local error 3, an rTorrent torrent closed with a storage error.
func cantUseFiles(j Job) bool {
if j.State != StatePaused {
return false
@@ -440,7 +440,7 @@ func cantUseFiles(j Job) bool {
case "error", "missingFiles", "unknown", "Error":
return true
}
- return strings.Contains(j.Detail, "; error 3")
+ return strings.Contains(j.Detail, "; error 3") || strings.HasPrefix(j.Detail, "error: ")
}
func eqTime(a, b *time.Time) bool {
diff --git a/app/backend/internal/downloads/read_only.go b/app/backend/internal/downloads/read_only.go
index 7857dc5..da12b55 100644
--- a/app/backend/internal/downloads/read_only.go
+++ b/app/backend/internal/downloads/read_only.go
@@ -71,6 +71,12 @@ type roSab struct {
roUsenetQueue
}
+// roRTorrent is rTorrent's shape: the engine plus the row controls.
+type roRTorrent struct {
+ *roCore
+ roController
+}
+
type roUsenetQueue struct{ c *roCore }
type roController struct{ c *roCore }
@@ -274,6 +280,8 @@ func readOnlyWrap(inner Engine, allowAdd bool) Engine {
roTorrentFolders{c}, roTorrentBulk{c}, roShareLimiter{c}, roSlowModer{c}, roTrackerEditor{c}, roMover{c}, roMainSyncer{c}}
case shapeOf(&Sabnzbd{}):
return roSab{c, roController{c}, roRetrier{c}, roHistoryReader{c}, roQueueReader{c}, roUsenetInspector{c}, roUsenetQueue{c}}
+ case shapeOf(&RTorrent{}):
+ return roRTorrent{c, roController{c}}
}
return c
}
diff --git a/app/backend/internal/downloads/routes_client.go b/app/backend/internal/downloads/routes_client.go
index aff73d7..8404e0b 100644
--- a/app/backend/internal/downloads/routes_client.go
+++ b/app/backend/internal/downloads/routes_client.go
@@ -416,6 +416,8 @@ func adapterWord(adapter string) string {
return "Transmission"
case "deluge":
return "Deluge"
+ case "rtorrent":
+ return "rTorrent"
case "sabnzbd":
return "SABnzbd"
case "nzbget":
diff --git a/app/backend/internal/downloads/routes_downloaders.go b/app/backend/internal/downloads/routes_downloaders.go
index e2195fd..d478a33 100644
--- a/app/backend/internal/downloads/routes_downloaders.go
+++ b/app/backend/internal/downloads/routes_downloaders.go
@@ -126,7 +126,7 @@ func (a *Web) listDownloaders(w http.ResponseWriter, r *http.Request) {
webserver.WriteJSON(w, http.StatusOK, map[string]any{"downloaders": out})
}
-const downloaderHelp = `send name, kind (qbittorrent, transmission, deluge, sabnzbd or nzbget), url, and if needed secret (an API key or password; qBittorrent takes its API key with no username, or a username and password), category, priority (1 to 50), path_map [{theirs, ours}], allow_local_network, writable, clear_finished`
+const downloaderHelp = `send name, kind (qbittorrent, transmission, deluge, rtorrent, sabnzbd or nzbget), url, and if needed secret (an API key or password; qBittorrent takes its API key with no username, or a username and password), category, priority (1 to 50), path_map [{theirs, ours}], allow_local_network, writable, clear_finished`
func downloaderError(w http.ResponseWriter, err error) {
switch {
diff --git a/app/backend/internal/downloads/routes_downloads.go b/app/backend/internal/downloads/routes_downloads.go
index 6a34724..e2e8bdf 100644
--- a/app/backend/internal/downloads/routes_downloads.go
+++ b/app/backend/internal/downloads/routes_downloads.go
@@ -471,9 +471,11 @@ func (a *Web) DownloadsView(w http.ResponseWriter, r *http.Request) {
outside = keep
}
total := viewTotals(rows, outside)
- page, next := pageOutside(outside, r.URL.Query().Get("cursor"), outsideLimit(r))
+ cursor := r.URL.Query().Get("cursor")
+ page, next := pageOutside(outside, cursor, outsideLimit(r))
rows = append(rows, page...)
- out := map[string]any{"downloads": rows, "totals": total, "clients": health, "outside_total": len(outside), "next_cursor": next}
+ out := map[string]any{"downloads": rows, "totals": total, "clients": health, "outside_total": len(outside), "next_cursor": next,
+ "outside_rest": outsideRest(outside, cursor, len(page))}
if a.syncOn() {
// Someone is watching: the reader reads faster (no write, no call).
a.DLSync.Watched()
@@ -485,6 +487,76 @@ func (a *Web) DownloadsView(w http.ResponseWriter, r *http.Request) {
webserver.WriteJSON(w, http.StatusOK, out)
}
+// RestOf is the outside rows of one Downloader a view answer left out:
+// its protocol (so a Torrent or Usenet filter counts only its own) and how
+// many there are per stage.
+type RestOf struct {
+ Protocol string `json:"protocol"`
+ Stages map[string]int `json:"stages"`
+}
+
+// outsideRest counts, per Downloader id and stage, the outside rows this
+// answer leaves out (those before the cursor and after its page), so the
+// tabs can count every torrent while the page counts its own rows live.
+func outsideRest(outside []DownloadRow, cursor string, sent int) map[string]RestOf {
+ from, err := strconv.Atoi(cursor)
+ if err != nil || from < 0 {
+ from = 0
+ }
+ rest := map[string]RestOf{}
+ for i, row := range outside {
+ if i >= from && i < from+sent {
+ continue
+ }
+ k := strconv.FormatInt(row.DownloaderID, 10)
+ e, ok := rest[k]
+ if !ok {
+ e = RestOf{Protocol: row.Protocol, Stages: map[string]int{}}
+ }
+ e.Stages[stageOf(row)]++
+ rest[k] = e
+ }
+ return rest
+}
+
+// stageOf places a row on the stage the Downloads tabs count it under. It
+// must match stageOf in frontend/src/lib/downloads/status-tabs.ts.
+func stageOf(r DownloadRow) string {
+ if r.ClientHint == "checking" || r.ClientHint == "moving" {
+ return "checking"
+ }
+ switch r.Phase {
+ case "waiting":
+ return "queued"
+ case "paused":
+ return "paused"
+ case "downloading":
+ if r.Progress >= 1 {
+ return "importing"
+ }
+ return "downloading"
+ case "stalled":
+ return "stalled"
+ case "waiting_to_import", "importing":
+ return "importing"
+ case "needs_a_decision":
+ return "decide"
+ case "failed", "vanished":
+ if r.Replaced {
+ return "done"
+ }
+ return "failed"
+ case "import_refused":
+ return "failed"
+ case "done":
+ if r.State == "seeding" {
+ return "seeding"
+ }
+ return "done"
+ }
+ return "done"
+}
+
// viewTotals adds up the speeds of HolyArrs' rows and every client row.
func viewTotals(sets ...[]DownloadRow) DownloadTotals {
var t DownloadTotals
diff --git a/app/backend/internal/downloads/routes_match.go b/app/backend/internal/downloads/routes_match.go
index c525905..1f2aa97 100644
--- a/app/backend/internal/downloads/routes_match.go
+++ b/app/backend/internal/downloads/routes_match.go
@@ -13,6 +13,8 @@ import (
"time"
"unicode"
+ "github.com/HolyArrs/holyarrs/app/backend/internal/core/database"
+ domain "github.com/HolyArrs/holyarrs/app/backend/internal/core/model"
"github.com/HolyArrs/holyarrs/app/backend/internal/core/releasename"
"github.com/HolyArrs/holyarrs/app/backend/internal/core/webserver"
"github.com/HolyArrs/holyarrs/app/backend/internal/library"
@@ -486,6 +488,32 @@ func (a *Web) readMatches(ctx context.Context, where string, args ...any) ([]Mat
return out, rs.Err()
}
+// dropOtherApps leaves out the rows for other apps' jobs in a shared
+// Usenet client, saved before those were left unmatched.
+func (a *Web) dropOtherApps(ctx context.Context, ms []MatchView) []MatchView {
+ cats, err := unsureCategories(ctx, a.Store.Read())
+ if err != nil || len(cats) == 0 {
+ return ms
+ }
+ ds := map[int64]*domain.Downloader{}
+ out := ms[:0]
+ for _, m := range ms {
+ d, ok := ds[m.DownloaderID]
+ if !ok {
+ d = &domain.Downloader{}
+ if database.Get(ctx, a.Store.Read(), "downloaders", m.DownloaderID, d) != nil {
+ d = nil
+ }
+ ds[m.DownloaderID] = d
+ }
+ if cat, seen := cats[itemKey{m.DownloaderID, m.Hash}]; seen && d != nil && otherApp(*d, cat) {
+ continue
+ }
+ out = append(out, m)
+ }
+ return out
+}
+
// listMatches is the Confirm match list, with how many torrents are in
// each state.
func (a *Web) listMatches(w http.ResponseWriter, r *http.Request) {
@@ -494,6 +522,7 @@ func (a *Web) listMatches(w http.ResponseWriter, r *http.Request) {
webserver.Internal(w, "api", err)
return
}
+ unsure = a.dropOtherApps(r.Context(), unsure)
counts := map[string]int{LinkLinked: 0, LinkUnsure: 0, LinkNotMedia: 0, linkSkipped: 0}
rs, err := a.Store.Read().QueryContext(r.Context(), "SELECT state, COUNT(*) FROM client_links GROUP BY state")
if err != nil {
@@ -508,6 +537,7 @@ func (a *Web) listMatches(w http.ResponseWriter, r *http.Request) {
counts[st] = n
}
}
+ counts[LinkUnsure] = len(unsure)
var pending int
_ = a.read().QueryRowContext(r.Context(), "SELECT COUNT(*) FROM dl_match_queue WHERE outcome = ''").Scan(&pending)
webserver.WriteJSON(w, http.StatusOK, map[string]any{"matches": unsure, "counts": counts, "pending": pending})
diff --git a/app/backend/internal/downloads/routes_sync.go b/app/backend/internal/downloads/routes_sync.go
index 97f3bf9..386b15d 100644
--- a/app/backend/internal/downloads/routes_sync.go
+++ b/app/backend/internal/downloads/routes_sync.go
@@ -164,6 +164,10 @@ func (a *Web) MatchLinkOnly(ctx context.Context, downloaderID int64, key, name,
if db.QueryRowContext(ctx, "SELECT COUNT(*) FROM downloads WHERE downloader_id = ? AND lower(external_id) = ?", downloaderID, key).Scan(&n) == nil && n > 0 {
return "own", 0, nil
}
+ var d domain.Downloader
+ if database.Get(ctx, db, "downloaders", downloaderID, &d) == nil && otherApp(d, category) {
+ return matchOtherApp, 0, nil
+ }
var st, how string
var tid *int64
if db.QueryRowContext(ctx, "SELECT state, title_id, COALESCE(how, '') FROM client_links WHERE downloader_id = ? AND hash = ?", downloaderID, key).Scan(&st, &tid, &how) == nil &&
@@ -238,6 +242,27 @@ func (a *Web) MatchLinkOnly(ctx context.Context, downloaderID int64, key, name,
return LinkLinked, titleID, nil
}
+// matchOtherApp is the match outcome for a Usenet job in a category
+// HolyArrs does not use: another app's job in a shared client, shown on
+// Downloads but never matched.
+const matchOtherApp = "other"
+
+// otherApp reports whether category belongs to another app on d: d is a
+// Usenet client with categories of its own and category is none of them.
+// A client with no category, "" or "*" has every job as its own.
+func otherApp(d domain.Downloader, category string) bool {
+ if d.Protocol != "usenet" {
+ return false
+ }
+ cats := d.Categories()
+ for _, c := range cats {
+ if c == "" || c == "*" || strings.EqualFold(c, category) {
+ return false
+ }
+ }
+ return len(cats) > 0
+}
+
// settingAutoAdd is downloads_auto_add (group links), off by default.
const settingAutoAdd = "downloads_auto_add"
@@ -265,9 +290,10 @@ func (a *Web) Rematch(ctx context.Context) int {
var n int64
// Not-media names go again too (a person's not-media pick stays), and
// with auto-add on, the matcher's suggestions, to be added.
- outs := "('', 'nomatch', 'not_media')"
+ // Other apps' jobs too, in case HolyArrs's categories changed.
+ outs := "('', 'nomatch', 'not_media', 'other')"
if a.autoAddOn(ctx) {
- outs = "('', 'nomatch', 'not_media', 'suggested')"
+ outs = "('', 'nomatch', 'not_media', 'other', 'suggested')"
}
_ = a.Store.Write(ctx, func(tx *sql.Tx) error {
res, err := tx.ExecContext(ctx, "UPDATE dl_match_queue SET attempts = 0, next_try_at = ?, outcome = '', last_error = '' WHERE outcome IN "+outs,
diff --git a/app/backend/internal/downloads/snapshot_match.go b/app/backend/internal/downloads/snapshot_match.go
index 2e58ce0..527f1bd 100644
--- a/app/backend/internal/downloads/snapshot_match.go
+++ b/app/backend/internal/downloads/snapshot_match.go
@@ -18,7 +18,7 @@ const (
// MatchFunc looks one client item up and links it when sure. It must never
// add to the Library, only link. outcome is one of linked, suggested,
-// unsure, not_media or own; an error is retried later.
+// unsure, not_media, own or other; an error is retried later.
type MatchFunc func(ctx context.Context, downloaderID int64, key, name, category string) (outcome string, titleID int64, err error)
// bucket is a token bucket that limits lookups per second.
diff --git a/app/backend/internal/downloads/snapshot_persist.go b/app/backend/internal/downloads/snapshot_persist.go
index 2678667..e4b8ba1 100644
--- a/app/backend/internal/downloads/snapshot_persist.go
+++ b/app/backend/internal/downloads/snapshot_persist.go
@@ -54,6 +54,7 @@ type matchWrite struct {
key, name, cat string
priority int
rename bool
+ recat bool
}
// persister batches what the reader saw into dl_items, torrent_log and
@@ -116,6 +117,9 @@ func (p *persister) note(id int64, ch Changes, prev, cur map[string]Job, why str
if j.Name != old.Name {
p.matches = append(p.matches, matchWrite{id: id, key: k, name: j.Name, cat: j.Category, priority: matchPriority(j), rename: true})
}
+ if j.Category != old.Category {
+ p.matches = append(p.matches, matchWrite{id: id, key: k, name: j.Name, cat: j.Category, priority: matchPriority(j), recat: true})
+ }
if p.lines == nil {
continue
}
@@ -207,6 +211,18 @@ func (p *persister) flush(ctx context.Context) error {
}
continue
}
+ if m.recat {
+ // The match decides from the category, so keep it current; a job
+ // moved out of another app's category is looked up again.
+ if _, err := tx.Exec(`UPDATE dl_match_queue SET category = ?,
+ attempts = CASE WHEN outcome = ? THEN 0 ELSE attempts END,
+ next_try_at = CASE WHEN outcome = ? THEN ? ELSE next_try_at END,
+ outcome = CASE WHEN outcome = ? THEN '' ELSE outcome END
+ WHERE downloader_id = ? AND key = ?`, m.cat, matchOtherApp, matchOtherApp, at, matchOtherApp, m.id, m.key); err != nil {
+ return err
+ }
+ continue
+ }
if _, err := tx.Exec(`INSERT INTO dl_match_queue (downloader_id, key, name, category, priority, next_try_at) VALUES (?, ?, ?, ?, ?, ?)
ON CONFLICT (downloader_id, key) DO NOTHING`, m.id, m.key, m.name, m.cat, m.priority, at); err != nil {
return err
diff --git a/app/backend/internal/downloads/store_match.go b/app/backend/internal/downloads/store_match.go
new file mode 100644
index 0000000..50daddb
--- /dev/null
+++ b/app/backend/internal/downloads/store_match.go
@@ -0,0 +1,32 @@
+package downloads
+
+import (
+ "context"
+ "database/sql"
+)
+
+// unsureCategories reads the category each unsure Confirm match row's item
+// was last seen in, keyed by downloader and lower-case key. A row whose
+// item was never seen by the reader is left out.
+func unsureCategories(ctx context.Context, db *sql.DB) (map[itemKey]string, error) {
+ rows, err := db.QueryContext(ctx, `SELECT l.downloader_id, l.hash, COALESCE(
+ (SELECT i.category FROM dl_items i WHERE i.downloader_id = l.downloader_id AND lower(i.key) = l.hash LIMIT 1),
+ (SELECT q.category FROM dl_match_queue q WHERE q.downloader_id = l.downloader_id AND lower(q.key) = l.hash LIMIT 1))
+ FROM client_links l WHERE l.state = 'unsure'`)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ out := map[itemKey]string{}
+ for rows.Next() {
+ var k itemKey
+ var cat sql.NullString
+ if err := rows.Scan(&k.id, &k.key, &cat); err != nil {
+ return nil, err
+ }
+ if cat.Valid {
+ out[k] = cat.String
+ }
+ }
+ return out, rows.Err()
+}
diff --git a/app/backend/internal/downloads/timeout_test.go b/app/backend/internal/downloads/timeout_test.go
index 9563b6c..3f9f5ce 100644
--- a/app/backend/internal/downloads/timeout_test.go
+++ b/app/backend/internal/downloads/timeout_test.go
@@ -12,6 +12,7 @@ func TestDownloaderTimeout30s(t *testing.T) {
"sabnzbd": NewSabnzbd("http://x", "k", nil).http.Timeout,
"nzbget": NewNZBGet("http://x", "", "", nil).http.Timeout,
"deluge": NewDeluge("http://x", "", nil).http.Timeout,
+ "rtorrent": NewRTorrent("http://x", "", "", nil).http.Timeout,
"transmission": NewTransmission("http://x", "", "", nil).http.Timeout,
} {
if got != 30*time.Second {
diff --git a/app/backend/internal/importer/import_run.go b/app/backend/internal/importer/import_run.go
index 56953fb..0605f82 100644
--- a/app/backend/internal/importer/import_run.go
+++ b/app/backend/internal/importer/import_run.go
@@ -105,6 +105,13 @@ func (im *Importer) Import(ctx context.Context, downloadID int64, dryRun bool, b
if err != nil {
return nil, err
}
+ prior, err := database.Select[mediafiles.Import](ctx, db, "imports", "download_id = ? AND state = 'placing' ORDER BY id DESC LIMIT 1", d.ID)
+ if err != nil {
+ return nil, err
+ }
+ if len(prior) == 1 && !dryRun {
+ restoreMoves(&prior[0])
+ }
unpacked, cleanup, unpackWhy := unpackRars(ctx, d.ID, root, cands, rules, dryRun)
defer cleanup()
cands = append(cands, unpacked...)
@@ -123,6 +130,7 @@ func (im *Importer) Import(ctx context.Context, downloadID int64, dryRun bool, b
if err != nil {
return nil, err
}
+ im.markMoves(ctx, db, plan, dr, unpacked)
imp := &mediafiles.Import{DownloadID: &d.ID, FromPath: root, Kind: "movie", Plan: plan, Result: []mediafiles.PlaceResult{}, Mode: "dry_run", State: "planned"}
if dryRun {
return imp, nil
@@ -149,10 +157,6 @@ func (im *Importer) Import(ctx context.Context, downloadID int64, dryRun bool, b
}
return imp, nil
}
- prior, err := database.Select[mediafiles.Import](ctx, db, "imports", "download_id = ? AND state = 'placing' ORDER BY id DESC LIMIT 1", d.ID)
- if err != nil {
- return nil, err
- }
resumable := map[string]time.Time{}
recorded := ""
if len(prior) == 1 {
@@ -173,6 +177,11 @@ func (im *Importer) Import(ctx context.Context, downloadID int64, dryRun bool, b
}
imp.Result = append(imp.Result, r)
}
+ var before []mediafiles.PlaceResult
+ if len(prior) == 1 {
+ before = prior[0].Result
+ }
+ moveProof(plan, imp.Result, before)
imp.State = "placing"
moved := false
if err := im.Store.Write(ctx, func(tx *sql.Tx) error {
@@ -235,7 +244,9 @@ func (im *Importer) Import(ctx context.Context, downloadID int64, dryRun bool, b
}
}
}
+ proof := imp.Result
imp.Result = execute(plan, im.Ops, resumable)
+ keepProof(imp.Result, proof)
if heldEarly != "" {
imp.Result[sameIdx].HeldAside = heldEarly
}
diff --git a/app/backend/internal/importer/importer.go b/app/backend/internal/importer/importer.go
index 058e87f..cd877ef 100644
--- a/app/backend/internal/importer/importer.go
+++ b/app/backend/internal/importer/importer.go
@@ -259,6 +259,8 @@ func sizeOf(cands []Candidate, path string) int64 {
type Ops struct {
Link func(oldname, newname string) error
Copy func(src, dst string) error
+ // Move renames a file without replacing the target.
+ Move func(src, dst string) error
}
var activeParts sync.Map
@@ -294,8 +296,18 @@ func CopyNoReplace(src, dst string) error { return copyFile(src, dst) }
var beforeFinish func()
+// openHook sees every source a copy opens (tests count the reads).
+var openHook func(path string)
+
+func openSource(src string) (*os.File, error) {
+ if openHook != nil {
+ openHook(src)
+ }
+ return os.Open(src)
+}
+
func copyFile(src, dst string) (err error) {
- in, err := os.Open(src)
+ in, err := openSource(src)
if err != nil {
return err
}
@@ -333,10 +345,16 @@ func copyFile(src, dst string) (err error) {
if errors.Is(err, fs.ErrExist) {
return fmt.Errorf("%s appeared while copying", dst)
}
- if linkUnsupported(err) {
- return copyDirect(src, dst)
+ // No hardlink here: rename the finished copy into place rather than
+ // writing the whole file a second time.
+ rerr := renameNoReplace(tmp, dst)
+ if rerr == nil {
+ return nil
}
- return err
+ if errors.Is(rerr, fs.ErrExist) {
+ return fmt.Errorf("%s appeared while copying", dst)
+ }
+ return copyDirect(src, dst)
}
return nil
}
@@ -356,7 +374,7 @@ func CreateTemp(dir, prefix, suffix string) (*os.File, error) {
var linkHook func(oldname, newname string) error
func copyDirect(src, dst string) (err error) {
- in, err := os.Open(src)
+ in, err := openSource(src)
if err != nil {
return err
}
@@ -443,6 +461,9 @@ func execute(steps []mediafiles.PlanStep, ops Ops, resumable map[string]time.Tim
if ops.Copy == nil {
ops.Copy = copyFile
}
+ if ops.Move == nil {
+ ops.Move = renameNoReplace
+ }
out := make([]mediafiles.PlaceResult, 0, len(steps))
for _, s := range steps {
r := mediafiles.PlaceResult{SourceFile: s.SourceFile, PlacedBy: "none"}
@@ -502,6 +523,20 @@ func place(s mediafiles.PlanStep, ops Ops, resumeFrom time.Time) mediafiles.Plac
r.Outcome, r.Error = "failed", err.Error()
return r
}
+ moveNote := ""
+ if s.Move && ops.Move != nil {
+ err := ops.Move(s.SourceFile, s.TargetPath)
+ if err == nil {
+ r.Outcome, r.PlacedBy = "placed", "move"
+ return r
+ }
+ if errors.Is(err, fs.ErrExist) {
+ r.Outcome, r.Error = "refused", "a file appeared at the target"
+ return r
+ }
+ // Another drive or a refused rename: link or copy as for any download.
+ moveNote = "move not possible: " + err.Error() + "; "
+ }
linkErr := ops.Link(s.SourceFile, s.TargetPath)
if linkErr == nil {
r.Outcome, r.PlacedBy = "placed", "hardlink"
@@ -520,7 +555,7 @@ func place(s mediafiles.PlanStep, ops Ops, resumeFrom time.Time) mediafiles.Plac
return r
}
r.Outcome, r.PlacedBy, r.FellBack = "placed", "copy", true
- r.Error = "hardlink not possible: " + linkErr.Error()
+ r.Error = moveNote + "hardlink not possible: " + linkErr.Error()
return r
}
@@ -596,6 +631,9 @@ type Importer struct {
OnImported func(ctx context.Context, downloadID int64)
OnLowSpace func(ctx context.Context, dir string, free, need int64)
NoSizeFloors bool
+ // MayMove says whether a Downloader's finished files may be moved out of
+ // its folder. Nil never moves.
+ MayMove func(d domain.Downloader) bool
runs sync.Map
diff --git a/app/backend/internal/importer/importer_test.go b/app/backend/internal/importer/importer_test.go
index 5135f80..da65d61 100644
--- a/app/backend/internal/importer/importer_test.go
+++ b/app/backend/internal/importer/importer_test.go
@@ -164,7 +164,7 @@ func setup(t *testing.T) world {
}
t.Cleanup(func() { _ = s.Close() })
setFake(t, s, "import_size_floors", "false")
- w := world{s: s, dl: t.TempDir(), lib: t.TempDir()}
+ w := world{s: s, dl: mediaTemp(t), lib: mediaTemp(t)}
write(t, filepath.Join(w.dl, relName+".mkv"), 2048)
err = s.Write(context.Background(), func(tx *sql.Tx) error {
var pr int64
diff --git a/app/backend/internal/importer/move.go b/app/backend/internal/importer/move.go
new file mode 100644
index 0000000..ab2006b
--- /dev/null
+++ b/app/backend/internal/importer/move.go
@@ -0,0 +1,116 @@
+package importer
+
+import (
+ "context"
+ "errors"
+ "io/fs"
+ "log"
+ "os"
+ "path/filepath"
+
+ "github.com/HolyArrs/holyarrs/app/backend/internal/mediafiles"
+
+ "github.com/HolyArrs/holyarrs/app/backend/internal/core/database"
+ domain "github.com/HolyArrs/holyarrs/app/backend/internal/core/model"
+)
+
+// markMoves marks the steps whose file is moved into the Library instead of
+// linked or copied: files of a finished Usenet download (nothing seeds them, and
+// Clear finished deletes them anyway) and files HolyArrs unpacked itself. A
+// Downloader HolyArrs may not change keeps its files, and so does anything that
+// sits inside a Library folder.
+func (im *Importer) markMoves(ctx context.Context, db database.Lister, plan []mediafiles.PlanStep, dr domain.Downloader, unpacked []Candidate) {
+ if im.MayMove == nil || !im.MayMove(dr) {
+ return
+ }
+ temp := map[string]bool{}
+ for _, c := range unpacked {
+ temp[c.Path] = true
+ }
+ var libraries []string
+ if folders, err := database.Select[mediafiles.LibraryFolder](ctx, db, "library_folders", "1 = 1"); err == nil {
+ for _, f := range folders {
+ libraries = append(libraries, filepath.Clean(f.Path))
+ }
+ } else {
+ return
+ }
+ for i := range plan {
+ st := &plan[i]
+ if st.Method != "hardlink" || (dr.Protocol != "usenet" && !temp[st.SourceFile]) {
+ continue
+ }
+ src := filepath.Clean(st.SourceFile)
+ inside := false
+ for _, l := range libraries {
+ if src == l || under(l, src) {
+ inside = true
+ break
+ }
+ }
+ st.Move = !inside
+ }
+}
+
+// moveProof records the size and time of each file about to be moved, so a
+// retry after a crash can tell the moved file from someone else's. A file that
+// already moved keeps the proof the attempt before it took.
+func moveProof(plan []mediafiles.PlanStep, results []mediafiles.PlaceResult, prior []mediafiles.PlaceResult) {
+ before := map[string]mediafiles.PlaceResult{}
+ for _, r := range prior {
+ before[r.SourceFile] = r
+ }
+ for i := range results {
+ if i >= len(plan) || !plan[i].Move {
+ continue
+ }
+ if fi, err := os.Lstat(plan[i].SourceFile); err == nil {
+ results[i].MoveSize, results[i].MoveMod = fi.Size(), fi.ModTime().UnixNano()
+ } else if b, ok := before[plan[i].SourceFile]; ok {
+ results[i].MoveSize, results[i].MoveMod = b.MoveSize, b.MoveMod
+ }
+ }
+}
+
+// restoreMoves puts back files an earlier attempt moved into the Library and
+// never recorded (it stopped before the end). Each one must still be the same
+// file: the source gone, the target a plain file of the recorded size and time.
+// The retry then starts from the download folder like any other attempt.
+func restoreMoves(prior *mediafiles.Import) {
+ if prior == nil {
+ return
+ }
+ for i, r := range prior.Result {
+ if i >= len(prior.Plan) || r.MoveSize <= 0 || r.Outcome == "placed" && r.PlacedBy != "move" {
+ continue
+ }
+ st := prior.Plan[i]
+ if !st.Move {
+ continue
+ }
+ if _, err := os.Lstat(st.SourceFile); !errors.Is(err, fs.ErrNotExist) {
+ continue
+ }
+ fi, err := os.Lstat(st.TargetPath)
+ if err != nil || !fi.Mode().IsRegular() || fi.Size() != r.MoveSize || fi.ModTime().UnixNano() != r.MoveMod {
+ continue
+ }
+ err = os.MkdirAll(filepath.Dir(st.SourceFile), 0o777)
+ if err == nil {
+ err = renameNoReplace(st.TargetPath, st.SourceFile)
+ }
+ if err != nil {
+ log.Printf("import: could not put %s back to %s for the retry: %v", st.TargetPath, st.SourceFile, err)
+ }
+ }
+}
+
+// keepProof copies the recorded size and time of moved files onto fresh
+// results, so every later save of a placing import keeps them.
+func keepProof(results, recorded []mediafiles.PlaceResult) {
+ for i := range results {
+ if i < len(recorded) && results[i].SourceFile == recorded[i].SourceFile {
+ results[i].MoveSize, results[i].MoveMod = recorded[i].MoveSize, recorded[i].MoveMod
+ }
+ }
+}
diff --git a/app/backend/internal/importer/move_test.go b/app/backend/internal/importer/move_test.go
new file mode 100644
index 0000000..afdf7bf
--- /dev/null
+++ b/app/backend/internal/importer/move_test.go
@@ -0,0 +1,277 @@
+package importer
+
+import (
+ "context"
+ "database/sql"
+ "errors"
+ "io/fs"
+ "os"
+ "path/filepath"
+ "strings"
+ "syscall"
+ "testing"
+
+ "github.com/HolyArrs/holyarrs/app/backend/internal/mediafiles"
+
+ "github.com/HolyArrs/holyarrs/app/backend/internal/core/database"
+ domain "github.com/HolyArrs/holyarrs/app/backend/internal/core/model"
+)
+
+func usenetWorld(t *testing.T) world {
+ t.Helper()
+ w := setup(t)
+ if err := w.s.Write(context.Background(), func(tx *sql.Tx) error {
+ _, err := tx.Exec("UPDATE downloaders SET adapter = 'sabnzbd', protocol = 'usenet'")
+ return err
+ }); err != nil {
+ t.Fatal(err)
+ }
+ return w
+}
+
+func mayMove(domain.Downloader) bool { return true }
+
+// mediaTemp is a download or Library folder for an import test. With
+// HOLYARRS_TEST_MEDIA_DIR set it sits there instead, so the same tests run on a
+// share that cannot hardlink (a Docker Desktop mount of a Windows folder) while
+// the database stays on a local disk.
+func mediaTemp(t *testing.T) string {
+ t.Helper()
+ base := os.Getenv("HOLYARRS_TEST_MEDIA_DIR")
+ if base == "" {
+ return t.TempDir()
+ }
+ dir, err := os.MkdirTemp(base, "media-")
+ if err != nil {
+ t.Fatal(err)
+ }
+ t.Cleanup(func() { _ = os.RemoveAll(dir) })
+ return dir
+}
+
+func placedFiles(t *testing.T, w world) []mediafiles.File {
+ t.Helper()
+ fs, err := database.Select[mediafiles.File](context.Background(), w.s.Read(), "files", "")
+ if err != nil {
+ t.Fatal(err)
+ }
+ return fs
+}
+
+func TestUsenetImportMoves(t *testing.T) {
+ w := usenetWorld(t)
+ src := filepath.Join(w.dl, relName+".mkv")
+ imp, err := (&Importer{Store: w.s, MayMove: mayMove}).Import(context.Background(), w.dlID, false, domain.System)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if imp.State != "done" || imp.Result[0].PlacedBy != "move" || imp.Result[0].FellBack {
+ t.Fatalf("import %+v", imp)
+ }
+ if _, err := os.Stat(src); !errors.Is(err, fs.ErrNotExist) {
+ t.Error("the download still holds the file")
+ }
+ files := placedFiles(t, w)
+ if len(files) != 1 || files[0].PlacedBy != "move" {
+ t.Fatalf("files %+v", files)
+ }
+ if fi, err := os.Stat(filepath.Join(w.lib, filepath.FromSlash(files[0].RelativePath))); err != nil || fi.Size() != 2048 {
+ t.Fatalf("library file: %v", err)
+ }
+}
+
+func TestTorrentAndReadOnlyImportsKeepTheDownload(t *testing.T) {
+ for _, c := range []struct {
+ name string
+ world func(*testing.T) world
+ may func(domain.Downloader) bool
+ }{
+ {"torrent", setup, mayMove},
+ {"read-only Usenet", usenetWorld, func(domain.Downloader) bool { return false }},
+ {"no rule", usenetWorld, nil},
+ } {
+ t.Run(c.name, func(t *testing.T) {
+ w := c.world(t)
+ imp, err := (&Importer{Store: w.s, MayMove: c.may}).Import(context.Background(), w.dlID, false, domain.System)
+ if err != nil || imp.State != "done" || imp.Result[0].PlacedBy == "move" || imp.Plan[0].Move {
+ t.Fatalf("import %+v %v", imp, err)
+ }
+ if _, err := os.Stat(filepath.Join(w.dl, relName+".mkv")); err != nil {
+ t.Errorf("the download lost its file: %v", err)
+ }
+ })
+ }
+}
+
+// A rename to another drive fails; the file is linked or copied and the download keeps it.
+func TestMoveFallsBackToCopy(t *testing.T) {
+ w := usenetWorld(t)
+ src := filepath.Join(w.dl, relName+".mkv")
+ im := &Importer{Store: w.s, MayMove: mayMove, Ops: Ops{
+ Move: func(string, string) error { return &os.LinkError{Op: "rename", Err: syscall.EXDEV} },
+ Link: func(string, string) error { return &os.LinkError{Op: "link", Err: syscall.EXDEV} },
+ }}
+ imp, err := im.Import(context.Background(), w.dlID, false, domain.System)
+ if err != nil || imp.State != "done" || imp.Result[0].PlacedBy != "copy" || !imp.Result[0].FellBack || !strings.Contains(imp.Result[0].Error, "move not possible") {
+ t.Fatalf("import %+v %v", imp, err)
+ }
+ if _, err := os.Stat(src); err != nil {
+ t.Errorf("a copy took the file from the download: %v", err)
+ }
+}
+
+// An attempt that moved the file but stopped before recording it is retried
+// from the download folder: the moved file goes back, then moves again.
+func TestMoveRetryAfterStop(t *testing.T) {
+ w := usenetWorld(t)
+ ctx := context.Background()
+ src := filepath.Join(w.dl, relName+".mkv")
+ if err := w.s.Write(ctx, func(tx *sql.Tx) error {
+ _, err := tx.Exec("CREATE TRIGGER no_lib BEFORE UPDATE OF state ON slots WHEN NEW.state = 'in_library' BEGIN SELECT RAISE(ABORT, 'boom'); END")
+ return err
+ }); err != nil {
+ t.Fatal(err)
+ }
+ im := &Importer{Store: w.s, MayMove: mayMove}
+ if _, err := im.Import(ctx, w.dlID, false, domain.System); err == nil {
+ t.Fatal("the first attempt should stop")
+ }
+ if _, err := os.Stat(src); !errors.Is(err, fs.ErrNotExist) {
+ t.Fatal("the first attempt did not move the file")
+ }
+ if err := w.s.Write(ctx, func(tx *sql.Tx) error { _, err := tx.Exec("DROP TRIGGER no_lib"); return err }); err != nil {
+ t.Fatal(err)
+ }
+ imp, err := im.Import(ctx, w.dlID, false, domain.System)
+ if err != nil || imp.State != "done" || imp.Result[0].PlacedBy != "move" {
+ t.Fatalf("retry %+v %v", imp, err)
+ }
+ if files := placedFiles(t, w); len(files) != 1 {
+ t.Fatalf("files %+v", files)
+ }
+ var sl mediafiles.Slot
+ _ = database.Get(ctx, w.s.Read(), "slots", w.slotID, &sl)
+ if sl.State != mediafiles.SlotInLibrary {
+ t.Errorf("slot %s", sl.State)
+ }
+}
+
+// A file at the target that does not match the recorded size and time is
+// someone else's and never moves into the download folder.
+func TestRestoreLeavesOtherFiles(t *testing.T) {
+ dir := t.TempDir()
+ src, dst := filepath.Join(dir, "dl", "a.mkv"), filepath.Join(dir, "lib", "a.mkv")
+ write(t, dst, 10)
+ fi, _ := os.Stat(dst)
+ prior := &mediafiles.Import{
+ Plan: []mediafiles.PlanStep{{SourceFile: src, TargetPath: dst, Method: "hardlink", Move: true}},
+ Result: []mediafiles.PlaceResult{{SourceFile: src, Outcome: "placing", MoveSize: 11, MoveMod: fi.ModTime().UnixNano()}},
+ }
+ restoreMoves(prior)
+ if _, err := os.Stat(dst); err != nil {
+ t.Fatal("another file was taken from the Library")
+ }
+ prior.Result[0].MoveSize = 10
+ restoreMoves(prior)
+ if _, err := os.Stat(src); err != nil {
+ t.Fatalf("the moved file was not put back: %v", err)
+ }
+}
+
+func TestNoMoveFromInsideALibraryFolder(t *testing.T) {
+ w := usenetWorld(t)
+ inside := filepath.Join(w.lib, "incoming", "a.mkv")
+ outside := filepath.Join(w.dl, "b.mkv")
+ plan := []mediafiles.PlanStep{{SourceFile: inside, Method: "hardlink"}, {SourceFile: outside, Method: "hardlink"}, {SourceFile: outside, Method: "skip"}}
+ (&Importer{Store: w.s, MayMove: mayMove}).markMoves(context.Background(), w.s.Read(), plan, domain.Downloader{Protocol: "usenet"}, nil)
+ if plan[0].Move || !plan[1].Move || plan[2].Move {
+ t.Fatalf("plan %+v", plan)
+ }
+ torrent := []mediafiles.PlanStep{{SourceFile: outside, Method: "hardlink"}, {SourceFile: filepath.Join(w.dl, ".holyarrs-unpack-1", "c.mkv"), Method: "hardlink"}}
+ (&Importer{Store: w.s, MayMove: mayMove}).markMoves(context.Background(), w.s.Read(), torrent, domain.Downloader{Protocol: "torrent"}, []Candidate{{Path: torrent[1].SourceFile}})
+ if torrent[0].Move || !torrent[1].Move {
+ t.Fatalf("torrent plan %+v", torrent)
+ }
+}
+
+// A Usenet season pack stopped right after its files moved is finished by the
+// next attempt, with every episode recorded once.
+func TestShowUsenetMoveResumesAfterCrash(t *testing.T) {
+ w := showSetup(t, []int{1, 2, 3}, ep(1), ep(2), ep(3))
+ ctx := context.Background()
+ if err := w.s.Write(ctx, func(tx *sql.Tx) error {
+ _, err := tx.Exec("UPDATE downloaders SET adapter = 'sabnzbd', protocol = 'usenet'")
+ return err
+ }); err != nil {
+ t.Fatal(err)
+ }
+ crashAt = func(stage string) error {
+ if stage == "placed" {
+ return errors.New("killed")
+ }
+ return nil
+ }
+ im := &Importer{Store: w.s, MayMove: mayMove}
+ _, err := im.Import(ctx, w.dlID, false, domain.System)
+ crashAt = nil
+ if err == nil {
+ t.Fatal("no crash")
+ }
+ imp, err := im.Import(ctx, w.dlID, false, domain.System)
+ if err != nil || imp.State != "done" {
+ t.Fatalf("resume %v %+v", err, imp)
+ }
+ for _, r := range imp.Result {
+ if r.PlacedBy != "move" {
+ t.Errorf("result %+v", r)
+ }
+ }
+ var n int
+ _ = w.s.Read().QueryRow("SELECT count(*) FROM files WHERE placed_by = 'move'").Scan(&n)
+ if n != 3 {
+ t.Fatalf("files %d", n)
+ }
+ left, _ := os.ReadDir(w.dl)
+ for _, e := range left {
+ if strings.HasSuffix(e.Name(), ".mkv") {
+ t.Errorf("left in the download: %s", e.Name())
+ }
+ }
+}
+
+// A Usenet upgrade under a new file name that stops after the late hold still
+// has its move recorded, so the next attempt finishes it with one Library file.
+func TestUsenetUpgradeSurvivesCrashAfterLateHold(t *testing.T) {
+ w, _, oldID := upgradeWorld(t, "Dune.Part.Two.2024.1080p.WEB.H264-HOLYARRS", "Dune.Part.Two.2024.1080p.WEB.H264-HOLYARRS",
+ "Dune.Part.Two.2024.720p.HDTV.x264-OTHER")
+ ctx := context.Background()
+ if err := w.s.Write(ctx, func(tx *sql.Tx) error {
+ _, err := tx.Exec("UPDATE downloaders SET adapter = 'sabnzbd', protocol = 'usenet'")
+ return err
+ }); err != nil {
+ t.Fatal(err)
+ }
+ crashAt = func(s string) error {
+ if s == "held_late" {
+ return os.ErrDeadlineExceeded
+ }
+ return nil
+ }
+ im := &Importer{Store: w.s, MayMove: mayMove}
+ _, err := im.Import(ctx, w.dlID, false, domain.System)
+ crashAt = nil
+ if err == nil {
+ t.Fatal("no crash")
+ }
+ imp, err := im.Import(ctx, w.dlID, false, domain.System)
+ if err != nil || imp.State != "done" || imp.Result[0].PlacedBy != "move" {
+ t.Fatalf("restart %+v %v", imp, err)
+ }
+ var old mediafiles.File
+ _ = database.Get(ctx, w.s.Read(), "files", oldID, &old)
+ var present int
+ _ = w.s.Read().QueryRow("SELECT count(*) FROM files WHERE state = 'present'").Scan(&present)
+ if old.State != "replaced" || present != 1 {
+ t.Fatalf("old %s, present files %d", old.State, present)
+ }
+}
diff --git a/app/backend/internal/importer/rename.go b/app/backend/internal/importer/rename.go
new file mode 100644
index 0000000..7887765
--- /dev/null
+++ b/app/backend/internal/importer/rename.go
@@ -0,0 +1,16 @@
+package importer
+
+import (
+ "io/fs"
+ "os"
+)
+
+// renameChecked renames src to dst unless dst exists. It is the fallback where
+// the filesystem cannot rename without replacing (SMB, NFS, some FUSE mounts).
+// The check and the rename are not one step, so callers hold the files lock.
+func renameChecked(src, dst string) error {
+ if _, err := os.Lstat(dst); err == nil {
+ return &os.LinkError{Op: "rename", Old: src, New: dst, Err: fs.ErrExist}
+ }
+ return os.Rename(src, dst)
+}
diff --git a/app/backend/internal/importer/rename_darwin.go b/app/backend/internal/importer/rename_darwin.go
new file mode 100644
index 0000000..b81b898
--- /dev/null
+++ b/app/backend/internal/importer/rename_darwin.go
@@ -0,0 +1,22 @@
+//go:build darwin
+
+package importer
+
+import (
+ "errors"
+ "os"
+
+ "golang.org/x/sys/unix"
+)
+
+// renameNoReplace renames src to dst and never replaces an existing dst.
+func renameNoReplace(src, dst string) error {
+ err := unix.RenamexNp(src, dst, unix.RENAME_EXCL)
+ if errors.Is(err, unix.EINVAL) || errors.Is(err, unix.ENOTSUP) {
+ return renameChecked(src, dst)
+ }
+ if err != nil {
+ return &os.LinkError{Op: "rename", Old: src, New: dst, Err: err}
+ }
+ return nil
+}
diff --git a/app/backend/internal/importer/rename_linux.go b/app/backend/internal/importer/rename_linux.go
new file mode 100644
index 0000000..bea1f52
--- /dev/null
+++ b/app/backend/internal/importer/rename_linux.go
@@ -0,0 +1,22 @@
+//go:build linux
+
+package importer
+
+import (
+ "errors"
+ "os"
+
+ "golang.org/x/sys/unix"
+)
+
+// renameNoReplace renames src to dst and never replaces an existing dst.
+func renameNoReplace(src, dst string) error {
+ err := unix.Renameat2(unix.AT_FDCWD, src, unix.AT_FDCWD, dst, unix.RENAME_NOREPLACE)
+ if errors.Is(err, unix.EINVAL) || errors.Is(err, unix.ENOSYS) || errors.Is(err, unix.EOPNOTSUPP) {
+ return renameChecked(src, dst)
+ }
+ if err != nil {
+ return &os.LinkError{Op: "rename", Old: src, New: dst, Err: err}
+ }
+ return nil
+}
diff --git a/app/backend/internal/importer/rename_other.go b/app/backend/internal/importer/rename_other.go
new file mode 100644
index 0000000..4ed6136
--- /dev/null
+++ b/app/backend/internal/importer/rename_other.go
@@ -0,0 +1,6 @@
+//go:build !linux && !darwin && !windows
+
+package importer
+
+// renameNoReplace renames src to dst and never replaces an existing dst.
+func renameNoReplace(src, dst string) error { return renameChecked(src, dst) }
diff --git a/app/backend/internal/importer/rename_test.go b/app/backend/internal/importer/rename_test.go
new file mode 100644
index 0000000..3504c85
--- /dev/null
+++ b/app/backend/internal/importer/rename_test.go
@@ -0,0 +1,103 @@
+package importer
+
+import (
+ "errors"
+ "io/fs"
+ "os"
+ "path/filepath"
+ "strings"
+ "syscall"
+ "testing"
+)
+
+func TestRenameNoReplace(t *testing.T) {
+ dir := t.TempDir()
+ src, dst := filepath.Join(dir, "a.mkv"), filepath.Join(dir, "b.mkv")
+ write(t, src, 10)
+ if err := renameNoReplace(src, dst); err != nil {
+ t.Fatal(err)
+ }
+ if _, err := os.Stat(src); !errors.Is(err, fs.ErrNotExist) {
+ t.Error("the source is still there")
+ }
+ if fi, err := os.Stat(dst); err != nil || fi.Size() != 10 {
+ t.Fatalf("target: %v", err)
+ }
+ other := filepath.Join(dir, "c.mkv")
+ write(t, other, 3)
+ if err := renameNoReplace(other, dst); !errors.Is(err, fs.ErrExist) {
+ t.Errorf("onto an existing file: %v", err)
+ }
+ if fi, _ := os.Stat(dst); fi.Size() != 10 {
+ t.Error("an existing file was replaced")
+ }
+ if _, err := os.Stat(other); err != nil {
+ t.Error("the refused source went missing")
+ }
+}
+
+// Without no-replace support the check-then-rename path still never replaces a file.
+func TestRenameNoReplaceFallback(t *testing.T) {
+ dir := t.TempDir()
+ src, dst := filepath.Join(dir, "a.mkv"), filepath.Join(dir, "b.mkv")
+ write(t, src, 10)
+ write(t, dst, 3)
+ if err := renameChecked(src, dst); !errors.Is(err, fs.ErrExist) {
+ t.Errorf("onto an existing file: %v", err)
+ }
+ if fi, _ := os.Stat(dst); fi.Size() != 3 {
+ t.Error("an existing file was replaced")
+ }
+ _ = os.Remove(dst)
+ if err := renameChecked(src, dst); err != nil {
+ t.Fatal(err)
+ }
+ if fi, err := os.Stat(dst); err != nil || fi.Size() != 10 {
+ t.Fatalf("target: %v", err)
+ }
+}
+
+// When the finished part cannot be hardlinked, it is renamed into place: the
+// source is read once, not twice.
+func TestCopyWritesOnceWhenLinkUnsupported(t *testing.T) {
+ dir := t.TempDir()
+ src, dst := filepath.Join(dir, "src.mkv"), filepath.Join(dir, "out", "dst.mkv")
+ write(t, src, 100)
+ _ = os.MkdirAll(filepath.Dir(dst), 0o755)
+ linkHook = func(string, string) error { return &os.LinkError{Op: "link", Err: syscall.EPERM} }
+ t.Cleanup(func() { linkHook = nil })
+ opens := 0
+ openHook = func(p string) {
+ if p == src {
+ opens++
+ }
+ }
+ t.Cleanup(func() { openHook = nil })
+ if err := copyFile(src, dst); err != nil {
+ t.Fatal(err)
+ }
+ if opens != 1 {
+ t.Errorf("the source was read %d times", opens)
+ }
+ if fi, _ := os.Stat(dst); fi == nil || fi.Size() != 100 {
+ t.Fatal("copy wrong")
+ }
+ if e, _ := os.ReadDir(filepath.Dir(dst)); len(e) != 1 || strings.HasSuffix(e[0].Name(), ".part") {
+ t.Fatalf("temp file left behind: %v", e)
+ }
+}
+
+// Any link error other than "exists" still ends in one finished copy.
+func TestCopyRenamesOnOtherLinkErrors(t *testing.T) {
+ dir := t.TempDir()
+ src, dst := filepath.Join(dir, "src.mkv"), filepath.Join(dir, "dst.mkv")
+ write(t, src, 50)
+ linkHook = func(string, string) error { return &os.LinkError{Op: "link", Err: syscall.Errno(38)} } // ENOSYS on Linux
+ t.Cleanup(func() { linkHook = nil })
+ if err := copyFile(src, dst); err != nil {
+ t.Fatal(err)
+ }
+ if fi, _ := os.Stat(dst); fi == nil || fi.Size() != 50 {
+ t.Fatal("copy wrong")
+ }
+}
diff --git a/app/backend/internal/importer/rename_windows.go b/app/backend/internal/importer/rename_windows.go
new file mode 100644
index 0000000..d27d5dc
--- /dev/null
+++ b/app/backend/internal/importer/rename_windows.go
@@ -0,0 +1,44 @@
+//go:build windows
+
+package importer
+
+import (
+ "os"
+ "path/filepath"
+ "strings"
+
+ "golang.org/x/sys/windows"
+)
+
+// renameNoReplace renames src to dst and never replaces an existing dst:
+// MoveFileEx without the replace flag refuses an existing target.
+func renameNoReplace(src, dst string) error {
+ from, err := windows.UTF16PtrFromString(longPath(src))
+ if err != nil {
+ return &os.LinkError{Op: "rename", Old: src, New: dst, Err: err}
+ }
+ to, err := windows.UTF16PtrFromString(longPath(dst))
+ if err != nil {
+ return &os.LinkError{Op: "rename", Old: src, New: dst, Err: err}
+ }
+ if err := windows.MoveFileEx(from, to, 0); err != nil {
+ return &os.LinkError{Op: "rename", Old: src, New: dst, Err: err}
+ }
+ return nil
+}
+
+// longPath gives a path Windows accepts past 260 characters, as Go's own file
+// calls do.
+func longPath(p string) string {
+ if abs, err := filepath.Abs(p); err == nil {
+ p = abs
+ }
+ const prefix, unc = "\\\\?\\", "\\\\"
+ if len(p) < 248 || strings.HasPrefix(p, prefix) {
+ return p
+ }
+ if strings.HasPrefix(p, unc) {
+ return prefix + "UNC\\" + p[len(unc):]
+ }
+ return prefix + p
+}
diff --git a/app/backend/internal/importer/rename_windows_test.go b/app/backend/internal/importer/rename_windows_test.go
new file mode 100644
index 0000000..fdee68f
--- /dev/null
+++ b/app/backend/internal/importer/rename_windows_test.go
@@ -0,0 +1,45 @@
+//go:build windows
+
+package importer
+
+import (
+ "os"
+ "path/filepath"
+ "strings"
+ "testing"
+)
+
+func TestLongPathPrefix(t *testing.T) {
+ long := "C:\\" + strings.Repeat("a", 300)
+ if got := longPath(long); got != "\\\\?\\"+long {
+ t.Errorf("drive path: %q", got[:8])
+ }
+ share := "\\\\nas\\media\\" + strings.Repeat("b", 300)
+ if got := longPath(share); got != "\\\\?\\UNC\\nas\\media\\"+strings.Repeat("b", 300) {
+ t.Errorf("share path: %q", got[:16])
+ }
+ if got := longPath("C:\\short.mkv"); got != "C:\\short.mkv" {
+ t.Errorf("short path: %q", got)
+ }
+}
+
+// A move into a folder deeper than 260 characters works and writes nothing twice.
+func TestRenameNoReplaceLongPath(t *testing.T) {
+ dir := t.TempDir()
+ src := filepath.Join(dir, "a.mkv")
+ write(t, src, 10)
+ deep := dir
+ for len(deep) < 280 {
+ deep = filepath.Join(deep, strings.Repeat("d", 40))
+ }
+ if err := os.MkdirAll(deep, 0o755); err != nil {
+ t.Fatal(err)
+ }
+ dst := filepath.Join(deep, "Movie (2024) 1080p WEB.mkv")
+ if err := renameNoReplace(src, dst); err != nil {
+ t.Fatal(err)
+ }
+ if fi, err := os.Stat(dst); err != nil || fi.Size() != 10 {
+ t.Fatalf("target: %v", err)
+ }
+}
diff --git a/app/backend/internal/importer/showimport_test.go b/app/backend/internal/importer/showimport_test.go
index 9b62aa6..6dd2937 100644
--- a/app/backend/internal/importer/showimport_test.go
+++ b/app/backend/internal/importer/showimport_test.go
@@ -42,7 +42,7 @@ func showSetup(t *testing.T, dlEps []int, files ...string) showWorld {
}
t.Cleanup(func() { _ = s.Close() })
setFake(t, s, "import_size_floors", "false")
- w := showWorld{s: s, dl: t.TempDir(), lib: t.TempDir(), slots: map[int]int64{}, folder: "Copper Valley (2025)"}
+ w := showWorld{s: s, dl: mediaTemp(t), lib: mediaTemp(t), slots: map[int]int64{}, folder: "Copper Valley (2025)"}
var seen []domain.SeenFile
for _, f := range files {
write(t, filepath.Join(w.dl, packName, filepath.FromSlash(f)), 2048)
diff --git a/app/backend/internal/importer/shows_import.go b/app/backend/internal/importer/shows_import.go
index 4d25ddf..9208473 100644
--- a/app/backend/internal/importer/shows_import.go
+++ b/app/backend/internal/importer/shows_import.go
@@ -152,6 +152,13 @@ func (im *Importer) importShow(ctx context.Context, d domain.Download, dr domain
if !rootOK {
cands, bad = nil, []mediafiles.PlanStep{unpackStep(d.SavePath, "the Downloader reported a folder with \"..\" in it")}
}
+ prior, err := database.Select[mediafiles.Import](ctx, db, "imports", "download_id = ? AND state = 'placing' ORDER BY id DESC LIMIT 1", d.ID)
+ if err != nil {
+ return nil, err
+ }
+ if len(prior) == 1 && !dryRun {
+ restoreMoves(&prior[0])
+ }
unpacked, cleanup, unpackWhy := unpackRars(ctx, d.ID, root, cands, rules, dryRun)
defer cleanup()
cands = append(cands, unpacked...)
@@ -293,6 +300,7 @@ func (im *Importer) importShow(ctx context.Context, d domain.Download, dr domain
}
}
}
+ im.markMoves(ctx, db, plan, dr, unpacked)
imp := &mediafiles.Import{DownloadID: &d.ID, FromPath: root, Kind: map[bool]string{false: "episodes", true: "tracks"}[music], Plan: plan, Result: []mediafiles.PlaceResult{}, Mode: "dry_run", State: "planned"}
if dryRun {
return imp, nil
@@ -303,10 +311,6 @@ func (im *Importer) importShow(ctx context.Context, d domain.Download, dr domain
im.lowSpace(ctx, lowSpace, firstSlot, ti.ID, d.ID, by)
}
- prior, err := database.Select[mediafiles.Import](ctx, db, "imports", "download_id = ? AND state = 'placing' ORDER BY id DESC LIMIT 1", d.ID)
- if err != nil {
- return nil, err
- }
resumable := map[string]time.Time{}
recorded := []string{}
if len(prior) == 1 {
@@ -328,6 +332,11 @@ func (im *Importer) importShow(ctx context.Context, d domain.Download, dr domain
}
imp.Result = append(imp.Result, r)
}
+ var before []mediafiles.PlaceResult
+ if len(prior) == 1 {
+ before = prior[0].Result
+ }
+ moveProof(plan, imp.Result, before)
imp.State = "placing"
var moved []int64
if err := im.Store.Write(ctx, func(tx *sql.Tx) error {
@@ -401,7 +410,9 @@ func (im *Importer) importShow(ctx context.Context, d domain.Download, dr domain
return imp, err
}
}
+ proof := imp.Result
imp.Result = execute(plan, im.Ops, resumable)
+ keepProof(imp.Result, proof)
for i, to := range heldFirst {
imp.Result[i].HeldAside = to
}
diff --git a/app/backend/internal/mediafiles/dbtests/m1_test.go b/app/backend/internal/mediafiles/dbtests/m1_test.go
index 7be8dfd..86c17d8 100644
--- a/app/backend/internal/mediafiles/dbtests/m1_test.go
+++ b/app/backend/internal/mediafiles/dbtests/m1_test.go
@@ -312,8 +312,10 @@ func TestM1MigrationsAreAddOnly(t *testing.T) {
// TestMoveCredentialsPerAddressMigration proves no key is lost.
// 0103 rebuilds own_traits to add the size kind;
// TestOwnTraitsKeptBySizeMigration proves no trait or id is lost.
+ // 0106 rebuilds downloaders to add the rtorrent adapter;
+ // TestDownloadersKeptByRTorrentMigration proves no row is lost.
if m.Version < 7 || m.Version == 8 || m.Version == 19 || m.Version == 21 || m.Version == 23 || m.Version == 25 || m.Version == 42 || m.Version == 82 ||
- m.Version == 84 || m.Version == 95 || m.Version == 102 || m.Version == 103 {
+ m.Version == 84 || m.Version == 95 || m.Version == 102 || m.Version == 103 || m.Version == 106 {
continue
}
up := strings.ToUpper(m.SQL)
diff --git a/app/backend/internal/mediafiles/testdata/pin_catalog_layouts.golden.txt b/app/backend/internal/mediafiles/testdata/pin_catalog_layouts.golden.txt
index 5255f42..a3eecd9 100644
--- a/app/backend/internal/mediafiles/testdata/pin_catalog_layouts.golden.txt
+++ b/app/backend/internal/mediafiles/testdata/pin_catalog_layouts.golden.txt
@@ -143,6 +143,7 @@ SourceFile string `json:"source_file"`
TargetSlotIDs []int64 `json:"target_slot_ids"`
TargetPath string `json:"target_path"`
Method string `json:"method"`
+Move bool `json:"move,omitempty"`
ReplacesFileID *int64 `json:"replaces_file_id,omitempty"`
Confidence float64 `json:"confidence"`
Why []string `json:"why"`
@@ -153,6 +154,8 @@ PlacedBy string `json:"placed_by"`
FellBack bool `json:"fell_back"`
Error string `json:"error,omitempty"`
HeldAside string `json:"held_aside,omitempty"`
+MoveSize int64 `json:"move_size,omitempty"`
+MoveMod int64 `json:"move_mod,omitempty"`
HeldAsideMore []string `json:"held_aside_more,omitempty"`
== Import
Meta Meta ``
diff --git a/app/backend/internal/mediafiles/types.go b/app/backend/internal/mediafiles/types.go
index dbb29db..5811996 100644
--- a/app/backend/internal/mediafiles/types.go
+++ b/app/backend/internal/mediafiles/types.go
@@ -208,6 +208,9 @@ type PlanStep struct {
TargetSlotIDs []int64 `json:"target_slot_ids"`
TargetPath string `json:"target_path"`
Method string `json:"method"` // hardlink, move, copy
+ // Move tries a rename into the Library first: the file is not needed in
+ // the download folder afterwards (a finished Usenet job, an unpacked file).
+ Move bool `json:"move,omitempty"`
ReplacesFileID *int64 `json:"replaces_file_id,omitempty"`
Confidence float64 `json:"confidence"`
Why []string `json:"why"`
@@ -221,6 +224,10 @@ type PlaceResult struct {
FellBack bool `json:"fell_back"`
Error string `json:"error,omitempty"`
HeldAside string `json:"held_aside,omitempty"` // where the replaced copy was moved before this file was placed
+ // MoveSize and MoveMod (unix nanoseconds) are the source's size and time
+ // before a move, so a retry knows the moved file as its own.
+ MoveSize int64 `json:"move_size,omitempty"`
+ MoveMod int64 `json:"move_mod,omitempty"`
// HeldAsideMore lists where other replaced copies went (an episode
// file that replaces several, such as two single episodes).
HeldAsideMore []string `json:"held_aside_more,omitempty"`
diff --git a/app/backend/internal/migrate/plan_services.go b/app/backend/internal/migrate/plan_services.go
index d064b21..c2d451b 100644
--- a/app/backend/internal/migrate/plan_services.go
+++ b/app/backend/internal/migrate/plan_services.go
@@ -228,11 +228,11 @@ func (b *builder) downloaders(s *Snapshot) {
from := b.from("download_clients", i)
var adapter string
switch k := strings.ToLower(d.Kind); k {
- case "qbittorrent", "sabnzbd", "transmission", "deluge", "nzbget":
+ case "qbittorrent", "sabnzbd", "transmission", "deluge", "rtorrent", "nzbget":
adapter = k
}
if adapter == "" {
- b.not(GroupDownloaders, from, d.Name, "HolyArrs talks to qBittorrent, Transmission, Deluge, SABnzbd and NZBGet only")
+ b.not(GroupDownloaders, from, d.Name, "HolyArrs talks to qBittorrent, Transmission, Deluge, rTorrent, SABnzbd and NZBGet only")
continue
}
port, _ := setNum(d.Settings, "port")
diff --git a/app/backend/internal/migrate/plan_test.go b/app/backend/internal/migrate/plan_test.go
index df7a9b7..8b0897a 100644
--- a/app/backend/internal/migrate/plan_test.go
+++ b/app/backend/internal/migrate/plan_test.go
@@ -833,12 +833,13 @@ func TestSyncHours(t *testing.T) {
}
}
-// Transmission, Deluge and NZBGet set up in the old apps come over as
+// Transmission, Deluge, rTorrent and NZBGet set up in the old apps come over as
// Downloaders, like qBittorrent and SABnzbd; other clients stay behind.
func TestPlanEveryDownloaderKind(t *testing.T) {
s := &Snapshot{Kind: Sonarr, DownloadClients: []Provider{
{Name: "Trans", Kind: "Transmission", Settings: map[string]any{"host": "transmission", "port": int64(9091), "urlBase": "/transmission/", "username": "me"}, NeedsReentry: []string{"password"}},
{Name: "Del", Kind: "Deluge", Settings: map[string]any{"host": "deluge", "port": int64(8112)}, NeedsReentry: []string{"password"}},
+ {Name: "RT", Kind: "RTorrent", Settings: map[string]any{"host": "rtorrent", "port": int64(8080), "urlBase": "RPC2", "username": "me", "tvCategory": "tv-sonarr"}, NeedsReentry: []string{"password"}},
{Name: "NZB", Kind: "Nzbget", Settings: map[string]any{"host": "nzbget", "port": int64(6789), "username": "nzb"}},
{Name: "Old", Kind: "Vuze", Settings: map[string]any{"host": "vuze", "port": int64(9091)}},
}}
@@ -848,7 +849,7 @@ func TestPlanEveryDownloaderKind(t *testing.T) {
for _, it := range p.Group(GroupDownloaders).Items {
got[it.Name] = it.Downloader
}
- for name, want := range map[string]string{"Trans": "transmission", "Del": "deluge", "NZB": "nzbget"} {
+ for name, want := range map[string]string{"Trans": "transmission", "Del": "deluge", "RT": "rtorrent", "NZB": "nzbget"} {
if d := got[name]; d == nil || d.Adapter != want {
t.Fatalf("%s: %+v", name, d)
}
@@ -856,7 +857,10 @@ func TestPlanEveryDownloaderKind(t *testing.T) {
if got["Trans"].URL != "http://transmission:9091/transmission" || got["Trans"].Username != "me" || !got["Trans"].NeedsInput || got["NZB"].NeedsInput {
t.Fatalf("details: %+v %+v", got["Trans"], got["NZB"])
}
- if n, ok := notMoved(p, "sonarr download_clients[3]"); !ok || n.Why != "HolyArrs talks to qBittorrent, Transmission, Deluge, SABnzbd and NZBGet only" {
+ if rt := got["RT"]; rt.URL != "http://rtorrent:8080/RPC2" || rt.Username != "me" || !rt.NeedsInput {
+ t.Fatalf("rtorrent: %+v", rt)
+ }
+ if n, ok := notMoved(p, "sonarr download_clients[4]"); !ok || n.Why != "HolyArrs talks to qBittorrent, Transmission, Deluge, rTorrent, SABnzbd and NZBGet only" {
t.Fatalf("vuze: %+v", n)
}
}
diff --git a/app/backend/internal/migrate/plan_types.go b/app/backend/internal/migrate/plan_types.go
index bf0c494..300112f 100644
--- a/app/backend/internal/migrate/plan_types.go
+++ b/app/backend/internal/migrate/plan_types.go
@@ -253,7 +253,7 @@ type SourcePlan struct {
// DownloaderPlan is a Downloader to add.
type DownloaderPlan struct {
- Adapter string `json:"kind"` // qbittorrent, transmission, deluge, sabnzbd, nzbget
+ Adapter string `json:"kind"` // qbittorrent, transmission, deluge, rtorrent, sabnzbd, nzbget
URL string `json:"url"`
Username string `json:"username,omitempty"`
Category string `json:"category,omitempty"`
diff --git a/app/backend/tools/structurecheck/testdata/baseline-migrations.txt b/app/backend/tools/structurecheck/testdata/baseline-migrations.txt
index 215dc34..ab7dc52 100644
--- a/app/backend/tools/structurecheck/testdata/baseline-migrations.txt
+++ b/app/backend/tools/structurecheck/testdata/baseline-migrations.txt
@@ -103,3 +103,4 @@ main 0101_library_folder_copies_expected.sql 11d78e688fe6ba9985ff736ea60895772a5
main 0102_move_per_instance.sql 4e25a81a66fcb40a8ee7b57c8889be8e05f4257cf5460a1c0291324639ca4704
main 0103_own_trait_size.sql c3af7decd065a17676d1bbba1a27e174e3a8975aa9bfa2b48814136312e4a0da
main 0104_title_score.sql 100561ffefc752246dd55a3cee9acb5762b3292898d6bb54096bb84d78a0534d
+main 0106_rtorrent_downloader.sql c4ce4767af422f2aa1e19813e700d10faa1a4eacaa93c7ec99c552fad9a587ec
diff --git a/app/backend/tools/structurecheck/testdata/json-keys.txt b/app/backend/tools/structurecheck/testdata/json-keys.txt
index c93f86d..ad31e21 100644
--- a/app/backend/tools/structurecheck/testdata/json-keys.txt
+++ b/app/backend/tools/structurecheck/testdata/json-keys.txt
@@ -917,6 +917,8 @@ more_versions
most_replayed
move
move_job_id
+move_mod
+move_size
moves
movie
movieFile
diff --git a/app/frontend/src/lib/core/i18n/messages/ar/downloads.json b/app/frontend/src/lib/core/i18n/messages/ar/downloads.json
index eb70abc..246e3e1 100644
--- a/app/frontend/src/lib/core/i18n/messages/ar/downloads.json
+++ b/app/frontend/src/lib/core/i18n/messages/ar/downloads.json
@@ -93,12 +93,12 @@
"downloads.clients.slowFailed": "تعذّر تغيير الوضع البطيء",
"downloads.clients.someConnected": "{n} من {total} متصل",
"downloads.cm.confirmFailed": "تعذّر تأكيد المطابقة",
- "downloads.cm.desc": "اختر العمل الذي يحويه كل تورنت. يُضاف إلى مكتبتك دون بحث.",
+ "downloads.cm.desc": "اختر العمل الذي يحويه كل تنزيل. يُضاف إلى مكتبتك دون بحث.",
"downloads.cm.done": "تم",
- "downloads.cm.every": "كل التورنتات مطابَقة.",
+ "downloads.cm.every": "كل التنزيلات مطابَقة.",
"downloads.cm.match": "طابق",
"downloads.cm.matchNow": "طابق الآن",
- "downloads.cm.matching": "مطابقة التورنتات",
+ "downloads.cm.matching": "مطابقة التنزيلات",
"downloads.cm.none": "لم يُعثر على عمل لهذا الاسم.",
"downloads.cm.notMedia": "ليس وسائط",
"downloads.cm.skip": "تخطَّ",
@@ -702,8 +702,8 @@
"downloads.many.seasonPack": "حزمة موسم",
"downloads.many.track": "مقطع",
"downloads.many.tracks": "مقاطع",
- "downloads.match.many": "{n} تورنتات تحتاج إلى مطابقة",
- "downloads.match.one": "تورنت واحد يحتاج إلى مطابقة",
+ "downloads.match.many": "{n} تنزيلات تحتاج إلى مطابقة",
+ "downloads.match.one": "تنزيل واحد يحتاج إلى مطابقة",
"downloads.more.allTime": "كل الأوقات",
"downloads.more.answering": "يستجيب",
"downloads.more.free": "حرة",
@@ -768,6 +768,10 @@
"downloads.page.cantStartOne": "تعذّر بدء {name}",
"downloads.page.cantUpdateMany": "تعذّر تحديث التنزيلات",
"downloads.page.capped": "عرض أول {max} من {total} تورنتات لم يضفها HolyArrs.",
+ "downloads.page.partial": "عرض {shown} من {total} تورنتات لم يضفها HolyArrs.",
+ "downloads.page.partialFiltered": "عرض {shown} من {total} تورنتات لم يضفها HolyArrs. مع تشغيل عامل تصفية، تشمل الأعداد المحمّلة فقط.",
+ "downloads.page.notLoaded.title": "لم يُحمَّل بعد",
+ "downloads.page.notLoaded.text": "{count} من التورنتات في هذا التبويب أبعد في قائمة أداة التنزيل. حمّل المزيد لرؤيتها.",
"downloads.page.couldNotLoad": "تعذّر تحميل التنزيلات.",
"downloads.page.details": "التفاصيل",
"downloads.page.done.pause": "أُوقف التنزيل مؤقتًا",
diff --git a/app/frontend/src/lib/core/i18n/messages/ar/server-lines.json b/app/frontend/src/lib/core/i18n/messages/ar/server-lines.json
index 2a38589..a2371eb 100644
--- a/app/frontend/src/lib/core/i18n/messages/ar/server-lines.json
+++ b/app/frontend/src/lib/core/i18n/messages/ar/server-lines.json
@@ -839,7 +839,7 @@
"server.migrate.holyarrs-reads-trakt-lists-and-watchlists": "يقرأ HolyArrs قوائم Trakt وقوائم المشاهدة؛ تبقى قائمة المشاهَد أو المجموعة في Radarr",
"server.migrate.holyarrs-sets-one-proxy-address-per": "يضبط HolyArrs عنوان وكيل واحدًا لكل مصدر؛ اضبطه على المصادر التي استخدمته",
"server.migrate.holyarrs-stopped-during-this-import-before": "توقف HolyArrs أثناء هذا الاستيراد قبل أن ينتهي. ما أنشأه معلَّم: استورد من جديد لإكماله (لا شيء يُضاف مرتين)، أو تراجع عنه.",
- "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "يتعامل HolyArrs مع qBittorrent وTransmission وDeluge وSABnzbd وNZBGet فقط",
+ "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "يتعامل HolyArrs مع qBittorrent وTransmission وDeluge وrTorrent وSABnzbd وNZBGet فقط",
"server.migrate.holyarrs-uses-one-category-of-its": "يستخدم HolyArrs فئة واحدة خاصة به لكل برنامج تنزيل (holyarrs)",
"server.migrate.holyarrs-writes-no-metadata-files-for": "لا يكتب HolyArrs ملفات بيانات وصفية لمشغلات الوسائط",
"server.migrate.import-row-was-replaced": "استُبدل سطر الاستيراد",
diff --git a/app/frontend/src/lib/core/i18n/messages/ar/settings-downloaders.json b/app/frontend/src/lib/core/i18n/messages/ar/settings-downloaders.json
index 9130e60..230d942 100644
--- a/app/frontend/src/lib/core/i18n/messages/ar/settings-downloaders.json
+++ b/app/frontend/src/lib/core/i18n/messages/ar/settings-downloaders.json
@@ -2,6 +2,7 @@
"settings.downloaders.catSab": "يجب أن تكون موجودة في SABnzbd مسبقًا.",
"settings.downloaders.catTransmission": "تُخزَّن كوسم في Transmission؛ ويلزم Transmission 4 أو أحدث.",
"settings.downloaders.catDeluge": "تُخزَّن كوسم في Deluge؛ ويحتاج الـ daemon المتصل إلى إضافة Label.",
+ "settings.downloaders.catRtorrent": "تُخزَّن كوسم في rTorrent، ويظهر في عمود Label في ruTorrent.",
"settings.downloaders.catNzbget": "تُرسل بوصفها فئة NZBGet.",
"settings.downloaders.catQbit": "تُنشأ في qBittorrent إن لم تكن موجودة.",
"settings.downloaders.saved": "تم حفظ {name}",
@@ -52,6 +53,7 @@
"settings.downloaders.secretDeluge": "كلمة مرور واجهة Deluge على الويب.",
"settings.downloaders.secretKept": "يُحفظ مشفّرًا ولا يظهر مرة أخرى. نقل العنوان إلى مضيف آخر يحتاج إليه من جديد.",
"settings.downloaders.delugeNote": "يجب أن تكون واجهة Deluge على الويب متصلة بـ daemon مفعّلة فيه إضافة Label",
+ "settings.downloaders.rtorrentNote": "استخدم عنوان XML-RPC: /RPC2 (المنفذ 8000 في صورة crazymax) أو /plugins/httprpc/action.php في ruTorrent. لا يستطيع rTorrent حذف الملفات، لذا يحذفها HolyArrs حيث يمكنه الوصول إليها. مع خادم seedbox، أضف زوج مسارات للمجلد الذي تملؤه المزامنة.",
"settings.downloaders.moreOptions": "خيارات أكثر",
"settings.downloaders.local": "الوصول إلى الشبكة المحلية",
"settings.downloaders.localHint": "مفعّل في معظم الإعدادات",
@@ -91,6 +93,8 @@
"settings.downloaders.removeFailedHint": "يحذف ملفاتها أيضًا",
"settings.downloaders.autoAdd": "أضف الأعمال المطابقة إلى مكتبتك",
"settings.downloaders.autoAddHint": "المطابقات المؤكدة الموجودة في برنامج تنزيل تُضاف دون بحث",
+ "settings.downloaders.sabOutside": "اعرض مهام Usenet التي أرسلتها تطبيقات أخرى",
+ "settings.downloaders.sabOutsideHint": "تظهر مهام الفئات الأخرى في SABnzbd أو NZBGet المشترك في التنزيلات للعرض فقط. لا يطابقها HolyArrs أبدًا.",
"settings.downloaders.whenRemove": "عندما تزيل تنزيلًا",
"settings.downloaders.deleteFiles": "احذف ملفاته",
"settings.downloaders.turnDown": "استبعد إصداره",
diff --git a/app/frontend/src/lib/core/i18n/messages/ar/settings-index.json b/app/frontend/src/lib/core/i18n/messages/ar/settings-index.json
index 99ac9a5..6007664 100644
--- a/app/frontend/src/lib/core/i18n/messages/ar/settings-index.json
+++ b/app/frontend/src/lib/core/i18n/messages/ar/settings-index.json
@@ -206,7 +206,7 @@
"settings.index.search.search-now.search-now.label": "ابحث الآن",
"settings.index.search.search-now.search-now.words": "بحث نسخة أفضل خلاصات تشغيل",
"settings.index.downloaders.downloaders-card.downloaders.label": "برامج التنزيل",
- "settings.index.downloaders.downloaders-card.downloaders.words": "عميل تنزيل qbittorrent sabnzbd transmission deluge nzbget تورنت إضافة",
+ "settings.index.downloaders.downloaders-card.downloaders.words": "عميل تنزيل qbittorrent sabnzbd transmission deluge rtorrent rutorrent nzbget تورنت إضافة",
"settings.index.downloaders.st-stall.stalled-after.label": "يتعثر بعد",
"settings.index.downloaders.st-stall.stalled-after.words": "متعثر عالق ساعات تنزيل",
"settings.index.downloaders.st-act.give-up-and-try-the-next-release-after.label": "تخلَّ وجرّب الإصدار التالي بعد",
diff --git a/app/frontend/src/lib/core/i18n/messages/de/downloads.json b/app/frontend/src/lib/core/i18n/messages/de/downloads.json
index d025f07..79bc973 100644
--- a/app/frontend/src/lib/core/i18n/messages/de/downloads.json
+++ b/app/frontend/src/lib/core/i18n/messages/de/downloads.json
@@ -93,12 +93,12 @@
"downloads.clients.slowFailed": "Langsamer Modus konnte nicht geändert werden",
"downloads.clients.someConnected": "{n} von {total} verbunden",
"downloads.cm.confirmFailed": "Zuordnung konnte nicht bestätigt werden",
- "downloads.cm.desc": "Wähl den Titel, den jeder Torrent enthält. Er kommt ohne Suche in deine Bibliothek.",
+ "downloads.cm.desc": "Wähl den Titel, den jeder Download enthält. Er kommt ohne Suche in deine Bibliothek.",
"downloads.cm.done": "Fertig",
- "downloads.cm.every": "Jeder Torrent ist zugeordnet.",
+ "downloads.cm.every": "Jeder Download ist zugeordnet.",
"downloads.cm.match": "Zuordnen",
"downloads.cm.matchNow": "Jetzt zuordnen",
- "downloads.cm.matching": "Torrents werden zugeordnet",
+ "downloads.cm.matching": "Downloads werden zugeordnet",
"downloads.cm.none": "Für diesen Namen wurde kein Titel gefunden.",
"downloads.cm.notMedia": "Keine Medien",
"downloads.cm.skip": "Überspringen",
@@ -702,8 +702,8 @@
"downloads.many.seasonPack": "Staffelpaket",
"downloads.many.track": "Track",
"downloads.many.tracks": "Tracks",
- "downloads.match.many": "{n} Torrents brauchen eine Zuordnung",
- "downloads.match.one": "1 Torrent braucht eine Zuordnung",
+ "downloads.match.many": "{n} Downloads brauchen eine Zuordnung",
+ "downloads.match.one": "1 Download braucht eine Zuordnung",
"downloads.more.allTime": "Gesamt",
"downloads.more.answering": "Antwortet",
"downloads.more.free": "Frei",
@@ -768,6 +768,10 @@
"downloads.page.cantStartOne": "{name} ließ sich nicht starten",
"downloads.page.cantUpdateMany": "Downloads ließen sich nicht aktualisieren",
"downloads.page.capped": "Zeigt die ersten {max} von {total} Torrents, die HolyArrs nicht hinzugefügt hat.",
+ "downloads.page.partial": "Zeigt {shown} von {total} Torrents, die HolyArrs nicht hinzugefügt hat.",
+ "downloads.page.partialFiltered": "Zeigt {shown} von {total} Torrents, die HolyArrs nicht hinzugefügt hat. Mit einem Filter zählen die Zahlen nur die geladenen.",
+ "downloads.page.notLoaded.title": "Noch nicht geladen",
+ "downloads.page.notLoaded.text": "{count} Torrents auf diesem Tab stehen weiter unten in der Liste des Downloaders. Lade mehr, um sie zu sehen.",
"downloads.page.couldNotLoad": "Downloads konnten nicht geladen werden.",
"downloads.page.details": "Details",
"downloads.page.done.pause": "Download pausiert",
diff --git a/app/frontend/src/lib/core/i18n/messages/de/server-lines.json b/app/frontend/src/lib/core/i18n/messages/de/server-lines.json
index d77c4ef..0e7b910 100644
--- a/app/frontend/src/lib/core/i18n/messages/de/server-lines.json
+++ b/app/frontend/src/lib/core/i18n/messages/de/server-lines.json
@@ -839,7 +839,7 @@
"server.migrate.holyarrs-reads-trakt-lists-and-watchlists": "HolyArrs liest Trakt-Listen und Merklisten; eine Gesehen- oder Sammlungsliste bleibt in Radarr",
"server.migrate.holyarrs-sets-one-proxy-address-per": "HolyArrs kennt pro Quelle nur eine Proxy-Adresse; lege sie bei den Quellen fest, die einen Proxy genutzt haben",
"server.migrate.holyarrs-stopped-during-this-import-before": "HolyArrs wurde während dieses Imports gestoppt, bevor er fertig war. Was es angelegt hat, ist markiert: importiere noch einmal, um fertig zu werden (nichts wird doppelt hinzugefügt), oder mache es rückgängig.",
- "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs spricht nur mit qBittorrent, Transmission, Deluge, SABnzbd und NZBGet",
+ "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs spricht nur mit qBittorrent, Transmission, Deluge, rTorrent, SABnzbd und NZBGet",
"server.migrate.holyarrs-uses-one-category-of-its": "HolyArrs nutzt pro Downloader eine eigene Kategorie (holyarrs)",
"server.migrate.holyarrs-writes-no-metadata-files-for": "HolyArrs schreibt keine Metadaten-Dateien für Mediaplayer",
"server.migrate.import-row-was-replaced": "Import-Zeile wurde ersetzt",
diff --git a/app/frontend/src/lib/core/i18n/messages/de/settings-downloaders.json b/app/frontend/src/lib/core/i18n/messages/de/settings-downloaders.json
index de471d6..e6ed486 100644
--- a/app/frontend/src/lib/core/i18n/messages/de/settings-downloaders.json
+++ b/app/frontend/src/lib/core/i18n/messages/de/settings-downloaders.json
@@ -2,6 +2,7 @@
"settings.downloaders.catSab": "Muss in SABnzbd schon existieren.",
"settings.downloaders.catTransmission": "Wird als Transmission-Label gespeichert; Transmission 4 oder neuer ist nötig.",
"settings.downloaders.catDeluge": "Wird als Deluge-Label gespeichert; der verbundene Daemon braucht das Label-Plugin.",
+ "settings.downloaders.catRtorrent": "Wird als rTorrent-Label gespeichert und in der Label-Spalte von ruTorrent angezeigt.",
"settings.downloaders.catNzbget": "Wird als NZBGet-Kategorie gesendet.",
"settings.downloaders.catQbit": "Wird in qBittorrent angelegt, falls sie fehlt.",
"settings.downloaders.saved": "{name} gespeichert",
@@ -52,6 +53,7 @@
"settings.downloaders.secretDeluge": "Das Passwort der Deluge-Weboberfläche.",
"settings.downloaders.secretKept": "Wird verschlüsselt gespeichert und nie wieder angezeigt. Beim Wechsel der Adresse auf einen anderen Host brauchst du es erneut.",
"settings.downloaders.delugeNote": "Die Deluge-Weboberfläche muss mit einem Daemon verbunden sein, bei dem das Label-Plugin an ist",
+ "settings.downloaders.rtorrentNote": "Nutze die XML-RPC-Adresse: /RPC2 (Port 8000 im crazymax-Image) oder /plugins/httprpc/action.php von ruTorrent. rTorrent kann keine Dateien löschen, daher löscht HolyArrs sie dort, wo es sie erreicht. Für eine Seedbox füge ein Pfadpaar für den Ordner hinzu, den deine Synchronisation füllt.",
"settings.downloaders.moreOptions": "Weitere Optionen",
"settings.downloaders.local": "Lokales Netzwerk erreichen",
"settings.downloaders.localHint": "Bei den meisten Setups an",
@@ -91,6 +93,8 @@
"settings.downloaders.removeFailedHint": "Löscht auch ihre Dateien",
"settings.downloaders.autoAdd": "Gefundene Titel zu deiner Bibliothek hinzufügen",
"settings.downloaders.autoAddHint": "Sichere Treffer, die schon in einem Downloader sind, werden ohne Suche hinzugefügt",
+ "settings.downloaders.sabOutside": "Usenet-Jobs anderer Apps anzeigen",
+ "settings.downloaders.sabOutsideHint": "Jobs aus anderen Kategorien eines geteilten SABnzbd oder NZBGet erscheinen unter Downloads, nur zum Ansehen. HolyArrs ordnet sie nie zu.",
"settings.downloaders.whenRemove": "Wenn du einen Download entfernst",
"settings.downloaders.deleteFiles": "Seine Dateien löschen",
"settings.downloaders.turnDown": "Sein Release verwerfen",
diff --git a/app/frontend/src/lib/core/i18n/messages/de/settings-index.json b/app/frontend/src/lib/core/i18n/messages/de/settings-index.json
index 0c03168..31385da 100644
--- a/app/frontend/src/lib/core/i18n/messages/de/settings-index.json
+++ b/app/frontend/src/lib/core/i18n/messages/de/settings-index.json
@@ -206,7 +206,7 @@
"settings.index.search.search-now.search-now.label": "Jetzt suchen",
"settings.index.search.search-now.search-now.words": "suche bessere kopie feeds ausführen",
"settings.index.downloaders.downloaders-card.downloaders.label": "Downloader",
- "settings.index.downloaders.downloaders-card.downloaders.words": "download client qbittorrent sabnzbd transmission deluge nzbget torrent-client hinzufügen",
+ "settings.index.downloaders.downloaders-card.downloaders.words": "download client qbittorrent sabnzbd transmission deluge rtorrent rutorrent nzbget torrent-client hinzufügen",
"settings.index.downloaders.st-stall.stalled-after.label": "Hängend nach",
"settings.index.downloaders.st-stall.stalled-after.words": "hängend festgefahren stunden download",
"settings.index.downloaders.st-act.give-up-and-try-the-next-release-after.label": "Aufgeben und das nächste Release versuchen nach",
diff --git a/app/frontend/src/lib/core/i18n/messages/en/downloads.json b/app/frontend/src/lib/core/i18n/messages/en/downloads.json
index 67e0b6b..5db9c37 100644
--- a/app/frontend/src/lib/core/i18n/messages/en/downloads.json
+++ b/app/frontend/src/lib/core/i18n/messages/en/downloads.json
@@ -93,12 +93,12 @@
"downloads.clients.slowFailed": "Couldn't change slow mode",
"downloads.clients.someConnected": "{n} of {total} connected",
"downloads.cm.confirmFailed": "Couldn't confirm match",
- "downloads.cm.desc": "Pick the title each torrent holds. It’s added to your Library without a search.",
+ "downloads.cm.desc": "Pick the title each download holds. It’s added to your Library without a search.",
"downloads.cm.done": "Done",
- "downloads.cm.every": "Every torrent is matched.",
+ "downloads.cm.every": "Every download is matched.",
"downloads.cm.match": "Match",
"downloads.cm.matchNow": "Match now",
- "downloads.cm.matching": "Matching torrents",
+ "downloads.cm.matching": "Matching downloads",
"downloads.cm.none": "No title found for this name.",
"downloads.cm.notMedia": "Not media",
"downloads.cm.skip": "Skip",
@@ -702,8 +702,8 @@
"downloads.many.seasonPack": "season pack",
"downloads.many.track": "track",
"downloads.many.tracks": "tracks",
- "downloads.match.many": "{n} torrents need a match",
- "downloads.match.one": "1 torrent needs a match",
+ "downloads.match.many": "{n} downloads need a match",
+ "downloads.match.one": "1 download needs a match",
"downloads.more.allTime": "All time",
"downloads.more.answering": "Answering",
"downloads.more.free": "Free",
@@ -784,6 +784,10 @@
"downloads.page.cantStartOne": "Couldn't start {name}",
"downloads.page.cantUpdateMany": "Couldn't update downloads",
"downloads.page.capped": "Showing the first {max} of {total} torrents HolyArrs did not add.",
+ "downloads.page.partial": "Showing {shown} of {total} torrents HolyArrs did not add.",
+ "downloads.page.partialFiltered": "Showing {shown} of {total} torrents HolyArrs did not add. With a filter on, the counts cover only the loaded ones.",
+ "downloads.page.notLoaded.title": "Not loaded yet",
+ "downloads.page.notLoaded.text": "{count} torrents on this tab are further down the Downloader's list. Load more to see them.",
"downloads.page.couldNotLoad": "Downloads could not be loaded.",
"downloads.page.details": "Details",
"downloads.page.done.pause": "Download paused",
diff --git a/app/frontend/src/lib/core/i18n/messages/en/server-lines.json b/app/frontend/src/lib/core/i18n/messages/en/server-lines.json
index 27610ba..241b05d 100644
--- a/app/frontend/src/lib/core/i18n/messages/en/server-lines.json
+++ b/app/frontend/src/lib/core/i18n/messages/en/server-lines.json
@@ -839,7 +839,7 @@
"server.migrate.holyarrs-reads-trakt-lists-and-watchlists": "HolyArrs reads Trakt lists and watchlists; a watched or collection list stays in Radarr",
"server.migrate.holyarrs-sets-one-proxy-address-per": "HolyArrs sets one proxy address per Source; set it on the Sources that used it",
"server.migrate.holyarrs-stopped-during-this-import-before": "HolyArrs stopped during this import, before it finished. What it made is marked: import again to finish it (nothing is added twice), or undo it.",
- "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs talks to qBittorrent, Transmission, Deluge, SABnzbd and NZBGet only",
+ "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs talks to qBittorrent, Transmission, Deluge, rTorrent, SABnzbd and NZBGet only",
"server.migrate.holyarrs-uses-one-category-of-its": "HolyArrs uses one category of its own per Downloader (holyarrs)",
"server.migrate.holyarrs-writes-no-metadata-files-for": "HolyArrs writes no metadata files for media players",
"server.migrate.import-row-was-replaced": "import row was replaced",
diff --git a/app/frontend/src/lib/core/i18n/messages/en/settings-downloaders.json b/app/frontend/src/lib/core/i18n/messages/en/settings-downloaders.json
index c5ce2c3..667db25 100644
--- a/app/frontend/src/lib/core/i18n/messages/en/settings-downloaders.json
+++ b/app/frontend/src/lib/core/i18n/messages/en/settings-downloaders.json
@@ -2,6 +2,7 @@
"settings.downloaders.catSab": "Must already exist in SABnzbd.",
"settings.downloaders.catTransmission": "Stored as a Transmission label; Transmission 4 or newer is required.",
"settings.downloaders.catDeluge": "Stored as a Deluge label; the connected daemon needs the Label plugin.",
+ "settings.downloaders.catRtorrent": "Stored as the rTorrent label, shown in ruTorrent's Label column.",
"settings.downloaders.catNzbget": "Sent as the NZBGet category.",
"settings.downloaders.catQbit": "Made in qBittorrent if missing.",
"settings.downloaders.saved": "{name} saved",
@@ -52,6 +53,7 @@
"settings.downloaders.secretDeluge": "The Deluge Web UI password.",
"settings.downloaders.secretKept": "Kept encrypted, never shown again. Moving the address to another host needs it again.",
"settings.downloaders.delugeNote": "Deluge Web UI must be connected to a daemon with the Label plugin on",
+ "settings.downloaders.rtorrentNote": "Use the XML-RPC address: /RPC2 (port 8000 in the crazymax image) or ruTorrent's /plugins/httprpc/action.php. rTorrent can't delete files, so HolyArrs deletes them where it can reach them. For a seedbox, add a path pair to the folder your sync fills.",
"settings.downloaders.moreOptions": "More options",
"settings.downloaders.local": "Reach the local network",
"settings.downloaders.localHint": "On for most setups",
@@ -91,6 +93,8 @@
"settings.downloaders.removeFailedHint": "Deletes their files too",
"settings.downloaders.autoAdd": "Add matched titles to your Library",
"settings.downloaders.autoAddHint": "Sure matches already in a Downloader are added without searching",
+ "settings.downloaders.sabOutside": "Show Usenet jobs other apps sent",
+ "settings.downloaders.sabOutsideHint": "Jobs in other categories of a shared SABnzbd or NZBGet show on Downloads, read-only. HolyArrs never matches them.",
"settings.downloaders.whenRemove": "When you remove a download",
"settings.downloaders.deleteFiles": "Delete its files",
"settings.downloaders.turnDown": "Turn down its Release",
diff --git a/app/frontend/src/lib/core/i18n/messages/en/settings-index.json b/app/frontend/src/lib/core/i18n/messages/en/settings-index.json
index 94aa3b7..82bfced 100644
--- a/app/frontend/src/lib/core/i18n/messages/en/settings-index.json
+++ b/app/frontend/src/lib/core/i18n/messages/en/settings-index.json
@@ -206,7 +206,7 @@
"settings.index.search.search-now.search-now.label": "Search now",
"settings.index.search.search-now.search-now.words": "search better copy feeds run",
"settings.index.downloaders.downloaders-card.downloaders.label": "Downloaders",
- "settings.index.downloaders.downloaders-card.downloaders.words": "download client qbittorrent sabnzbd transmission deluge nzbget torrent client add",
+ "settings.index.downloaders.downloaders-card.downloaders.words": "download client qbittorrent sabnzbd transmission deluge rtorrent rutorrent nzbget torrent client add",
"settings.index.downloaders.st-stall.stalled-after.label": "Stalled after",
"settings.index.downloaders.st-stall.stalled-after.words": "stalled stuck hours download",
"settings.index.downloaders.st-act.give-up-and-try-the-next-release-after.label": "Give up and try the next Release after",
diff --git a/app/frontend/src/lib/core/i18n/messages/es/downloads.json b/app/frontend/src/lib/core/i18n/messages/es/downloads.json
index b856676..7952ac1 100644
--- a/app/frontend/src/lib/core/i18n/messages/es/downloads.json
+++ b/app/frontend/src/lib/core/i18n/messages/es/downloads.json
@@ -93,12 +93,12 @@
"downloads.clients.slowFailed": "No se pudo cambiar el modo lento",
"downloads.clients.someConnected": "{n} de {total} conectados",
"downloads.cm.confirmFailed": "No se pudo confirmar la coincidencia",
- "downloads.cm.desc": "Elige el título que contiene cada torrent. Se añade a tu Biblioteca sin buscar.",
+ "downloads.cm.desc": "Elige el título que contiene cada descarga. Se añade a tu Biblioteca sin buscar.",
"downloads.cm.done": "Listo",
- "downloads.cm.every": "Todos los torrents tienen coincidencia.",
+ "downloads.cm.every": "Todas las descargas tienen coincidencia.",
"downloads.cm.match": "Emparejar",
"downloads.cm.matchNow": "Emparejar ahora",
- "downloads.cm.matching": "Emparejando torrents",
+ "downloads.cm.matching": "Emparejando descargas",
"downloads.cm.none": "No se encontró ningún título para este nombre.",
"downloads.cm.notMedia": "No es contenido",
"downloads.cm.skip": "Omitir",
@@ -702,8 +702,8 @@
"downloads.many.seasonPack": "paquete de temporada",
"downloads.many.track": "pista",
"downloads.many.tracks": "pistas",
- "downloads.match.many": "{n} torrents necesitan una coincidencia",
- "downloads.match.one": "1 torrent necesita una coincidencia",
+ "downloads.match.many": "{n} descargas necesitan una coincidencia",
+ "downloads.match.one": "1 descarga necesita una coincidencia",
"downloads.more.allTime": "Todo el tiempo",
"downloads.more.answering": "Responde",
"downloads.more.free": "Libre",
@@ -768,6 +768,10 @@
"downloads.page.cantStartOne": "No se pudo iniciar {name}",
"downloads.page.cantUpdateMany": "No se pudieron actualizar las descargas",
"downloads.page.capped": "Mostrando los primeros {max} de {total} torrents que HolyArrs no añadió.",
+ "downloads.page.partial": "Mostrando {shown} de {total} torrents que HolyArrs no añadió.",
+ "downloads.page.partialFiltered": "Mostrando {shown} de {total} torrents que HolyArrs no añadió. Con un filtro activo, los recuentos solo cubren los cargados.",
+ "downloads.page.notLoaded.title": "Aún no cargados",
+ "downloads.page.notLoaded.text": "{count} torrents de esta pestaña están más abajo en la lista del gestor de descargas. Carga más para verlos.",
"downloads.page.couldNotLoad": "No se pudieron cargar las descargas.",
"downloads.page.details": "Detalles",
"downloads.page.done.pause": "Descarga en pausa",
diff --git a/app/frontend/src/lib/core/i18n/messages/es/server-lines.json b/app/frontend/src/lib/core/i18n/messages/es/server-lines.json
index f0a37f9..c1eff7c 100644
--- a/app/frontend/src/lib/core/i18n/messages/es/server-lines.json
+++ b/app/frontend/src/lib/core/i18n/messages/es/server-lines.json
@@ -839,7 +839,7 @@
"server.migrate.holyarrs-reads-trakt-lists-and-watchlists": "HolyArrs lee listas y listas de seguimiento de Trakt; una lista de vistas o de colección se queda en Radarr",
"server.migrate.holyarrs-sets-one-proxy-address-per": "HolyArrs usa una sola dirección de proxy por Fuente; defínela en las Fuentes que la usaban",
"server.migrate.holyarrs-stopped-during-this-import-before": "HolyArrs se detuvo durante esta importación, antes de terminar. Lo que creó está marcado: importa de nuevo para terminarla (nada se añade dos veces) o deshazla.",
- "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs solo se conecta a qBittorrent, Transmission, Deluge, SABnzbd y NZBGet",
+ "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs solo se conecta a qBittorrent, Transmission, Deluge, rTorrent, SABnzbd y NZBGet",
"server.migrate.holyarrs-uses-one-category-of-its": "HolyArrs usa una categoría propia por gestor de descargas (holyarrs)",
"server.migrate.holyarrs-writes-no-metadata-files-for": "HolyArrs no escribe archivos de metadatos para reproductores multimedia",
"server.migrate.import-row-was-replaced": "se reemplazó la fila de importación",
diff --git a/app/frontend/src/lib/core/i18n/messages/es/settings-downloaders.json b/app/frontend/src/lib/core/i18n/messages/es/settings-downloaders.json
index 260dd26..e9b6e38 100644
--- a/app/frontend/src/lib/core/i18n/messages/es/settings-downloaders.json
+++ b/app/frontend/src/lib/core/i18n/messages/es/settings-downloaders.json
@@ -2,6 +2,7 @@
"settings.downloaders.catSab": "Ya debe existir en SABnzbd.",
"settings.downloaders.catTransmission": "Se guarda como etiqueta de Transmission; se requiere Transmission 4 o posterior.",
"settings.downloaders.catDeluge": "Se guarda como etiqueta de Deluge; el daemon conectado necesita el plugin Label.",
+ "settings.downloaders.catRtorrent": "Se guarda como etiqueta de rTorrent y se ve en la columna Label de ruTorrent.",
"settings.downloaders.catNzbget": "Se envía como la categoría de NZBGet.",
"settings.downloaders.catQbit": "Se crea en qBittorrent si falta.",
"settings.downloaders.saved": "{name} guardado",
@@ -52,6 +53,7 @@
"settings.downloaders.secretDeluge": "La contraseña de la interfaz web de Deluge.",
"settings.downloaders.secretKept": "Se guarda cifrada y no se vuelve a mostrar. Si cambias la dirección a otro host, hay que escribirla de nuevo.",
"settings.downloaders.delugeNote": "La interfaz web de Deluge debe estar conectada a un daemon con el plugin Label activado",
+ "settings.downloaders.rtorrentNote": "Usa la dirección XML-RPC: /RPC2 (puerto 8000 en la imagen crazymax) o /plugins/httprpc/action.php de ruTorrent. rTorrent no puede borrar archivos, así que HolyArrs los borra donde puede alcanzarlos. Para un seedbox, añade un par de rutas a la carpeta que llena tu sincronización.",
"settings.downloaders.moreOptions": "Más opciones",
"settings.downloaders.local": "Acceder a la red local",
"settings.downloaders.localHint": "Activado en la mayoría de configuraciones",
@@ -91,6 +93,8 @@
"settings.downloaders.removeFailedHint": "También elimina sus archivos",
"settings.downloaders.autoAdd": "Añadir a tu Biblioteca los títulos que coinciden",
"settings.downloaders.autoAddHint": "Las coincidencias seguras que ya están en un gestor de descargas se añaden sin buscar",
+ "settings.downloaders.sabOutside": "Mostrar trabajos de Usenet enviados por otras apps",
+ "settings.downloaders.sabOutsideHint": "Los trabajos de otras categorías de un SABnzbd o NZBGet compartido aparecen en Descargas, solo para ver. HolyArrs nunca los empareja.",
"settings.downloaders.whenRemove": "Cuando quitas una descarga",
"settings.downloaders.deleteFiles": "Eliminar sus archivos",
"settings.downloaders.turnDown": "Descartar su lanzamiento",
diff --git a/app/frontend/src/lib/core/i18n/messages/es/settings-index.json b/app/frontend/src/lib/core/i18n/messages/es/settings-index.json
index c1f2f26..2361314 100644
--- a/app/frontend/src/lib/core/i18n/messages/es/settings-index.json
+++ b/app/frontend/src/lib/core/i18n/messages/es/settings-index.json
@@ -206,7 +206,7 @@
"settings.index.search.search-now.search-now.label": "Buscar ahora",
"settings.index.search.search-now.search-now.words": "buscar copia mejor feeds ejecutar",
"settings.index.downloaders.downloaders-card.downloaders.label": "Gestores de descargas",
- "settings.index.downloaders.downloaders-card.downloaders.words": "cliente de descargas qbittorrent sabnzbd transmission deluge nzbget cliente torrent añadir",
+ "settings.index.downloaders.downloaders-card.downloaders.words": "cliente de descargas qbittorrent sabnzbd transmission deluge rtorrent rutorrent nzbget cliente torrent añadir",
"settings.index.downloaders.st-stall.stalled-after.label": "Estancada tras",
"settings.index.downloaders.st-stall.stalled-after.words": "estancada atascada horas descarga",
"settings.index.downloaders.st-act.give-up-and-try-the-next-release-after.label": "Rendirse y probar el siguiente lanzamiento tras",
diff --git a/app/frontend/src/lib/core/i18n/messages/fr/downloads.json b/app/frontend/src/lib/core/i18n/messages/fr/downloads.json
index d4ea3a1..69909f9 100644
--- a/app/frontend/src/lib/core/i18n/messages/fr/downloads.json
+++ b/app/frontend/src/lib/core/i18n/messages/fr/downloads.json
@@ -93,12 +93,12 @@
"downloads.clients.slowFailed": "Impossible de changer le mode lent",
"downloads.clients.someConnected": "{n} connectés sur {total}",
"downloads.cm.confirmFailed": "Impossible de confirmer la correspondance",
- "downloads.cm.desc": "Choisissez le titre que contient chaque torrent. Il est ajouté à votre Bibliothèque sans recherche.",
+ "downloads.cm.desc": "Choisissez le titre que contient chaque téléchargement. Il est ajouté à votre Bibliothèque sans recherche.",
"downloads.cm.done": "Terminé",
- "downloads.cm.every": "Tous les torrents sont associés.",
+ "downloads.cm.every": "Tous les téléchargements sont associés.",
"downloads.cm.match": "Associer",
"downloads.cm.matchNow": "Associer maintenant",
- "downloads.cm.matching": "Association des torrents",
+ "downloads.cm.matching": "Association des téléchargements",
"downloads.cm.none": "Aucun titre trouvé pour ce nom.",
"downloads.cm.notMedia": "Pas un média",
"downloads.cm.skip": "Ignorer",
@@ -702,8 +702,8 @@
"downloads.many.seasonPack": "pack de saison",
"downloads.many.track": "piste",
"downloads.many.tracks": "pistes",
- "downloads.match.many": "{n} torrents demandent une association",
- "downloads.match.one": "1 torrent demande une association",
+ "downloads.match.many": "{n} téléchargements demandent une association",
+ "downloads.match.one": "1 téléchargement demande une association",
"downloads.more.allTime": "Depuis toujours",
"downloads.more.answering": "Répond",
"downloads.more.free": "Libre",
@@ -768,6 +768,10 @@
"downloads.page.cantStartOne": "Impossible de démarrer {name}",
"downloads.page.cantUpdateMany": "Impossible de mettre les téléchargements à jour",
"downloads.page.capped": "Affichage des {max} premiers sur {total} torrents que HolyArrs n'a pas ajoutés.",
+ "downloads.page.partial": "Affichage de {shown} sur {total} torrents que HolyArrs n'a pas ajoutés.",
+ "downloads.page.partialFiltered": "Affichage de {shown} sur {total} torrents que HolyArrs n'a pas ajoutés. Avec un filtre actif, les nombres ne comptent que ceux chargés.",
+ "downloads.page.notLoaded.title": "Pas encore chargés",
+ "downloads.page.notLoaded.text": "{count} torrents de cet onglet sont plus bas dans la liste du gestionnaire de téléchargement. Chargez-en plus pour les voir.",
"downloads.page.couldNotLoad": "Impossible de charger les Téléchargements.",
"downloads.page.details": "Détails",
"downloads.page.done.pause": "Téléchargement mis en pause",
diff --git a/app/frontend/src/lib/core/i18n/messages/fr/server-lines.json b/app/frontend/src/lib/core/i18n/messages/fr/server-lines.json
index d58d15a..a8b8f4b 100644
--- a/app/frontend/src/lib/core/i18n/messages/fr/server-lines.json
+++ b/app/frontend/src/lib/core/i18n/messages/fr/server-lines.json
@@ -839,7 +839,7 @@
"server.migrate.holyarrs-reads-trakt-lists-and-watchlists": "HolyArrs lit les listes Trakt et les listes à voir ; une liste de vus ou de collection reste dans Radarr",
"server.migrate.holyarrs-sets-one-proxy-address-per": "HolyArrs règle une adresse de proxy par source ; réglez-la sur les sources qui l'utilisaient",
"server.migrate.holyarrs-stopped-during-this-import-before": "HolyArrs s'est arrêté pendant cet import, avant la fin. Ce qu'il a créé est marqué : importez de nouveau pour terminer (rien n'est ajouté deux fois), ou annulez.",
- "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs parle seulement à qBittorrent, Transmission, Deluge, SABnzbd et NZBGet",
+ "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs parle seulement à qBittorrent, Transmission, Deluge, rTorrent, SABnzbd et NZBGet",
"server.migrate.holyarrs-uses-one-category-of-its": "HolyArrs utilise une catégorie à lui par client de téléchargement (holyarrs)",
"server.migrate.holyarrs-writes-no-metadata-files-for": "HolyArrs n'écrit pas de fichiers de métadonnées pour les lecteurs multimédias",
"server.migrate.import-row-was-replaced": "la ligne d'import a été remplacée",
diff --git a/app/frontend/src/lib/core/i18n/messages/fr/settings-downloaders.json b/app/frontend/src/lib/core/i18n/messages/fr/settings-downloaders.json
index 25b3168..704397f 100644
--- a/app/frontend/src/lib/core/i18n/messages/fr/settings-downloaders.json
+++ b/app/frontend/src/lib/core/i18n/messages/fr/settings-downloaders.json
@@ -2,6 +2,7 @@
"settings.downloaders.catSab": "Doit déjà exister dans SABnzbd.",
"settings.downloaders.catTransmission": "Stockée comme étiquette Transmission ; Transmission 4 ou plus récent est requis.",
"settings.downloaders.catDeluge": "Stockée comme étiquette Deluge ; le démon connecté a besoin du plugin Label.",
+ "settings.downloaders.catRtorrent": "Stockée comme étiquette rTorrent, visible dans la colonne Label de ruTorrent.",
"settings.downloaders.catNzbget": "Envoyée comme catégorie NZBGet.",
"settings.downloaders.catQbit": "Créée dans qBittorrent si elle manque.",
"settings.downloaders.saved": "{name} enregistré",
@@ -52,6 +53,7 @@
"settings.downloaders.secretDeluge": "Le mot de passe de l'interface web de Deluge.",
"settings.downloaders.secretKept": "Conservé chiffré, jamais affiché de nouveau. Changer l'adresse vers un autre hôte demande de le saisir à nouveau.",
"settings.downloaders.delugeNote": "L'interface web de Deluge doit être connectée à un démon avec le plugin Label activé",
+ "settings.downloaders.rtorrentNote": "Utilisez l'adresse XML-RPC : /RPC2 (port 8000 dans l'image crazymax) ou /plugins/httprpc/action.php de ruTorrent. rTorrent ne peut pas supprimer de fichiers, donc HolyArrs les supprime là où il peut les atteindre. Pour une seedbox, ajoutez une paire de chemins vers le dossier que votre synchronisation remplit.",
"settings.downloaders.moreOptions": "Plus d'options",
"settings.downloaders.local": "Joindre le réseau local",
"settings.downloaders.localHint": "Activé pour la plupart des configurations",
@@ -91,6 +93,8 @@
"settings.downloaders.removeFailedHint": "Supprime aussi leurs fichiers",
"settings.downloaders.autoAdd": "Ajouter les titres reconnus à votre Bibliothèque",
"settings.downloaders.autoAddHint": "Les correspondances sûres déjà dans un client de téléchargement sont ajoutées sans recherche",
+ "settings.downloaders.sabOutside": "Afficher les tâches Usenet envoyées par d'autres apps",
+ "settings.downloaders.sabOutsideHint": "Les tâches des autres catégories d'un SABnzbd ou NZBGet partagé apparaissent dans Téléchargements, en lecture seule. HolyArrs ne les associe jamais.",
"settings.downloaders.whenRemove": "Quand vous retirez un téléchargement",
"settings.downloaders.deleteFiles": "Supprimer ses fichiers",
"settings.downloaders.turnDown": "Écarter sa release",
diff --git a/app/frontend/src/lib/core/i18n/messages/fr/settings-index.json b/app/frontend/src/lib/core/i18n/messages/fr/settings-index.json
index efc0be2..f8e7299 100644
--- a/app/frontend/src/lib/core/i18n/messages/fr/settings-index.json
+++ b/app/frontend/src/lib/core/i18n/messages/fr/settings-index.json
@@ -206,7 +206,7 @@
"settings.index.search.search-now.search-now.label": "Chercher maintenant",
"settings.index.search.search-now.search-now.words": "chercher meilleure copie flux lancer",
"settings.index.downloaders.downloaders-card.downloaders.label": "Clients de téléchargement",
- "settings.index.downloaders.downloaders-card.downloaders.words": "client de téléchargement qbittorrent sabnzbd transmission deluge nzbget client torrent ajouter",
+ "settings.index.downloaders.downloaders-card.downloaders.words": "client de téléchargement qbittorrent sabnzbd transmission deluge rtorrent rutorrent nzbget client torrent ajouter",
"settings.index.downloaders.st-stall.stalled-after.label": "Bloqué après",
"settings.index.downloaders.st-stall.stalled-after.words": "bloqué coincé heures téléchargement",
"settings.index.downloaders.st-act.give-up-and-try-the-next-release-after.label": "Abandonner et essayer la release suivante après",
diff --git a/app/frontend/src/lib/core/i18n/messages/hi/downloads.json b/app/frontend/src/lib/core/i18n/messages/hi/downloads.json
index 86fa692..9178afb 100644
--- a/app/frontend/src/lib/core/i18n/messages/hi/downloads.json
+++ b/app/frontend/src/lib/core/i18n/messages/hi/downloads.json
@@ -93,12 +93,12 @@
"downloads.clients.slowFailed": "धीमा मोड नहीं बदल सका",
"downloads.clients.someConnected": "{total} में से {n} जुड़े हैं",
"downloads.cm.confirmFailed": "मैच पक्का नहीं हो सका",
- "downloads.cm.desc": "हर टोरेंट में जो टाइटल है उसे चुनें। वह बिना खोज के आपकी लाइब्रेरी में जुड़ जाता है।",
+ "downloads.cm.desc": "हर डाउनलोड में जो टाइटल है उसे चुनें। वह बिना खोज के आपकी लाइब्रेरी में जुड़ जाता है।",
"downloads.cm.done": "हो गया",
- "downloads.cm.every": "हर टोरेंट मैच हो गया है।",
+ "downloads.cm.every": "हर डाउनलोड मैच हो गया है।",
"downloads.cm.match": "मैच करें",
"downloads.cm.matchNow": "अभी मैच करें",
- "downloads.cm.matching": "टोरेंट मैच हो रहे हैं",
+ "downloads.cm.matching": "डाउनलोड मैच हो रहे हैं",
"downloads.cm.none": "इस नाम का कोई टाइटल नहीं मिला।",
"downloads.cm.notMedia": "मीडिया नहीं है",
"downloads.cm.skip": "छोड़ें",
@@ -702,8 +702,8 @@
"downloads.many.seasonPack": "सीज़न पैक",
"downloads.many.track": "ट्रैक",
"downloads.many.tracks": "ट्रैक",
- "downloads.match.many": "{n} टोरेंट को मैच चाहिए",
- "downloads.match.one": "1 टोरेंट को मैच चाहिए",
+ "downloads.match.many": "{n} डाउनलोड को मैच चाहिए",
+ "downloads.match.one": "1 डाउनलोड को मैच चाहिए",
"downloads.more.allTime": "अब तक",
"downloads.more.answering": "जवाब दे रहा है",
"downloads.more.free": "खाली",
@@ -768,6 +768,10 @@
"downloads.page.cantStartOne": "{name} शुरू नहीं हो सका",
"downloads.page.cantUpdateMany": "डाउनलोड अपडेट नहीं हो सके",
"downloads.page.capped": "जो {total} टोरेंट HolyArrs ने नहीं जोड़े, उनमें से पहले {max} दिख रहे हैं।",
+ "downloads.page.partial": "जो {total} टोरेंट HolyArrs ने नहीं जोड़े, उनमें से {shown} दिख रहे हैं।",
+ "downloads.page.partialFiltered": "जो {total} टोरेंट HolyArrs ने नहीं जोड़े, उनमें से {shown} दिख रहे हैं। फ़िल्टर चालू होने पर गिनती सिर्फ़ लोड हुए टोरेंट की होती है।",
+ "downloads.page.notLoaded.title": "अभी लोड नहीं हुए",
+ "downloads.page.notLoaded.text": "इस टैब के {count} टोरेंट डाउनलोडर की सूची में और नीचे हैं। उन्हें देखने के लिए और लोड करें।",
"downloads.page.couldNotLoad": "डाउनलोड लोड नहीं हो सके।",
"downloads.page.details": "ब्योरा",
"downloads.page.done.pause": "डाउनलोड रुका",
diff --git a/app/frontend/src/lib/core/i18n/messages/hi/server-lines.json b/app/frontend/src/lib/core/i18n/messages/hi/server-lines.json
index 6a44151..ad3b740 100644
--- a/app/frontend/src/lib/core/i18n/messages/hi/server-lines.json
+++ b/app/frontend/src/lib/core/i18n/messages/hi/server-lines.json
@@ -839,7 +839,7 @@
"server.migrate.holyarrs-reads-trakt-lists-and-watchlists": "HolyArrs Trakt सूचियां और वॉचलिस्ट पढ़ता है; देखी हुई या कलेक्शन सूची Radarr में ही रहती है",
"server.migrate.holyarrs-sets-one-proxy-address-per": "HolyArrs हर सोर्स के लिए एक प्रॉक्सी पता सेट करता है; इसे उन सोर्स पर सेट करें जो इसे इस्तेमाल करते थे",
"server.migrate.holyarrs-stopped-during-this-import-before": "HolyArrs इस इंपोर्ट के बीच में, पूरा होने से पहले रुक गया। जो बना उस पर निशान है: पूरा करने के लिए फिर इंपोर्ट करें (कुछ दो बार नहीं जुड़ेगा), या इसे वापस लें।",
- "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs सिर्फ़ qBittorrent, Transmission, Deluge, SABnzbd और NZBGet से बात करता है",
+ "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs सिर्फ़ qBittorrent, Transmission, Deluge, rTorrent, SABnzbd और NZBGet से बात करता है",
"server.migrate.holyarrs-uses-one-category-of-its": "HolyArrs हर डाउनलोडर में अपनी एक कैटेगरी इस्तेमाल करता है (holyarrs)",
"server.migrate.holyarrs-writes-no-metadata-files-for": "HolyArrs मीडिया प्लेयर के लिए मेटाडेटा फ़ाइलें नहीं लिखता",
"server.migrate.import-row-was-replaced": "इंपोर्ट की पंक्ति बदल दी गई",
diff --git a/app/frontend/src/lib/core/i18n/messages/hi/settings-downloaders.json b/app/frontend/src/lib/core/i18n/messages/hi/settings-downloaders.json
index ff29350..7a1b71b 100644
--- a/app/frontend/src/lib/core/i18n/messages/hi/settings-downloaders.json
+++ b/app/frontend/src/lib/core/i18n/messages/hi/settings-downloaders.json
@@ -2,6 +2,7 @@
"settings.downloaders.catSab": "SABnzbd में पहले से मौजूद होनी चाहिए।",
"settings.downloaders.catTransmission": "Transmission लेबल की तरह सेव होती है; Transmission 4 या नया चाहिए।",
"settings.downloaders.catDeluge": "Deluge लेबल की तरह सेव होती है; जुड़े डेमन में Label प्लगइन चाहिए।",
+ "settings.downloaders.catRtorrent": "rTorrent लेबल की तरह सेव होती है, और ruTorrent के Label कॉलम में दिखती है।",
"settings.downloaders.catNzbget": "NZBGet श्रेणी की तरह भेजी जाती है।",
"settings.downloaders.catQbit": "qBittorrent में न हो तो बना दी जाती है।",
"settings.downloaders.saved": "{name} सेव हुआ",
@@ -52,6 +53,7 @@
"settings.downloaders.secretDeluge": "Deluge Web UI का पासवर्ड।",
"settings.downloaders.secretKept": "एन्क्रिप्टेड रखा जाता है, दोबारा नहीं दिखता। पता दूसरे होस्ट पर ले जाने पर इसे फिर डालना होगा।",
"settings.downloaders.delugeNote": "Deluge Web UI ऐसे डेमन से जुड़ा होना चाहिए जिसमें Label प्लगइन चालू हो",
+ "settings.downloaders.rtorrentNote": "XML-RPC पता इस्तेमाल करें: /RPC2 (crazymax इमेज में पोर्ट 8000) या ruTorrent का /plugins/httprpc/action.php. rTorrent फ़ाइलें नहीं मिटा सकता, इसलिए HolyArrs उन्हें वहाँ मिटाता है जहाँ वह पहुँच सकता है। सीडबॉक्स के लिए, उस फ़ोल्डर की पाथ की जोड़ी जोड़ें जिसे आपका सिंक भरता है।",
"settings.downloaders.moreOptions": "और विकल्प",
"settings.downloaders.local": "लोकल नेटवर्क तक पहुंचें",
"settings.downloaders.localHint": "ज़्यादातर सेटअप में चालू",
@@ -91,6 +93,8 @@
"settings.downloaders.removeFailedHint": "उनकी फ़ाइलें भी मिट जाती हैं",
"settings.downloaders.autoAdd": "मेल खाए टाइटल आपकी लाइब्रेरी में जोड़ें",
"settings.downloaders.autoAddHint": "डाउनलोडर में पहले से मौजूद पक्के मेल बिना खोजे जोड़ दिए जाते हैं",
+ "settings.downloaders.sabOutside": "दूसरे ऐप्स के भेजे Usenet जॉब दिखाएं",
+ "settings.downloaders.sabOutsideHint": "साझा SABnzbd या NZBGet की दूसरी कैटेगरी के जॉब डाउनलोड्स में सिर्फ़ देखने के लिए दिखते हैं। HolyArrs उन्हें कभी मैच नहीं करता।",
"settings.downloaders.whenRemove": "जब आप कोई डाउनलोड हटाते हैं",
"settings.downloaders.deleteFiles": "उसकी फ़ाइलें मिटाएं",
"settings.downloaders.turnDown": "उसकी रिलीज़ ठुकराएं",
diff --git a/app/frontend/src/lib/core/i18n/messages/hi/settings-index.json b/app/frontend/src/lib/core/i18n/messages/hi/settings-index.json
index 87eddc7..0bac475 100644
--- a/app/frontend/src/lib/core/i18n/messages/hi/settings-index.json
+++ b/app/frontend/src/lib/core/i18n/messages/hi/settings-index.json
@@ -206,7 +206,7 @@
"settings.index.search.search-now.search-now.label": "अभी खोजें",
"settings.index.search.search-now.search-now.words": "खोज बेहतर कॉपी फ़ीड चलाएं",
"settings.index.downloaders.downloaders-card.downloaders.label": "डाउनलोडर",
- "settings.index.downloaders.downloaders-card.downloaders.words": "डाउनलोड क्लाइंट qbittorrent sabnzbd transmission deluge nzbget टोरेंट क्लाइंट जोड़ें",
+ "settings.index.downloaders.downloaders-card.downloaders.words": "डाउनलोड क्लाइंट qbittorrent sabnzbd transmission deluge rtorrent rutorrent nzbget टोरेंट क्लाइंट जोड़ें",
"settings.index.downloaders.st-stall.stalled-after.label": "इतने समय बाद अटका माना जाए",
"settings.index.downloaders.st-stall.stalled-after.words": "अटका फंसा घंटे डाउनलोड",
"settings.index.downloaders.st-act.give-up-and-try-the-next-release-after.label": "इतने समय बाद छोड़कर अगली रिलीज़ आज़माएं",
diff --git a/app/frontend/src/lib/core/i18n/messages/it/downloads.json b/app/frontend/src/lib/core/i18n/messages/it/downloads.json
index 00e96e8..4586378 100644
--- a/app/frontend/src/lib/core/i18n/messages/it/downloads.json
+++ b/app/frontend/src/lib/core/i18n/messages/it/downloads.json
@@ -93,12 +93,12 @@
"downloads.clients.slowFailed": "Non sono riuscito a cambiare la modalità lenta",
"downloads.clients.someConnected": "{n} di {total} connessi",
"downloads.cm.confirmFailed": "Non sono riuscito a confermare l'abbinamento",
- "downloads.cm.desc": "Scegli il titolo contenuto in ogni torrent. Viene aggiunto alla tua Libreria senza una ricerca.",
+ "downloads.cm.desc": "Scegli il titolo contenuto in ogni download. Viene aggiunto alla tua Libreria senza una ricerca.",
"downloads.cm.done": "Fatto",
- "downloads.cm.every": "Ogni torrent è abbinato.",
+ "downloads.cm.every": "Ogni download è abbinato.",
"downloads.cm.match": "Abbina",
"downloads.cm.matchNow": "Abbina ora",
- "downloads.cm.matching": "Abbinamento dei torrent",
+ "downloads.cm.matching": "Abbinamento dei download",
"downloads.cm.none": "Nessun titolo trovato per questo nome.",
"downloads.cm.notMedia": "Non è un contenuto multimediale",
"downloads.cm.skip": "Salta",
@@ -702,8 +702,8 @@
"downloads.many.seasonPack": "pacchetto di stagione",
"downloads.many.track": "traccia",
"downloads.many.tracks": "tracce",
- "downloads.match.many": "{n} torrent richiedono un abbinamento",
- "downloads.match.one": "1 torrent richiede un abbinamento",
+ "downloads.match.many": "{n} download richiedono un abbinamento",
+ "downloads.match.one": "1 download richiede un abbinamento",
"downloads.more.allTime": "Da sempre",
"downloads.more.answering": "Risponde",
"downloads.more.free": "Libero",
@@ -784,6 +784,10 @@
"downloads.page.cantStartOne": "Non sono riuscito ad avviare {name}",
"downloads.page.cantUpdateMany": "Non sono riuscito ad aggiornare i download",
"downloads.page.capped": "Mostro i primi {max} di {total} torrent che HolyArrs non ha aggiunto.",
+ "downloads.page.partial": "Mostro {shown} di {total} torrent che HolyArrs non ha aggiunto.",
+ "downloads.page.partialFiltered": "Mostro {shown} di {total} torrent che HolyArrs non ha aggiunto. Con un filtro attivo, i conteggi riguardano solo quelli caricati.",
+ "downloads.page.notLoaded.title": "Non ancora caricati",
+ "downloads.page.notLoaded.text": "{count} torrent di questa scheda sono più in basso nell'elenco del downloader. Carica altri per vederli.",
"downloads.page.couldNotLoad": "Non è stato possibile caricare i Download.",
"downloads.page.details": "Dettagli",
"downloads.page.done.pause": "Download in pausa",
diff --git a/app/frontend/src/lib/core/i18n/messages/it/server-lines.json b/app/frontend/src/lib/core/i18n/messages/it/server-lines.json
index 97fe0cf..19f0ee3 100644
--- a/app/frontend/src/lib/core/i18n/messages/it/server-lines.json
+++ b/app/frontend/src/lib/core/i18n/messages/it/server-lines.json
@@ -839,7 +839,7 @@
"server.migrate.holyarrs-reads-trakt-lists-and-watchlists": "HolyArrs legge liste e watchlist di Trakt; una lista dei visti o della collezione resta in Radarr",
"server.migrate.holyarrs-sets-one-proxy-address-per": "HolyArrs imposta un indirizzo proxy per ogni Fonte; impostalo sulle Fonti che lo usavano",
"server.migrate.holyarrs-stopped-during-this-import-before": "HolyArrs si è fermato durante questa importazione, prima della fine. Quello che ha creato è segnato: importa di nuovo per finire (nulla viene aggiunto due volte), oppure annullala.",
- "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs parla solo con qBittorrent, Transmission, Deluge, SABnzbd e NZBGet",
+ "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs parla solo con qBittorrent, Transmission, Deluge, rTorrent, SABnzbd e NZBGet",
"server.migrate.holyarrs-uses-one-category-of-its": "HolyArrs usa una categoria tutta sua per ogni downloader (holyarrs)",
"server.migrate.holyarrs-writes-no-metadata-files-for": "HolyArrs non scrive file di metadati per i lettori multimediali",
"server.migrate.import-row-was-replaced": "la riga dell'importazione è stata sostituita",
diff --git a/app/frontend/src/lib/core/i18n/messages/it/settings-downloaders.json b/app/frontend/src/lib/core/i18n/messages/it/settings-downloaders.json
index 5b8f7a3..c8c791b 100644
--- a/app/frontend/src/lib/core/i18n/messages/it/settings-downloaders.json
+++ b/app/frontend/src/lib/core/i18n/messages/it/settings-downloaders.json
@@ -2,6 +2,7 @@
"settings.downloaders.catSab": "Deve già esistere in SABnzbd.",
"settings.downloaders.catTransmission": "Salvata come etichetta di Transmission; serve Transmission 4 o successivo.",
"settings.downloaders.catDeluge": "Salvata come etichetta di Deluge; il daemon collegato richiede il plugin Label.",
+ "settings.downloaders.catRtorrent": "Salvata come etichetta di rTorrent, visibile nella colonna Label di ruTorrent.",
"settings.downloaders.catNzbget": "Inviata come categoria di NZBGet.",
"settings.downloaders.catQbit": "Creata in qBittorrent se manca.",
"settings.downloaders.saved": "{name} salvato",
@@ -52,6 +53,7 @@
"settings.downloaders.secretDeluge": "La password della Web UI di Deluge.",
"settings.downloaders.secretKept": "Tenuta cifrata e non più mostrata. Spostare l'indirizzo su un altro host la richiede di nuovo.",
"settings.downloaders.delugeNote": "La Web UI di Deluge deve essere collegata a un daemon con il plugin Label attivo",
+ "settings.downloaders.rtorrentNote": "Usa l'indirizzo XML-RPC: /RPC2 (porta 8000 nell'immagine crazymax) o /plugins/httprpc/action.php di ruTorrent. rTorrent non può eliminare i file, quindi HolyArrs li elimina dove riesce a raggiungerli. Per una seedbox, aggiungi una coppia di percorsi verso la cartella che la sincronizzazione riempie.",
"settings.downloaders.moreOptions": "Altre opzioni",
"settings.downloaders.local": "Consenti l'accesso alla rete locale",
"settings.downloaders.localHint": "Attivo nella maggior parte dei casi",
@@ -91,6 +93,8 @@
"settings.downloaders.removeFailedHint": "Elimina anche i loro file",
"settings.downloaders.autoAdd": "Aggiungi i titoli abbinati alla tua Libreria",
"settings.downloaders.autoAddHint": "Gli abbinamenti sicuri già in un downloader vengono aggiunti senza cercare",
+ "settings.downloaders.sabOutside": "Mostra i job Usenet inviati da altre app",
+ "settings.downloaders.sabOutsideHint": "I job di altre categorie di un SABnzbd o NZBGet condiviso compaiono in Download, in sola lettura. HolyArrs non li abbina mai.",
"settings.downloaders.whenRemove": "Quando rimuovi un download",
"settings.downloaders.deleteFiles": "Elimina i suoi file",
"settings.downloaders.turnDown": "Scarta la sua release",
diff --git a/app/frontend/src/lib/core/i18n/messages/it/settings-index.json b/app/frontend/src/lib/core/i18n/messages/it/settings-index.json
index 1ebfec7..594ee2a 100644
--- a/app/frontend/src/lib/core/i18n/messages/it/settings-index.json
+++ b/app/frontend/src/lib/core/i18n/messages/it/settings-index.json
@@ -206,7 +206,7 @@
"settings.index.search.search-now.search-now.label": "Cerca ora",
"settings.index.search.search-now.search-now.words": "cerca copia migliore feed esegui search",
"settings.index.downloaders.downloaders-card.downloaders.label": "Downloader",
- "settings.index.downloaders.downloaders-card.downloaders.words": "client di download qbittorrent sabnzbd transmission deluge nzbget client torrent aggiungi downloaders",
+ "settings.index.downloaders.downloaders-card.downloaders.words": "client di download qbittorrent sabnzbd transmission deluge rtorrent rutorrent nzbget client torrent aggiungi downloaders",
"settings.index.downloaders.st-stall.stalled-after.label": "Bloccato dopo",
"settings.index.downloaders.st-stall.stalled-after.words": "bloccato fermo ore download stalled",
"settings.index.downloaders.st-act.give-up-and-try-the-next-release-after.label": "Rinuncia e prova la release successiva dopo",
diff --git a/app/frontend/src/lib/core/i18n/messages/ja/downloads.json b/app/frontend/src/lib/core/i18n/messages/ja/downloads.json
index 3530593..5e9e867 100644
--- a/app/frontend/src/lib/core/i18n/messages/ja/downloads.json
+++ b/app/frontend/src/lib/core/i18n/messages/ja/downloads.json
@@ -93,12 +93,12 @@
"downloads.clients.slowFailed": "低速モードを変更できませんでした",
"downloads.clients.someConnected": "{total} 件中 {n} 件が接続済み",
"downloads.cm.confirmFailed": "一致を確認できませんでした",
- "downloads.cm.desc": "各トレントに入っている作品を選んでください。検索せずにライブラリに追加されます。",
+ "downloads.cm.desc": "各ダウンロードに入っている作品を選んでください。検索せずにライブラリに追加されます。",
"downloads.cm.done": "完了",
- "downloads.cm.every": "すべてのトレントが一致しました。",
+ "downloads.cm.every": "すべてのダウンロードが一致しました。",
"downloads.cm.match": "一致させる",
"downloads.cm.matchNow": "今すぐ一致させる",
- "downloads.cm.matching": "トレントを照合中",
+ "downloads.cm.matching": "ダウンロードを照合中",
"downloads.cm.none": "この名前の作品は見つかりませんでした。",
"downloads.cm.notMedia": "メディアではない",
"downloads.cm.skip": "スキップ",
@@ -702,8 +702,8 @@
"downloads.many.seasonPack": "シーズンパック",
"downloads.many.track": "曲",
"downloads.many.tracks": "曲",
- "downloads.match.many": "{n} 件のトレントで一致の確認が必要です",
- "downloads.match.one": "1 件のトレントで一致の確認が必要です",
+ "downloads.match.many": "{n} 件のダウンロードで一致の確認が必要です",
+ "downloads.match.one": "1 件のダウンロードで一致の確認が必要です",
"downloads.more.allTime": "全期間",
"downloads.more.answering": "応答あり",
"downloads.more.free": "空き",
@@ -768,6 +768,10 @@
"downloads.page.cantStartOne": "{name} を開始できませんでした",
"downloads.page.cantUpdateMany": "ダウンロードを更新できませんでした",
"downloads.page.capped": "HolyArrs が追加していないトレント {total} 件のうち、最初の {max} 件を表示しています。",
+ "downloads.page.partial": "HolyArrs が追加していないトレント {total} 件のうち {shown} 件を表示しています。",
+ "downloads.page.partialFiltered": "HolyArrs が追加していないトレント {total} 件のうち {shown} 件を表示しています。フィルターがオンのときは、読み込んだ分だけを数えます。",
+ "downloads.page.notLoaded.title": "まだ読み込んでいません",
+ "downloads.page.notLoaded.text": "このタブのトレント {count} 件は、ダウンローダーの一覧のさらに下にあります。もっと読み込むと表示されます。",
"downloads.page.couldNotLoad": "ダウンロードを読み込めませんでした。",
"downloads.page.details": "詳細",
"downloads.page.done.pause": "ダウンロードを一時停止しました",
diff --git a/app/frontend/src/lib/core/i18n/messages/ja/server-lines.json b/app/frontend/src/lib/core/i18n/messages/ja/server-lines.json
index cff6a1e..0eca971 100644
--- a/app/frontend/src/lib/core/i18n/messages/ja/server-lines.json
+++ b/app/frontend/src/lib/core/i18n/messages/ja/server-lines.json
@@ -839,7 +839,7 @@
"server.migrate.holyarrs-reads-trakt-lists-and-watchlists": "HolyArrs は Trakt のリストとウォッチリストを読み取ります。視聴済みやコレクションのリストは Radarr に残ります",
"server.migrate.holyarrs-sets-one-proxy-address-per": "HolyArrs ではプロキシのアドレスはソースごとに 1 つです。これを使っていたソースに設定してください",
"server.migrate.holyarrs-stopped-during-this-import-before": "このインポートの途中、完了前に HolyArrs が停止しました。作成済みのものには印が付いています。もう一度インポートして完了させる (二重には追加されません) か、取り消してください。",
- "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs が接続するのは qBittorrent、Transmission、Deluge、SABnzbd、NZBGet だけです",
+ "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs が接続するのは qBittorrent、Transmission、Deluge、rTorrent、SABnzbd、NZBGet だけです",
"server.migrate.holyarrs-uses-one-category-of-its": "HolyArrs はダウンローダーごとに専用のカテゴリを 1 つ使います (holyarrs)",
"server.migrate.holyarrs-writes-no-metadata-files-for": "HolyArrs はメディアプレーヤー用のメタデータファイルを書き出しません",
"server.migrate.import-row-was-replaced": "インポートの行が置き換えられました",
diff --git a/app/frontend/src/lib/core/i18n/messages/ja/settings-downloaders.json b/app/frontend/src/lib/core/i18n/messages/ja/settings-downloaders.json
index 1725b66..db8a8a3 100644
--- a/app/frontend/src/lib/core/i18n/messages/ja/settings-downloaders.json
+++ b/app/frontend/src/lib/core/i18n/messages/ja/settings-downloaders.json
@@ -2,6 +2,7 @@
"settings.downloaders.catSab": "SABnzbd にすでに存在している必要があります。",
"settings.downloaders.catTransmission": "Transmission のラベルとして保存します。Transmission 4 以降が必要です。",
"settings.downloaders.catDeluge": "Deluge のラベルとして保存します。接続先のデーモンに Label プラグインが必要です。",
+"settings.downloaders.catRtorrent": "rTorrent のラベルとして保存し、ruTorrent の Label 列に表示されます。",
"settings.downloaders.catNzbget": "NZBGet のカテゴリーとして送信します。",
"settings.downloaders.catQbit": "qBittorrent にない場合は作成されます。",
"settings.downloaders.saved": "{name} を保存しました",
@@ -52,6 +53,7 @@
"settings.downloaders.secretDeluge": "Deluge の Web UI のパスワードです。",
"settings.downloaders.secretKept": "暗号化して保存し、二度と表示しません。アドレスを別のホストに変えたときは、もう一度入力が必要です。",
"settings.downloaders.delugeNote": "Deluge の Web UI は、Label プラグインが有効なデーモンに接続されている必要があります",
+"settings.downloaders.rtorrentNote": "XML-RPC のアドレスを使います。/RPC2 (crazymax イメージではポート 8000) か、ruTorrent の /plugins/httprpc/action.php です。rTorrent はファイルを削除できないため、HolyArrs が届く場所でファイルを削除します。シードボックスでは、同期先のフォルダーにパスの組を追加してください。",
"settings.downloaders.moreOptions": "その他のオプション",
"settings.downloaders.local": "ローカルネットワークに接続",
"settings.downloaders.localHint": "ほとんどの環境でオン",
@@ -91,6 +93,8 @@
"settings.downloaders.removeFailedHint": "ファイルも削除します",
"settings.downloaders.autoAdd": "一致した作品をライブラリに追加",
"settings.downloaders.autoAddHint": "ダウンローダーにすでにある確実な一致は、検索せずに追加します",
+"settings.downloaders.sabOutside": "他のアプリが送った Usenet ジョブを表示",
+"settings.downloaders.sabOutsideHint": "共有の SABnzbd や NZBGet にある他のカテゴリのジョブを、ダウンロードに閲覧専用で表示します。HolyArrs が照合することはありません。",
"settings.downloaders.whenRemove": "ダウンロードを削除したとき",
"settings.downloaders.deleteFiles": "ファイルを削除",
"settings.downloaders.turnDown": "そのリリースを不採用にする",
diff --git a/app/frontend/src/lib/core/i18n/messages/ja/settings-index.json b/app/frontend/src/lib/core/i18n/messages/ja/settings-index.json
index 39c4ed8..6c4a4a8 100644
--- a/app/frontend/src/lib/core/i18n/messages/ja/settings-index.json
+++ b/app/frontend/src/lib/core/i18n/messages/ja/settings-index.json
@@ -206,7 +206,7 @@
"settings.index.search.search-now.search-now.label": "今すぐ検索",
"settings.index.search.search-now.search-now.words": "検索 より良いコピー フィード 実行 search better copy feeds run",
"settings.index.downloaders.downloaders-card.downloaders.label": "ダウンローダー",
- "settings.index.downloaders.downloaders-card.downloaders.words": "ダウンロードクライアント qbittorrent sabnzbd transmission deluge nzbget トレント 追加 download client qbittorrent sabnzbd transmission deluge nzbget torrent client add",
+ "settings.index.downloaders.downloaders-card.downloaders.words": "ダウンロードクライアント qbittorrent sabnzbd transmission deluge rtorrent rutorrent nzbget トレント 追加 download client qbittorrent sabnzbd transmission deluge rtorrent rutorrent nzbget torrent client add",
"settings.index.downloaders.st-stall.stalled-after.label": "停止とみなす時間",
"settings.index.downloaders.st-stall.stalled-after.words": "停止 止まった 時間 ダウンロード stalled stuck hours download",
"settings.index.downloaders.st-act.give-up-and-try-the-next-release-after.label": "あきらめて次のリリースを試すまでの時間",
diff --git a/app/frontend/src/lib/core/i18n/messages/ko/downloads.json b/app/frontend/src/lib/core/i18n/messages/ko/downloads.json
index 1510171..13ef36d 100644
--- a/app/frontend/src/lib/core/i18n/messages/ko/downloads.json
+++ b/app/frontend/src/lib/core/i18n/messages/ko/downloads.json
@@ -93,12 +93,12 @@
"downloads.clients.slowFailed": "저속 모드를 변경하지 못했습니다",
"downloads.clients.someConnected": "{total}개 중 {n}개 연결됨",
"downloads.cm.confirmFailed": "일치를 확인하지 못했습니다",
- "downloads.cm.desc": "각 토렌트에 든 작품을 고르세요. 검색 없이 라이브러리에 추가됩니다.",
+ "downloads.cm.desc": "각 다운로드에 든 작품을 고르세요. 검색 없이 라이브러리에 추가됩니다.",
"downloads.cm.done": "완료",
- "downloads.cm.every": "모든 토렌트가 일치했습니다.",
+ "downloads.cm.every": "모든 다운로드가 일치했습니다.",
"downloads.cm.match": "일치",
"downloads.cm.matchNow": "지금 일치",
- "downloads.cm.matching": "토렌트 일치 중",
+ "downloads.cm.matching": "다운로드 일치 중",
"downloads.cm.none": "이 이름에 해당하는 작품을 찾지 못했습니다.",
"downloads.cm.notMedia": "미디어 아님",
"downloads.cm.skip": "건너뛰기",
@@ -702,8 +702,8 @@
"downloads.many.seasonPack": "시즌 팩",
"downloads.many.track": "트랙",
"downloads.many.tracks": "트랙",
- "downloads.match.many": "토렌트 {n}개의 일치가 필요합니다",
- "downloads.match.one": "토렌트 1개의 일치가 필요합니다",
+ "downloads.match.many": "다운로드 {n}개의 일치가 필요합니다",
+ "downloads.match.one": "다운로드 1개의 일치가 필요합니다",
"downloads.more.allTime": "전체 기간",
"downloads.more.answering": "응답 중",
"downloads.more.free": "여유",
@@ -768,6 +768,10 @@
"downloads.page.cantStartOne": "{name}을(를) 시작하지 못했습니다",
"downloads.page.cantUpdateMany": "다운로드를 업데이트하지 못했습니다",
"downloads.page.capped": "HolyArrs가 추가하지 않은 토렌트 {total}개 중 처음 {max}개를 표시합니다.",
+ "downloads.page.partial": "HolyArrs가 추가하지 않은 토렌트 {total}개 중 {shown}개를 표시합니다.",
+ "downloads.page.partialFiltered": "HolyArrs가 추가하지 않은 토렌트 {total}개 중 {shown}개를 표시합니다. 필터가 켜져 있으면 불러온 항목만 셉니다.",
+ "downloads.page.notLoaded.title": "아직 불러오지 않음",
+ "downloads.page.notLoaded.text": "이 탭의 토렌트 {count}개는 다운로더 목록의 더 아래에 있습니다. 더 불러와서 확인하세요.",
"downloads.page.couldNotLoad": "다운로드를 불러오지 못했습니다.",
"downloads.page.details": "상세",
"downloads.page.done.pause": "다운로드 일시 중지됨",
diff --git a/app/frontend/src/lib/core/i18n/messages/ko/server-lines.json b/app/frontend/src/lib/core/i18n/messages/ko/server-lines.json
index ac4afc8..243604c 100644
--- a/app/frontend/src/lib/core/i18n/messages/ko/server-lines.json
+++ b/app/frontend/src/lib/core/i18n/messages/ko/server-lines.json
@@ -839,7 +839,7 @@
"server.migrate.holyarrs-reads-trakt-lists-and-watchlists": "HolyArrs는 Trakt 목록과 관심 목록을 읽습니다. 시청 기록이나 컬렉션 목록은 Radarr에 남습니다",
"server.migrate.holyarrs-sets-one-proxy-address-per": "HolyArrs는 소스마다 프록시 주소를 하나 설정합니다. 사용하던 소스에 설정하세요",
"server.migrate.holyarrs-stopped-during-this-import-before": "HolyArrs가 이번 가져오기 도중 끝나기 전에 멈췄습니다. 만들어진 항목에는 표시가 있습니다. 다시 가져와서 마무리하거나(중복 추가는 없음) 되돌리세요.",
- "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs는 qBittorrent, Transmission, Deluge, SABnzbd, NZBGet하고만 연동합니다",
+ "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs는 qBittorrent, Transmission, Deluge, rTorrent, SABnzbd, NZBGet하고만 연동합니다",
"server.migrate.holyarrs-uses-one-category-of-its": "HolyArrs는 다운로더마다 자체 카테고리 하나(holyarrs)를 사용합니다",
"server.migrate.holyarrs-writes-no-metadata-files-for": "HolyArrs는 미디어 플레이어용 메타데이터 파일을 쓰지 않습니다",
"server.migrate.import-row-was-replaced": "가져오기 항목이 교체됨",
diff --git a/app/frontend/src/lib/core/i18n/messages/ko/settings-downloaders.json b/app/frontend/src/lib/core/i18n/messages/ko/settings-downloaders.json
index df7b954..05409b3 100644
--- a/app/frontend/src/lib/core/i18n/messages/ko/settings-downloaders.json
+++ b/app/frontend/src/lib/core/i18n/messages/ko/settings-downloaders.json
@@ -2,6 +2,7 @@
"settings.downloaders.catSab": "SABnzbd에 이미 있어야 합니다.",
"settings.downloaders.catTransmission": "Transmission 레이블로 저장됩니다. Transmission 4 이상이 필요합니다.",
"settings.downloaders.catDeluge": "Deluge 레이블로 저장됩니다. 연결된 데몬에 Label 플러그인이 필요합니다.",
+ "settings.downloaders.catRtorrent": "rTorrent 레이블로 저장되며 ruTorrent의 Label 열에 표시됩니다.",
"settings.downloaders.catNzbget": "NZBGet 카테고리로 전송됩니다.",
"settings.downloaders.catQbit": "qBittorrent에 없으면 새로 만듭니다.",
"settings.downloaders.saved": "{name} 저장됨",
@@ -52,6 +53,7 @@
"settings.downloaders.secretDeluge": "Deluge 웹 UI 비밀번호입니다.",
"settings.downloaders.secretKept": "암호화해 보관하며 다시 표시하지 않습니다. 주소를 다른 호스트로 옮기면 다시 입력해야 합니다.",
"settings.downloaders.delugeNote": "Deluge 웹 UI는 Label 플러그인이 켜진 데몬에 연결되어 있어야 합니다",
+ "settings.downloaders.rtorrentNote": "XML-RPC 주소를 쓰세요: /RPC2 (crazymax 이미지에서는 포트 8000) 또는 ruTorrent의 /plugins/httprpc/action.php. rTorrent는 파일을 지울 수 없어서 HolyArrs가 닿을 수 있는 곳에서 직접 지웁니다. 시드박스라면 동기화로 채워지는 폴더에 경로 쌍을 추가하세요.",
"settings.downloaders.moreOptions": "추가 옵션",
"settings.downloaders.local": "로컬 네트워크 접근",
"settings.downloaders.localHint": "대부분 켜 두세요",
@@ -91,6 +93,8 @@
"settings.downloaders.removeFailedHint": "파일도 함께 삭제합니다",
"settings.downloaders.autoAdd": "일치한 작품을 라이브러리에 추가",
"settings.downloaders.autoAddHint": "다운로더에 이미 있는 확실한 일치 항목은 검색 없이 추가합니다",
+ "settings.downloaders.sabOutside": "다른 앱이 보낸 Usenet 작업 표시",
+ "settings.downloaders.sabOutsideHint": "공유 SABnzbd나 NZBGet의 다른 카테고리 작업을 다운로드에 읽기 전용으로 표시합니다. HolyArrs는 이 작업을 일치시키지 않습니다.",
"settings.downloaders.whenRemove": "다운로드를 제거할 때",
"settings.downloaders.deleteFiles": "파일 삭제",
"settings.downloaders.turnDown": "해당 릴리스 거부",
diff --git a/app/frontend/src/lib/core/i18n/messages/ko/settings-index.json b/app/frontend/src/lib/core/i18n/messages/ko/settings-index.json
index 44b3085..be431c8 100644
--- a/app/frontend/src/lib/core/i18n/messages/ko/settings-index.json
+++ b/app/frontend/src/lib/core/i18n/messages/ko/settings-index.json
@@ -206,7 +206,7 @@
"settings.index.search.search-now.search-now.label": "지금 검색",
"settings.index.search.search-now.search-now.words": "검색 더 좋은 사본 피드 실행 search better copy feeds run",
"settings.index.downloaders.downloaders-card.downloaders.label": "다운로더",
- "settings.index.downloaders.downloaders-card.downloaders.words": "다운로드 클라이언트 qbittorrent sabnzbd transmission deluge nzbget 토렌트 클라이언트 추가 download client qbittorrent sabnzbd transmission deluge nzbget torrent client add",
+ "settings.index.downloaders.downloaders-card.downloaders.words": "다운로드 클라이언트 qbittorrent sabnzbd transmission deluge rtorrent rutorrent nzbget 토렌트 클라이언트 추가 download client qbittorrent sabnzbd transmission deluge rtorrent rutorrent nzbget torrent client add",
"settings.index.downloaders.st-stall.stalled-after.label": "정체로 판단하는 시간",
"settings.index.downloaders.st-stall.stalled-after.words": "정체 멈춤 시간 다운로드 stalled stuck hours download",
"settings.index.downloaders.st-act.give-up-and-try-the-next-release-after.label": "포기하고 다음 릴리스를 시도하는 시간",
diff --git a/app/frontend/src/lib/core/i18n/messages/nl/downloads.json b/app/frontend/src/lib/core/i18n/messages/nl/downloads.json
index 667cb3c..02f1de6 100644
--- a/app/frontend/src/lib/core/i18n/messages/nl/downloads.json
+++ b/app/frontend/src/lib/core/i18n/messages/nl/downloads.json
@@ -93,12 +93,12 @@
"downloads.clients.slowFailed": "Trage modus wijzigen mislukt",
"downloads.clients.someConnected": "{n} van {total} verbonden",
"downloads.cm.confirmFailed": "Overeenkomst bevestigen mislukt",
- "downloads.cm.desc": "Kies de titel die elke torrent bevat. Hij wordt zonder zoekopdracht aan je Bibliotheek toegevoegd.",
+ "downloads.cm.desc": "Kies de titel die elke download bevat. Hij wordt zonder zoekopdracht aan je Bibliotheek toegevoegd.",
"downloads.cm.done": "Klaar",
- "downloads.cm.every": "Elke torrent is gekoppeld.",
+ "downloads.cm.every": "Elke download is gekoppeld.",
"downloads.cm.match": "Koppelen",
"downloads.cm.matchNow": "Nu koppelen",
- "downloads.cm.matching": "Torrents koppelen",
+ "downloads.cm.matching": "Downloads koppelen",
"downloads.cm.none": "Geen titel gevonden voor deze naam.",
"downloads.cm.notMedia": "Geen media",
"downloads.cm.skip": "Overslaan",
@@ -702,8 +702,8 @@
"downloads.many.seasonPack": "seizoenspakket",
"downloads.many.track": "nummer",
"downloads.many.tracks": "nummers",
- "downloads.match.many": "{n} torrents moeten worden gekoppeld",
- "downloads.match.one": "1 torrent moet worden gekoppeld",
+ "downloads.match.many": "{n} downloads moeten worden gekoppeld",
+ "downloads.match.one": "1 download moet worden gekoppeld",
"downloads.more.allTime": "Altijd",
"downloads.more.answering": "Antwoordt",
"downloads.more.free": "Vrij",
@@ -784,6 +784,10 @@
"downloads.page.cantStartOne": "Kon {name} niet starten",
"downloads.page.cantUpdateMany": "Downloads bijwerken mislukt",
"downloads.page.capped": "De eerste {max} van {total} torrents die HolyArrs niet heeft toegevoegd worden getoond.",
+ "downloads.page.partial": "{shown} van {total} torrents die HolyArrs niet heeft toegevoegd worden getoond.",
+ "downloads.page.partialFiltered": "{shown} van {total} torrents die HolyArrs niet heeft toegevoegd worden getoond. Met een filter aan tellen de aantallen alleen de geladen torrents.",
+ "downloads.page.notLoaded.title": "Nog niet geladen",
+ "downloads.page.notLoaded.text": "{count} torrents op dit tabblad staan verder in de lijst van de downloader. Laad er meer om ze te zien.",
"downloads.page.couldNotLoad": "Downloads konden niet worden geladen.",
"downloads.page.details": "Details",
"downloads.page.done.pause": "Download gepauzeerd",
diff --git a/app/frontend/src/lib/core/i18n/messages/nl/server-lines.json b/app/frontend/src/lib/core/i18n/messages/nl/server-lines.json
index ff032e5..6b93d7b 100644
--- a/app/frontend/src/lib/core/i18n/messages/nl/server-lines.json
+++ b/app/frontend/src/lib/core/i18n/messages/nl/server-lines.json
@@ -839,7 +839,7 @@
"server.migrate.holyarrs-reads-trakt-lists-and-watchlists": "HolyArrs leest Trakt-lijsten en kijklijsten; een lijst met bekeken titels of een collectielijst blijft in Radarr",
"server.migrate.holyarrs-sets-one-proxy-address-per": "HolyArrs stelt één proxyadres per Bron in; stel het in op de Bronnen die het gebruikten",
"server.migrate.holyarrs-stopped-during-this-import-before": "HolyArrs is tijdens deze import gestopt, voordat die klaar was. Wat het heeft gemaakt is gemarkeerd: importeer opnieuw om af te maken (niets wordt dubbel toegevoegd), of maak de import ongedaan.",
- "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs praat alleen met qBittorrent, Transmission, Deluge, SABnzbd en NZBGet",
+ "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs praat alleen met qBittorrent, Transmission, Deluge, rTorrent, SABnzbd en NZBGet",
"server.migrate.holyarrs-uses-one-category-of-its": "HolyArrs gebruikt één eigen categorie per Downloader (holyarrs)",
"server.migrate.holyarrs-writes-no-metadata-files-for": "HolyArrs schrijft geen metadatabestanden voor mediaspelers",
"server.migrate.import-row-was-replaced": "importrij is vervangen",
diff --git a/app/frontend/src/lib/core/i18n/messages/nl/settings-downloaders.json b/app/frontend/src/lib/core/i18n/messages/nl/settings-downloaders.json
index 9de8262..117d971 100644
--- a/app/frontend/src/lib/core/i18n/messages/nl/settings-downloaders.json
+++ b/app/frontend/src/lib/core/i18n/messages/nl/settings-downloaders.json
@@ -2,6 +2,7 @@
"settings.downloaders.catSab": "Moet al bestaan in SABnzbd.",
"settings.downloaders.catTransmission": "Opgeslagen als label van Transmission; Transmission 4 of nieuwer is vereist.",
"settings.downloaders.catDeluge": "Opgeslagen als label van Deluge; de verbonden daemon heeft de Label-plug-in nodig.",
+ "settings.downloaders.catRtorrent": "Opgeslagen als label van rTorrent, zichtbaar in de Label-kolom van ruTorrent.",
"settings.downloaders.catNzbget": "Verstuurd als categorie van NZBGet.",
"settings.downloaders.catQbit": "Wordt in qBittorrent aangemaakt als die ontbreekt.",
"settings.downloaders.saved": "{name} opgeslagen",
@@ -52,6 +53,7 @@
"settings.downloaders.secretDeluge": "Het wachtwoord van de Deluge Web UI.",
"settings.downloaders.secretKept": "Versleuteld bewaard, nooit meer getoond. Als je het adres naar een andere host verhuist, is het weer nodig.",
"settings.downloaders.delugeNote": "De Deluge Web UI moet verbonden zijn met een daemon waarop de Label-plug-in aanstaat",
+ "settings.downloaders.rtorrentNote": "Gebruik het XML-RPC-adres: /RPC2 (poort 8000 in het crazymax-image) of /plugins/httprpc/action.php van ruTorrent. rTorrent kan geen bestanden wissen, dus HolyArrs wist ze waar het erbij kan. Voeg voor een seedbox een paar paden toe naar de map die je synchronisatie vult.",
"settings.downloaders.moreOptions": "Meer opties",
"settings.downloaders.local": "Het lokale netwerk bereiken",
"settings.downloaders.localHint": "Aan voor de meeste opstellingen",
@@ -91,6 +93,8 @@
"settings.downloaders.removeFailedHint": "Verwijdert ook hun bestanden",
"settings.downloaders.autoAdd": "Passende titels aan je Bibliotheek toevoegen",
"settings.downloaders.autoAddHint": "Zekere overeenkomsten die al in een Downloader staan, worden toegevoegd zonder te zoeken",
+ "settings.downloaders.sabOutside": "Usenet-taken van andere apps tonen",
+ "settings.downloaders.sabOutsideHint": "Taken in andere categorieën van een gedeelde SABnzbd of NZBGet staan bij Downloads, alleen-lezen. HolyArrs koppelt ze nooit.",
"settings.downloaders.whenRemove": "Als je een download verwijdert",
"settings.downloaders.deleteFiles": "De bestanden verwijderen",
"settings.downloaders.turnDown": "De release afkeuren",
diff --git a/app/frontend/src/lib/core/i18n/messages/nl/settings-index.json b/app/frontend/src/lib/core/i18n/messages/nl/settings-index.json
index 0399bfd..1ef4451 100644
--- a/app/frontend/src/lib/core/i18n/messages/nl/settings-index.json
+++ b/app/frontend/src/lib/core/i18n/messages/nl/settings-index.json
@@ -206,7 +206,7 @@
"settings.index.search.search-now.search-now.label": "Nu zoeken",
"settings.index.search.search-now.search-now.words": "zoeken betere kopie feeds uitvoeren",
"settings.index.downloaders.downloaders-card.downloaders.label": "Downloaders",
- "settings.index.downloaders.downloaders-card.downloaders.words": "downloadclient qbittorrent sabnzbd transmission deluge nzbget torrentclient toevoegen",
+ "settings.index.downloaders.downloaders-card.downloaders.words": "downloadclient qbittorrent sabnzbd transmission deluge rtorrent rutorrent nzbget torrentclient toevoegen",
"settings.index.downloaders.st-stall.stalled-after.label": "Vastgelopen na",
"settings.index.downloaders.st-stall.stalled-after.words": "vastgelopen vast uren download stalled",
"settings.index.downloaders.st-act.give-up-and-try-the-next-release-after.label": "Opgeven en de volgende release proberen na",
diff --git a/app/frontend/src/lib/core/i18n/messages/pl/downloads.json b/app/frontend/src/lib/core/i18n/messages/pl/downloads.json
index 5c6ca94..d49b358 100644
--- a/app/frontend/src/lib/core/i18n/messages/pl/downloads.json
+++ b/app/frontend/src/lib/core/i18n/messages/pl/downloads.json
@@ -93,12 +93,12 @@
"downloads.clients.slowFailed": "Nie udało się zmienić trybu spowolnienia",
"downloads.clients.someConnected": "Połączono: {n} z {total}",
"downloads.cm.confirmFailed": "Nie udało się potwierdzić dopasowania",
- "downloads.cm.desc": "Wybierz tytuł, który zawiera każdy torrent. Zostanie dodany do twojej Biblioteki bez wyszukiwania.",
+ "downloads.cm.desc": "Wybierz tytuł, który zawiera każde pobieranie. Zostanie dodany do twojej Biblioteki bez wyszukiwania.",
"downloads.cm.done": "Gotowe",
- "downloads.cm.every": "Każdy torrent jest dopasowany.",
+ "downloads.cm.every": "Każde pobieranie jest dopasowane.",
"downloads.cm.match": "Dopasuj",
"downloads.cm.matchNow": "Dopasuj teraz",
- "downloads.cm.matching": "Dopasowywanie torrentów",
+ "downloads.cm.matching": "Dopasowywanie pobrań",
"downloads.cm.none": "Nie znaleziono tytułu dla tej nazwy.",
"downloads.cm.notMedia": "To nie multimedia",
"downloads.cm.skip": "Pomiń",
@@ -702,8 +702,8 @@
"downloads.many.seasonPack": "paczka sezonu",
"downloads.many.track": "utwór",
"downloads.many.tracks": "utwory",
- "downloads.match.many": "Torrenty wymagające dopasowania: {n}",
- "downloads.match.one": "1 torrent wymaga dopasowania",
+ "downloads.match.many": "Pobrania wymagające dopasowania: {n}",
+ "downloads.match.one": "1 pobranie wymaga dopasowania",
"downloads.more.allTime": "Cały czas",
"downloads.more.answering": "Odpowiada",
"downloads.more.free": "Wolne",
@@ -784,6 +784,10 @@
"downloads.page.cantStartOne": "Nie udało się uruchomić: {name}",
"downloads.page.cantUpdateMany": "Nie udało się zaktualizować pobrań",
"downloads.page.capped": "Pokazano pierwsze torrenty: {max} z {total} niedodanych przez HolyArrs.",
+ "downloads.page.partial": "Pokazano {shown} z {total} torrentów niedodanych przez HolyArrs.",
+ "downloads.page.partialFiltered": "Pokazano {shown} z {total} torrentów niedodanych przez HolyArrs. Przy włączonym filtrze liczby obejmują tylko wczytane.",
+ "downloads.page.notLoaded.title": "Jeszcze niewczytane",
+ "downloads.page.notLoaded.text": "Torrenty z tej karty ({count}) są dalej na liście programu do pobierania. Wczytaj więcej, aby je zobaczyć.",
"downloads.page.couldNotLoad": "Nie udało się wczytać Pobierania.",
"downloads.page.details": "Szczegóły",
"downloads.page.done.pause": "Pobieranie wstrzymane",
diff --git a/app/frontend/src/lib/core/i18n/messages/pl/server-lines.json b/app/frontend/src/lib/core/i18n/messages/pl/server-lines.json
index 4011f0e..77e6c78 100644
--- a/app/frontend/src/lib/core/i18n/messages/pl/server-lines.json
+++ b/app/frontend/src/lib/core/i18n/messages/pl/server-lines.json
@@ -839,7 +839,7 @@
"server.migrate.holyarrs-reads-trakt-lists-and-watchlists": "HolyArrs czyta listy Trakt i listy do obejrzenia; lista obejrzanych lub kolekcji zostaje w Radarr",
"server.migrate.holyarrs-sets-one-proxy-address-per": "HolyArrs ustawia jeden adres proxy na Źródło; ustaw go na Źródłach, które go używały",
"server.migrate.holyarrs-stopped-during-this-import-before": "HolyArrs zatrzymał się w trakcie tego importu, przed końcem. To, co utworzył, jest oznaczone: zaimportuj ponownie, żeby dokończyć (nic nie zostanie dodane dwa razy), albo cofnij.",
- "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs łączy się tylko z qBittorrent, Transmission, Deluge, SABnzbd i NZBGet",
+ "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs łączy się tylko z qBittorrent, Transmission, Deluge, rTorrent, SABnzbd i NZBGet",
"server.migrate.holyarrs-uses-one-category-of-its": "HolyArrs używa jednej własnej kategorii na Downloader (holyarrs)",
"server.migrate.holyarrs-writes-no-metadata-files-for": "HolyArrs nie zapisuje plików metadanych dla odtwarzaczy multimediów",
"server.migrate.import-row-was-replaced": "wiersz importu został zastąpiony",
diff --git a/app/frontend/src/lib/core/i18n/messages/pl/settings-downloaders.json b/app/frontend/src/lib/core/i18n/messages/pl/settings-downloaders.json
index 0644b62..03a35ba 100644
--- a/app/frontend/src/lib/core/i18n/messages/pl/settings-downloaders.json
+++ b/app/frontend/src/lib/core/i18n/messages/pl/settings-downloaders.json
@@ -2,6 +2,7 @@
"settings.downloaders.catSab": "Musi już istnieć w SABnzbd.",
"settings.downloaders.catTransmission": "Zapisywana jako etykieta Transmission; wymagany Transmission 4 lub nowszy.",
"settings.downloaders.catDeluge": "Zapisywana jako etykieta Deluge; podłączony daemon potrzebuje wtyczki Label.",
+ "settings.downloaders.catRtorrent": "Zapisywana jako etykieta rTorrent, widoczna w kolumnie Label w ruTorrent.",
"settings.downloaders.catNzbget": "Wysyłana jako kategoria NZBGet.",
"settings.downloaders.catQbit": "Tworzona w qBittorrent, jeśli jej brak.",
"settings.downloaders.saved": "Zapisano: {name}",
@@ -52,6 +53,7 @@
"settings.downloaders.secretDeluge": "Hasło Web UI Deluge.",
"settings.downloaders.secretKept": "Przechowywane zaszyfrowane, nigdy więcej nie pokazywane. Przeniesienie adresu na inny host wymaga go ponownie.",
"settings.downloaders.delugeNote": "Web UI Deluge musi być połączone z daemonem z włączoną wtyczką Label",
+ "settings.downloaders.rtorrentNote": "Użyj adresu XML-RPC: /RPC2 (port 8000 w obrazie crazymax) albo /plugins/httprpc/action.php w ruTorrent. rTorrent nie umie usuwać plików, więc HolyArrs usuwa je tam, gdzie ma do nich dostęp. Dla seedboksa dodaj parę ścieżek do folderu, który wypełnia synchronizacja.",
"settings.downloaders.moreOptions": "Więcej opcji",
"settings.downloaders.local": "Dostęp do sieci lokalnej",
"settings.downloaders.localHint": "Włączone w większości konfiguracji",
@@ -91,6 +93,8 @@
"settings.downloaders.removeFailedHint": "Usuwa też ich pliki",
"settings.downloaders.autoAdd": "Dodawaj dopasowane tytuły do Biblioteki",
"settings.downloaders.autoAddHint": "Pewne dopasowania, które już są w Downloaderze, są dodawane bez wyszukiwania",
+ "settings.downloaders.sabOutside": "Pokazuj zadania Usenet wysłane przez inne aplikacje",
+ "settings.downloaders.sabOutsideHint": "Zadania z innych kategorii współdzielonego SABnzbd lub NZBGet są widoczne w Pobraniach tylko do odczytu. HolyArrs nigdy ich nie dopasowuje.",
"settings.downloaders.whenRemove": "Gdy usuwasz pobieranie",
"settings.downloaders.deleteFiles": "Usuń jego pliki",
"settings.downloaders.turnDown": "Odrzuć jego release",
diff --git a/app/frontend/src/lib/core/i18n/messages/pl/settings-index.json b/app/frontend/src/lib/core/i18n/messages/pl/settings-index.json
index 6dd7dfd..0c34ad2 100644
--- a/app/frontend/src/lib/core/i18n/messages/pl/settings-index.json
+++ b/app/frontend/src/lib/core/i18n/messages/pl/settings-index.json
@@ -206,7 +206,7 @@
"settings.index.search.search-now.search-now.label": "Szukaj teraz",
"settings.index.search.search-now.search-now.words": "szukaj lepsza kopia kanały uruchom",
"settings.index.downloaders.downloaders-card.downloaders.label": "Downloadery",
- "settings.index.downloaders.downloaders-card.downloaders.words": "download klient qbittorrent sabnzbd transmission deluge nzbget torrent klient dodaj",
+ "settings.index.downloaders.downloaders-card.downloaders.words": "download klient qbittorrent sabnzbd transmission deluge rtorrent rutorrent nzbget torrent klient dodaj",
"settings.index.downloaders.st-stall.stalled-after.label": "Zablokowane po",
"settings.index.downloaders.st-stall.stalled-after.words": "zablokowane zawieszone godziny pobieranie",
"settings.index.downloaders.st-act.give-up-and-try-the-next-release-after.label": "Zrezygnuj i spróbuj następnego release'u po",
diff --git a/app/frontend/src/lib/core/i18n/messages/pt-br/downloads.json b/app/frontend/src/lib/core/i18n/messages/pt-br/downloads.json
index f714a45..97c7be3 100644
--- a/app/frontend/src/lib/core/i18n/messages/pt-br/downloads.json
+++ b/app/frontend/src/lib/core/i18n/messages/pt-br/downloads.json
@@ -93,12 +93,12 @@
"downloads.clients.slowFailed": "Não foi possível mudar o modo lento",
"downloads.clients.someConnected": "{n} de {total} conectados",
"downloads.cm.confirmFailed": "Não foi possível confirmar a correspondência",
- "downloads.cm.desc": "Escolha o título que cada torrent guarda. Ele é adicionado à sua Biblioteca sem uma busca.",
+ "downloads.cm.desc": "Escolha o título que cada download guarda. Ele é adicionado à sua Biblioteca sem uma busca.",
"downloads.cm.done": "Concluído",
- "downloads.cm.every": "Todos os torrents têm correspondência.",
+ "downloads.cm.every": "Todos os downloads têm correspondência.",
"downloads.cm.match": "Corresponder",
"downloads.cm.matchNow": "Corresponder agora",
- "downloads.cm.matching": "Correspondendo torrents",
+ "downloads.cm.matching": "Correspondendo downloads",
"downloads.cm.none": "Nenhum título encontrado para este nome.",
"downloads.cm.notMedia": "Não é mídia",
"downloads.cm.skip": "Pular",
@@ -702,8 +702,8 @@
"downloads.many.seasonPack": "pacote de temporada",
"downloads.many.track": "faixa",
"downloads.many.tracks": "faixas",
- "downloads.match.many": "{n} torrents precisam de uma correspondência",
- "downloads.match.one": "1 torrent precisa de uma correspondência",
+ "downloads.match.many": "{n} downloads precisam de uma correspondência",
+ "downloads.match.one": "1 download precisa de uma correspondência",
"downloads.more.allTime": "Todo o período",
"downloads.more.answering": "Respondendo",
"downloads.more.free": "Livre",
@@ -768,6 +768,10 @@
"downloads.page.cantStartOne": "Não foi possível iniciar {name}",
"downloads.page.cantUpdateMany": "Não foi possível atualizar os downloads",
"downloads.page.capped": "Mostrando os primeiros {max} de {total} torrents que o HolyArrs não adicionou.",
+ "downloads.page.partial": "Mostrando {shown} de {total} torrents que o HolyArrs não adicionou.",
+ "downloads.page.partialFiltered": "Mostrando {shown} de {total} torrents que o HolyArrs não adicionou. Com um filtro ativo, as contagens cobrem só os carregados.",
+ "downloads.page.notLoaded.title": "Ainda não carregados",
+ "downloads.page.notLoaded.text": "{count} torrents desta aba estão mais abaixo na lista do gerenciador de downloads. Carregue mais para vê-los.",
"downloads.page.couldNotLoad": "Não foi possível carregar os Downloads.",
"downloads.page.details": "Detalhes",
"downloads.page.done.pause": "Download pausado",
diff --git a/app/frontend/src/lib/core/i18n/messages/pt-br/server-lines.json b/app/frontend/src/lib/core/i18n/messages/pt-br/server-lines.json
index d574684..7526760 100644
--- a/app/frontend/src/lib/core/i18n/messages/pt-br/server-lines.json
+++ b/app/frontend/src/lib/core/i18n/messages/pt-br/server-lines.json
@@ -839,7 +839,7 @@
"server.migrate.holyarrs-reads-trakt-lists-and-watchlists": "o HolyArrs lê listas e watchlists do Trakt; uma lista de assistidos ou de coleção fica no Radarr",
"server.migrate.holyarrs-sets-one-proxy-address-per": "o HolyArrs define um endereço de proxy por Fonte; defina-o nas Fontes que o usavam",
"server.migrate.holyarrs-stopped-during-this-import-before": "O HolyArrs parou durante esta importação, antes de terminar. O que ele criou está marcado: importe de novo para terminar (nada é adicionado duas vezes) ou desfaça.",
- "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "o HolyArrs conversa só com qBittorrent, Transmission, Deluge, SABnzbd e NZBGet",
+ "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "o HolyArrs conversa só com qBittorrent, Transmission, Deluge, rTorrent, SABnzbd e NZBGet",
"server.migrate.holyarrs-uses-one-category-of-its": "o HolyArrs usa uma categoria própria por gerenciador de downloads (holyarrs)",
"server.migrate.holyarrs-writes-no-metadata-files-for": "o HolyArrs não grava arquivos de metadados para players de mídia",
"server.migrate.import-row-was-replaced": "a linha da importação foi substituída",
diff --git a/app/frontend/src/lib/core/i18n/messages/pt-br/settings-downloaders.json b/app/frontend/src/lib/core/i18n/messages/pt-br/settings-downloaders.json
index 115efac..3ecb23f 100644
--- a/app/frontend/src/lib/core/i18n/messages/pt-br/settings-downloaders.json
+++ b/app/frontend/src/lib/core/i18n/messages/pt-br/settings-downloaders.json
@@ -2,6 +2,7 @@
"settings.downloaders.catSab": "Já precisa existir no SABnzbd.",
"settings.downloaders.catTransmission": "Guardada como rótulo do Transmission; exige o Transmission 4 ou mais novo.",
"settings.downloaders.catDeluge": "Guardada como rótulo do Deluge; o daemon conectado precisa do plugin Label.",
+ "settings.downloaders.catRtorrent": "Guardada como rótulo do rTorrent, mostrada na coluna Label do ruTorrent.",
"settings.downloaders.catNzbget": "Enviada como a categoria do NZBGet.",
"settings.downloaders.catQbit": "Criada no qBittorrent se não existir.",
"settings.downloaders.saved": "{name} salvo",
@@ -52,6 +53,7 @@
"settings.downloaders.secretDeluge": "A senha da Web UI do Deluge.",
"settings.downloaders.secretKept": "Fica criptografada e nunca é mostrada de novo. Mudar o endereço para outro host exige digitar de novo.",
"settings.downloaders.delugeNote": "A Web UI do Deluge precisa estar conectada a um daemon com o plugin Label ativado",
+ "settings.downloaders.rtorrentNote": "Use o endereço XML-RPC: /RPC2 (porta 8000 na imagem crazymax) ou /plugins/httprpc/action.php do ruTorrent. O rTorrent não consegue apagar arquivos, então o HolyArrs os apaga onde consegue alcançá-los. Para uma seedbox, adicione um par de caminhos para a pasta que a sua sincronização preenche.",
"settings.downloaders.moreOptions": "Mais opções",
"settings.downloaders.local": "Acessar a rede local",
"settings.downloaders.localHint": "Ativado na maioria das configurações",
@@ -91,6 +93,8 @@
"settings.downloaders.removeFailedHint": "Apaga os arquivos deles também",
"settings.downloaders.autoAdd": "Adicionar títulos reconhecidos à sua Biblioteca",
"settings.downloaders.autoAddHint": "Correspondências certas que já estão num gerenciador são adicionadas sem buscar",
+ "settings.downloaders.sabOutside": "Mostrar tarefas Usenet enviadas por outros apps",
+ "settings.downloaders.sabOutsideHint": "Tarefas de outras categorias de um SABnzbd ou NZBGet compartilhado aparecem em Downloads, só para leitura. O HolyArrs nunca faz a correspondência delas.",
"settings.downloaders.whenRemove": "Quando você remove um download",
"settings.downloaders.deleteFiles": "Apagar os arquivos dele",
"settings.downloaders.turnDown": "Descartar o lançamento dele",
diff --git a/app/frontend/src/lib/core/i18n/messages/pt-br/settings-index.json b/app/frontend/src/lib/core/i18n/messages/pt-br/settings-index.json
index 71e15fe..bfd7965 100644
--- a/app/frontend/src/lib/core/i18n/messages/pt-br/settings-index.json
+++ b/app/frontend/src/lib/core/i18n/messages/pt-br/settings-index.json
@@ -206,7 +206,7 @@
"settings.index.search.search-now.search-now.label": "Buscar agora",
"settings.index.search.search-now.search-now.words": "buscar cópia melhor feeds rodar",
"settings.index.downloaders.downloaders-card.downloaders.label": "Gerenciadores de downloads",
- "settings.index.downloaders.downloaders-card.downloaders.words": "cliente de download qbittorrent sabnzbd transmission deluge nzbget cliente de torrent adicionar",
+ "settings.index.downloaders.downloaders-card.downloaders.words": "cliente de download qbittorrent sabnzbd transmission deluge rtorrent rutorrent nzbget cliente de torrent adicionar",
"settings.index.downloaders.st-stall.stalled-after.label": "Parado após",
"settings.index.downloaders.st-stall.stalled-after.words": "parado travado horas download",
"settings.index.downloaders.st-act.give-up-and-try-the-next-release-after.label": "Desistir e tentar o próximo lançamento após",
diff --git a/app/frontend/src/lib/core/i18n/messages/ru/downloads.json b/app/frontend/src/lib/core/i18n/messages/ru/downloads.json
index 2fea30d..e53f4ea 100644
--- a/app/frontend/src/lib/core/i18n/messages/ru/downloads.json
+++ b/app/frontend/src/lib/core/i18n/messages/ru/downloads.json
@@ -93,12 +93,12 @@
"downloads.clients.slowFailed": "Не удалось изменить медленный режим",
"downloads.clients.someConnected": "Подключено {n} из {total}",
"downloads.cm.confirmFailed": "Не удалось подтвердить совпадение",
- "downloads.cm.desc": "Выберите тайтл, который содержит каждый торрент. Он добавится в вашу Медиатеку без поиска.",
+ "downloads.cm.desc": "Выберите тайтл, который содержит каждая загрузка. Он добавится в вашу Медиатеку без поиска.",
"downloads.cm.done": "Готово",
- "downloads.cm.every": "Все торренты сопоставлены.",
+ "downloads.cm.every": "Все загрузки сопоставлены.",
"downloads.cm.match": "Сопоставить",
"downloads.cm.matchNow": "Сопоставить сейчас",
- "downloads.cm.matching": "Сопоставление торрентов",
+ "downloads.cm.matching": "Сопоставление загрузок",
"downloads.cm.none": "Для этого имени тайтл не найден.",
"downloads.cm.notMedia": "Не медиа",
"downloads.cm.skip": "Пропустить",
@@ -702,8 +702,8 @@
"downloads.many.seasonPack": "сезонный пак",
"downloads.many.track": "трек",
"downloads.many.tracks": "треки",
- "downloads.match.many": "Торрентов, которым нужно совпадение: {n}",
- "downloads.match.one": "1 торрент требует совпадения",
+ "downloads.match.many": "Загрузок, которым нужно совпадение: {n}",
+ "downloads.match.one": "1 загрузка требует совпадения",
"downloads.more.allTime": "Всё время",
"downloads.more.answering": "Отвечает",
"downloads.more.free": "Свободно",
@@ -768,6 +768,10 @@
"downloads.page.cantStartOne": "Не удалось запустить {name}",
"downloads.page.cantUpdateMany": "Не удалось обновить загрузки",
"downloads.page.capped": "Показаны первые {max} из {total} торрентов, которые добавил не HolyArrs.",
+ "downloads.page.partial": "Показано {shown} из {total} торрентов, которые добавил не HolyArrs.",
+ "downloads.page.partialFiltered": "Показано {shown} из {total} торрентов, которые добавил не HolyArrs. С включённым фильтром считаются только загруженные.",
+ "downloads.page.notLoaded.title": "Ещё не загружены",
+ "downloads.page.notLoaded.text": "Торренты на этой вкладке ({count}) находятся дальше в списке загрузчика. Загрузите ещё, чтобы их увидеть.",
"downloads.page.couldNotLoad": "Не удалось загрузить загрузки.",
"downloads.page.details": "Подробности",
"downloads.page.done.pause": "Загрузка приостановлена",
diff --git a/app/frontend/src/lib/core/i18n/messages/ru/server-lines.json b/app/frontend/src/lib/core/i18n/messages/ru/server-lines.json
index c10e142..485f552 100644
--- a/app/frontend/src/lib/core/i18n/messages/ru/server-lines.json
+++ b/app/frontend/src/lib/core/i18n/messages/ru/server-lines.json
@@ -839,7 +839,7 @@
"server.migrate.holyarrs-reads-trakt-lists-and-watchlists": "HolyArrs читает списки и списки к просмотру Trakt; список просмотренного или коллекции остаётся в Radarr",
"server.migrate.holyarrs-sets-one-proxy-address-per": "в HolyArrs у каждого источника один адрес прокси; задайте его у источников, которые его использовали",
"server.migrate.holyarrs-stopped-during-this-import-before": "HolyArrs остановился во время этого импорта, не закончив его. Всё созданное помечено: импортируйте снова, чтобы закончить (ничего не добавится дважды), или отмените импорт.",
- "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs работает только с qBittorrent, Transmission, Deluge, SABnzbd и NZBGet",
+ "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs работает только с qBittorrent, Transmission, Deluge, rTorrent, SABnzbd и NZBGet",
"server.migrate.holyarrs-uses-one-category-of-its": "HolyArrs использует для каждого загрузчика одну свою категорию (holyarrs)",
"server.migrate.holyarrs-writes-no-metadata-files-for": "HolyArrs не создаёт файлов метаданных для медиаплееров",
"server.migrate.import-row-was-replaced": "строка импорта была заменена",
diff --git a/app/frontend/src/lib/core/i18n/messages/ru/settings-downloaders.json b/app/frontend/src/lib/core/i18n/messages/ru/settings-downloaders.json
index 4c833c9..a496309 100644
--- a/app/frontend/src/lib/core/i18n/messages/ru/settings-downloaders.json
+++ b/app/frontend/src/lib/core/i18n/messages/ru/settings-downloaders.json
@@ -2,6 +2,7 @@
"settings.downloaders.catSab": "Должна уже существовать в SABnzbd.",
"settings.downloaders.catTransmission": "Сохраняется как метка Transmission; нужен Transmission 4 или новее.",
"settings.downloaders.catDeluge": "Сохраняется как метка Deluge; подключённому демону нужен плагин Label.",
+ "settings.downloaders.catRtorrent": "Сохраняется как метка rTorrent и видна в столбце Label в ruTorrent.",
"settings.downloaders.catNzbget": "Отправляется как категория NZBGet.",
"settings.downloaders.catQbit": "Создаётся в qBittorrent, если её нет.",
"settings.downloaders.saved": "{name}: сохранено",
@@ -52,6 +53,7 @@
"settings.downloaders.secretDeluge": "Пароль веб-интерфейса Deluge.",
"settings.downloaders.secretKept": "Хранится в зашифрованном виде и больше не показывается. При переносе адреса на другой хост его нужно ввести заново.",
"settings.downloaders.delugeNote": "Веб-интерфейс Deluge должен быть подключён к демону с включённым плагином Label",
+ "settings.downloaders.rtorrentNote": "Укажите адрес XML-RPC: /RPC2 (порт 8000 в образе crazymax) или /plugins/httprpc/action.php в ruTorrent. rTorrent не умеет удалять файлы, поэтому HolyArrs удаляет их там, где может до них добраться. Для сидбокса добавьте пару путей к папке, которую заполняет синхронизация.",
"settings.downloaders.moreOptions": "Дополнительные параметры",
"settings.downloaders.local": "Доступ к локальной сети",
"settings.downloaders.localHint": "В большинстве случаев включено",
@@ -91,6 +93,8 @@
"settings.downloaders.removeFailedHint": "Вместе с их файлами",
"settings.downloaders.autoAdd": "Добавлять совпавшие тайтлы в Медиатеку",
"settings.downloaders.autoAddHint": "Точные совпадения, уже находящиеся в загрузчике, добавляются без поиска",
+ "settings.downloaders.sabOutside": "Показывать задания Usenet от других приложений",
+ "settings.downloaders.sabOutsideHint": "Задания из других категорий общего SABnzbd или NZBGet видны в Загрузках только для просмотра. HolyArrs никогда их не сопоставляет.",
"settings.downloaders.whenRemove": "Когда вы удаляете загрузку",
"settings.downloaders.deleteFiles": "Удалять её файлы",
"settings.downloaders.turnDown": "Отбрасывать её релиз",
diff --git a/app/frontend/src/lib/core/i18n/messages/ru/settings-index.json b/app/frontend/src/lib/core/i18n/messages/ru/settings-index.json
index 9a8a91d..f979394 100644
--- a/app/frontend/src/lib/core/i18n/messages/ru/settings-index.json
+++ b/app/frontend/src/lib/core/i18n/messages/ru/settings-index.json
@@ -206,7 +206,7 @@
"settings.index.search.search-now.search-now.label": "Искать сейчас",
"settings.index.search.search-now.search-now.words": "поиск копия получше ленты запуск",
"settings.index.downloaders.downloaders-card.downloaders.label": "Загрузчики",
- "settings.index.downloaders.downloaders-card.downloaders.words": "клиент загрузки qbittorrent sabnzbd transmission deluge nzbget торрент клиент добавить",
+ "settings.index.downloaders.downloaders-card.downloaders.words": "клиент загрузки qbittorrent sabnzbd transmission deluge rtorrent rutorrent nzbget торрент клиент добавить",
"settings.index.downloaders.st-stall.stalled-after.label": "Считать зависшей через",
"settings.index.downloaders.st-stall.stalled-after.words": "завис застряла часы загрузка",
"settings.index.downloaders.st-act.give-up-and-try-the-next-release-after.label": "Отказаться и пробовать следующий релиз через",
diff --git a/app/frontend/src/lib/core/i18n/messages/tr/downloads.json b/app/frontend/src/lib/core/i18n/messages/tr/downloads.json
index 46b7b72..2b1e9c4 100644
--- a/app/frontend/src/lib/core/i18n/messages/tr/downloads.json
+++ b/app/frontend/src/lib/core/i18n/messages/tr/downloads.json
@@ -93,12 +93,12 @@
"downloads.clients.slowFailed": "Yavaş mod değiştirilemedi",
"downloads.clients.someConnected": "{total} içinden {n} bağlı",
"downloads.cm.confirmFailed": "Eşleşme onaylanamadı",
- "downloads.cm.desc": "Her torrent'in içerdiği başlığı seç. Arama yapılmadan Kütüphanene eklenir.",
+ "downloads.cm.desc": "Her indirmenin içerdiği başlığı seç. Arama yapılmadan Kütüphanene eklenir.",
"downloads.cm.done": "Bitti",
- "downloads.cm.every": "Her torrent eşleşti.",
+ "downloads.cm.every": "Her indirme eşleşti.",
"downloads.cm.match": "Eşleştir",
"downloads.cm.matchNow": "Şimdi eşleştir",
- "downloads.cm.matching": "Torrent'ler eşleştiriliyor",
+ "downloads.cm.matching": "İndirmeler eşleştiriliyor",
"downloads.cm.none": "Bu ad için başlık bulunamadı.",
"downloads.cm.notMedia": "Medya değil",
"downloads.cm.skip": "Atla",
@@ -702,8 +702,8 @@
"downloads.many.seasonPack": "sezon paketi",
"downloads.many.track": "parça",
"downloads.many.tracks": "parça",
- "downloads.match.many": "{n} torrent eşleşme bekliyor",
- "downloads.match.one": "1 torrent eşleşme bekliyor",
+ "downloads.match.many": "{n} indirme eşleşme bekliyor",
+ "downloads.match.one": "1 indirme eşleşme bekliyor",
"downloads.more.allTime": "Tüm zamanlar",
"downloads.more.answering": "Yanıt veriyor",
"downloads.more.free": "Boş",
@@ -784,6 +784,10 @@
"downloads.page.cantStartOne": "{name} başlatılamadı",
"downloads.page.cantUpdateMany": "İndirmeler güncellenemedi",
"downloads.page.capped": "HolyArrs'ın eklemediği {total} torrent'in ilk {max} tanesi gösteriliyor.",
+ "downloads.page.partial": "HolyArrs'ın eklemediği {total} torrent'in {shown} tanesi gösteriliyor.",
+ "downloads.page.partialFiltered": "HolyArrs'ın eklemediği {total} torrent'in {shown} tanesi gösteriliyor. Filtre açıkken sayılar yalnızca yüklenenleri kapsar.",
+ "downloads.page.notLoaded.title": "Henüz yüklenmedi",
+ "downloads.page.notLoaded.text": "Bu sekmedeki {count} torrent, indiricinin listesinde daha aşağıda. Görmek için daha fazla yükle.",
"downloads.page.couldNotLoad": "İndirmeler yüklenemedi.",
"downloads.page.details": "Ayrıntılar",
"downloads.page.done.pause": "İndirme duraklatıldı",
diff --git a/app/frontend/src/lib/core/i18n/messages/tr/server-lines.json b/app/frontend/src/lib/core/i18n/messages/tr/server-lines.json
index 186dc74..21b7c4b 100644
--- a/app/frontend/src/lib/core/i18n/messages/tr/server-lines.json
+++ b/app/frontend/src/lib/core/i18n/messages/tr/server-lines.json
@@ -839,7 +839,7 @@
"server.migrate.holyarrs-reads-trakt-lists-and-watchlists": "HolyArrs Trakt listelerini ve izleme listelerini okur; izlenenler ya da koleksiyon listesi Radarr'da kalır",
"server.migrate.holyarrs-sets-one-proxy-address-per": "HolyArrs her Kaynak için tek bir proxy adresi ayarlar; bunu onu kullanan Kaynaklarda ayarla",
"server.migrate.holyarrs-stopped-during-this-import-before": "HolyArrs bu içe aktarma sırasında, bitmeden durdu. Oluşturduğu her şey işaretli: bitirmek için yeniden içe aktar (hiçbir şey iki kez eklenmez) ya da geri al.",
- "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs yalnızca qBittorrent, Transmission, Deluge, SABnzbd ve NZBGet ile konuşur",
+ "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs yalnızca qBittorrent, Transmission, Deluge, rTorrent, SABnzbd ve NZBGet ile konuşur",
"server.migrate.holyarrs-uses-one-category-of-its": "HolyArrs her İndirici için kendine ait tek bir kategori kullanır (holyarrs)",
"server.migrate.holyarrs-writes-no-metadata-files-for": "HolyArrs medya oynatıcılar için meta veri dosyası yazmaz",
"server.migrate.import-row-was-replaced": "içe aktarma satırı değiştirildi",
diff --git a/app/frontend/src/lib/core/i18n/messages/tr/settings-downloaders.json b/app/frontend/src/lib/core/i18n/messages/tr/settings-downloaders.json
index 2372b3a..2ea179d 100644
--- a/app/frontend/src/lib/core/i18n/messages/tr/settings-downloaders.json
+++ b/app/frontend/src/lib/core/i18n/messages/tr/settings-downloaders.json
@@ -2,6 +2,7 @@
"settings.downloaders.catSab": "SABnzbd'de zaten var olmalı.",
"settings.downloaders.catTransmission": "Transmission etiketi olarak saklanır; Transmission 4 ya da daha yenisi gerekir.",
"settings.downloaders.catDeluge": "Deluge etiketi olarak saklanır; bağlı daemon'da Label eklentisi olmalı.",
+ "settings.downloaders.catRtorrent": "rTorrent etiketi olarak saklanır, ruTorrent'in Label sütununda görünür.",
"settings.downloaders.catNzbget": "NZBGet kategorisi olarak gönderilir.",
"settings.downloaders.catQbit": "Yoksa qBittorrent'ta oluşturulur.",
"settings.downloaders.saved": "{name} kaydedildi",
@@ -52,6 +53,7 @@
"settings.downloaders.secretDeluge": "Deluge Web UI parolası.",
"settings.downloaders.secretKept": "Şifreli saklanır, bir daha gösterilmez. Adresi başka bir host'a taşımak için tekrar yazılması gerekir.",
"settings.downloaders.delugeNote": "Deluge Web UI, Label eklentisi açık bir daemon'a bağlı olmalı",
+ "settings.downloaders.rtorrentNote": "XML-RPC adresini kullan: /RPC2 (crazymax imajında 8000 portu) ya da ruTorrent'in /plugins/httprpc/action.php adresi. rTorrent dosya silemez, bu yüzden HolyArrs dosyaları erişebildiği yerde kendisi siler. Seedbox için, eşitlemenin doldurduğu klasöre bir yol çifti ekle.",
"settings.downloaders.moreOptions": "Daha fazla seçenek",
"settings.downloaders.local": "Yerel ağa eriş",
"settings.downloaders.localHint": "Çoğu kurulum için açık",
@@ -91,6 +93,8 @@
"settings.downloaders.removeFailedHint": "Dosyalarını da siler",
"settings.downloaders.autoAdd": "Eşleşen başlıkları Kütüphanene ekle",
"settings.downloaders.autoAddHint": "Bir indiricide zaten olan kesin eşleşmeler aramadan eklenir",
+ "settings.downloaders.sabOutside": "Başka uygulamaların gönderdiği Usenet işlerini göster",
+ "settings.downloaders.sabOutsideHint": "Paylaşılan bir SABnzbd veya NZBGet'in diğer kategorilerindeki işler İndirmeler'de salt okunur görünür. HolyArrs onları asla eşleştirmez.",
"settings.downloaders.whenRemove": "Bir indirmeyi kaldırdığında",
"settings.downloaders.deleteFiles": "Dosyalarını sil",
"settings.downloaders.turnDown": "Sürüm adayını reddet",
diff --git a/app/frontend/src/lib/core/i18n/messages/tr/settings-index.json b/app/frontend/src/lib/core/i18n/messages/tr/settings-index.json
index 9ebd96e..a45de92 100644
--- a/app/frontend/src/lib/core/i18n/messages/tr/settings-index.json
+++ b/app/frontend/src/lib/core/i18n/messages/tr/settings-index.json
@@ -206,7 +206,7 @@
"settings.index.search.search-now.search-now.label": "Şimdi ara",
"settings.index.search.search-now.search-now.words": "ara daha iyi kopya feed'ler çalıştır",
"settings.index.downloaders.downloaders-card.downloaders.label": "İndiriciler",
- "settings.index.downloaders.downloaders-card.downloaders.words": "indirme istemcisi qbittorrent sabnzbd transmission deluge nzbget torrent istemcisi ekle",
+ "settings.index.downloaders.downloaders-card.downloaders.words": "indirme istemcisi qbittorrent sabnzbd transmission deluge rtorrent rutorrent nzbget torrent istemcisi ekle",
"settings.index.downloaders.st-stall.stalled-after.label": "Şu kadar sonra takıldı say",
"settings.index.downloaders.st-stall.stalled-after.words": "takıldı sıkıştı saat indirme",
"settings.index.downloaders.st-act.give-up-and-try-the-next-release-after.label": "Vazgeç ve şu kadar sonra sonraki sürüm adayını dene",
diff --git a/app/frontend/src/lib/core/i18n/messages/uk/downloads.json b/app/frontend/src/lib/core/i18n/messages/uk/downloads.json
index f10f461..5ccd2f3 100644
--- a/app/frontend/src/lib/core/i18n/messages/uk/downloads.json
+++ b/app/frontend/src/lib/core/i18n/messages/uk/downloads.json
@@ -93,12 +93,12 @@
"downloads.clients.slowFailed": "Не вдалося змінити повільний режим",
"downloads.clients.someConnected": "Підключено {n} із {total}",
"downloads.cm.confirmFailed": "Не вдалося підтвердити збіг",
- "downloads.cm.desc": "Обери тайтл, який містить кожен торент. Його буде додано до твоєї бібліотеки без пошуку.",
+ "downloads.cm.desc": "Обери тайтл, який містить кожне завантаження. Його буде додано до твоєї бібліотеки без пошуку.",
"downloads.cm.done": "Готово",
- "downloads.cm.every": "Усі торенти зіставлено.",
+ "downloads.cm.every": "Усі завантаження зіставлено.",
"downloads.cm.match": "Зіставити",
"downloads.cm.matchNow": "Зіставити зараз",
- "downloads.cm.matching": "Зіставлення торентів",
+ "downloads.cm.matching": "Зіставлення завантажень",
"downloads.cm.none": "Для цієї назви тайтла не знайдено.",
"downloads.cm.notMedia": "Не медіа",
"downloads.cm.skip": "Пропустити",
@@ -702,8 +702,8 @@
"downloads.many.seasonPack": "пакет сезону",
"downloads.many.track": "трек",
"downloads.many.tracks": "треків",
- "downloads.match.many": "Торентів, що потребують зіставлення: {n}",
- "downloads.match.one": "1 торент потребує зіставлення",
+ "downloads.match.many": "Завантажень, що потребують зіставлення: {n}",
+ "downloads.match.one": "1 завантаження потребує зіставлення",
"downloads.more.allTime": "Увесь час",
"downloads.more.answering": "Відповідає",
"downloads.more.free": "Вільно",
@@ -768,6 +768,10 @@
"downloads.page.cantStartOne": "Не вдалося запустити {name}",
"downloads.page.cantUpdateMany": "Не вдалося оновити завантаження",
"downloads.page.capped": "Показано перші {max} із {total} торентів, яких HolyArrs не додавав.",
+ "downloads.page.partial": "Показано {shown} із {total} торентів, яких HolyArrs не додавав.",
+ "downloads.page.partialFiltered": "Показано {shown} із {total} торентів, яких HolyArrs не додавав. З увімкненим фільтром лічильники охоплюють лише завантажені.",
+ "downloads.page.notLoaded.title": "Ще не завантажено",
+ "downloads.page.notLoaded.text": "Торенти на цій вкладці ({count}) далі в списку завантажувача. Завантаж ще, щоб їх побачити.",
"downloads.page.couldNotLoad": "Не вдалося завантажити завантаження.",
"downloads.page.details": "Подробиці",
"downloads.page.done.pause": "Завантаження призупинено",
diff --git a/app/frontend/src/lib/core/i18n/messages/uk/server-lines.json b/app/frontend/src/lib/core/i18n/messages/uk/server-lines.json
index 88871c5..944ce89 100644
--- a/app/frontend/src/lib/core/i18n/messages/uk/server-lines.json
+++ b/app/frontend/src/lib/core/i18n/messages/uk/server-lines.json
@@ -839,7 +839,7 @@
"server.migrate.holyarrs-reads-trakt-lists-and-watchlists": "HolyArrs зчитує списки й списки перегляду Trakt; список переглянутого або колекції лишається в Radarr",
"server.migrate.holyarrs-sets-one-proxy-address-per": "HolyArrs задає одну адресу проксі на джерело; задай її на джерелах, які її використовували",
"server.migrate.holyarrs-stopped-during-this-import-before": "HolyArrs зупинився під час цього імпорту, не завершивши його. Створене позначено: імпортуй знову, щоб завершити (нічого не додасться двічі), або скасуй.",
- "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs працює лише з qBittorrent, Transmission, Deluge, SABnzbd і NZBGet",
+ "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs працює лише з qBittorrent, Transmission, Deluge, rTorrent, SABnzbd і NZBGet",
"server.migrate.holyarrs-uses-one-category-of-its": "HolyArrs використовує одну власну категорію на завантажувач (holyarrs)",
"server.migrate.holyarrs-writes-no-metadata-files-for": "HolyArrs не пише файлів метаданих для медіаплеєрів",
"server.migrate.import-row-was-replaced": "рядок імпорту замінено",
diff --git a/app/frontend/src/lib/core/i18n/messages/uk/settings-downloaders.json b/app/frontend/src/lib/core/i18n/messages/uk/settings-downloaders.json
index d6a12ad..b3d96b8 100644
--- a/app/frontend/src/lib/core/i18n/messages/uk/settings-downloaders.json
+++ b/app/frontend/src/lib/core/i18n/messages/uk/settings-downloaders.json
@@ -2,6 +2,7 @@
"settings.downloaders.catSab": "Має вже існувати в SABnzbd.",
"settings.downloaders.catTransmission": "Зберігається як мітка Transmission; потрібен Transmission 4 або новіший.",
"settings.downloaders.catDeluge": "Зберігається як мітка Deluge; підключеному демону потрібен плагін Label.",
+ "settings.downloaders.catRtorrent": "Зберігається як мітка rTorrent і видна в стовпці Label у ruTorrent.",
"settings.downloaders.catNzbget": "Надсилається як категорія NZBGet.",
"settings.downloaders.catQbit": "Створюється в qBittorrent, якщо її немає.",
"settings.downloaders.saved": "{name} збережено",
@@ -52,6 +53,7 @@
"settings.downloaders.secretDeluge": "Пароль вебінтерфейсу Deluge.",
"settings.downloaders.secretKept": "Зберігається зашифрованим і більше не показується. Якщо перенести адресу на інший хост, його потрібно ввести знову.",
"settings.downloaders.delugeNote": "Вебінтерфейс Deluge має бути підключений до демона з увімкненим плагіном Label",
+ "settings.downloaders.rtorrentNote": "Вкажи адресу XML-RPC: /RPC2 (порт 8000 в образі crazymax) або /plugins/httprpc/action.php у ruTorrent. rTorrent не вміє видаляти файли, тому HolyArrs видаляє їх там, де може до них дістатися. Для сідбокса додай пару шляхів до теки, яку заповнює синхронізація.",
"settings.downloaders.moreOptions": "Більше параметрів",
"settings.downloaders.local": "Доступ до локальної мережі",
"settings.downloaders.localHint": "У більшості налаштувань увімкнено",
@@ -91,6 +93,8 @@
"settings.downloaders.removeFailedHint": "Видаляє й їхні файли",
"settings.downloaders.autoAdd": "Додавати зіставлені тайтли до твоєї бібліотеки",
"settings.downloaders.autoAddHint": "Упевнені збіги, що вже є в завантажувачі, додаються без пошуку",
+ "settings.downloaders.sabOutside": "Показувати завдання Usenet від інших застосунків",
+ "settings.downloaders.sabOutsideHint": "Завдання з інших категорій спільного SABnzbd або NZBGet видно в Завантаженнях лише для перегляду. HolyArrs ніколи їх не зіставляє.",
"settings.downloaders.whenRemove": "Коли ти видаляєш завантаження",
"settings.downloaders.deleteFiles": "Видаляти його файли",
"settings.downloaders.turnDown": "Відкидати його реліз",
diff --git a/app/frontend/src/lib/core/i18n/messages/uk/settings-index.json b/app/frontend/src/lib/core/i18n/messages/uk/settings-index.json
index a5ab680..88033bf 100644
--- a/app/frontend/src/lib/core/i18n/messages/uk/settings-index.json
+++ b/app/frontend/src/lib/core/i18n/messages/uk/settings-index.json
@@ -206,7 +206,7 @@
"settings.index.search.search-now.search-now.label": "Шукати зараз",
"settings.index.search.search-now.search-now.words": "пошук краща копія стрічки запустити",
"settings.index.downloaders.downloaders-card.downloaders.label": "Завантажувачі",
- "settings.index.downloaders.downloaders-card.downloaders.words": "клієнт завантаження qbittorrent sabnzbd transmission deluge nzbget торент-клієнт додати",
+ "settings.index.downloaders.downloaders-card.downloaders.words": "клієнт завантаження qbittorrent sabnzbd transmission deluge rtorrent rutorrent nzbget торент-клієнт додати",
"settings.index.downloaders.st-stall.stalled-after.label": "Зависло після",
"settings.index.downloaders.st-stall.stalled-after.words": "зависло застрягло години завантаження",
"settings.index.downloaders.st-act.give-up-and-try-the-next-release-after.label": "Здатися й пробувати наступний реліз через",
diff --git a/app/frontend/src/lib/core/i18n/messages/zh-cn/downloads.json b/app/frontend/src/lib/core/i18n/messages/zh-cn/downloads.json
index 0de6cf6..929dd51 100644
--- a/app/frontend/src/lib/core/i18n/messages/zh-cn/downloads.json
+++ b/app/frontend/src/lib/core/i18n/messages/zh-cn/downloads.json
@@ -93,12 +93,12 @@
"downloads.clients.slowFailed": "无法切换慢速模式",
"downloads.clients.someConnected": "已连接 {n} 个,共 {total} 个",
"downloads.cm.confirmFailed": "无法确认匹配",
- "downloads.cm.desc": "选择每个种子对应的条目。它会直接加入你的媒体库,无需搜索。",
+ "downloads.cm.desc": "选择每个下载对应的条目。它会直接加入你的媒体库,无需搜索。",
"downloads.cm.done": "完成",
- "downloads.cm.every": "所有种子都已匹配。",
+ "downloads.cm.every": "所有下载都已匹配。",
"downloads.cm.match": "匹配",
"downloads.cm.matchNow": "立即匹配",
- "downloads.cm.matching": "正在匹配种子",
+ "downloads.cm.matching": "正在匹配下载",
"downloads.cm.none": "没有找到与此名称对应的条目。",
"downloads.cm.notMedia": "不是媒体",
"downloads.cm.skip": "跳过",
@@ -702,8 +702,8 @@
"downloads.many.seasonPack": "整季合集",
"downloads.many.track": "曲目",
"downloads.many.tracks": "曲目",
- "downloads.match.many": "{n} 个种子需要匹配",
- "downloads.match.one": "1 个种子需要匹配",
+ "downloads.match.many": "{n} 个下载需要匹配",
+ "downloads.match.one": "1 个下载需要匹配",
"downloads.more.allTime": "全部时间",
"downloads.more.answering": "有响应",
"downloads.more.free": "可用",
@@ -768,6 +768,10 @@
"downloads.page.cantStartOne": "无法开始 {name}",
"downloads.page.cantUpdateMany": "无法更新下载",
"downloads.page.capped": "仅显示 HolyArrs 未添加的 {total} 个种子中的前 {max} 个。",
+ "downloads.page.partial": "显示 HolyArrs 未添加的 {total} 个种子中的 {shown} 个。",
+ "downloads.page.partialFiltered": "显示 HolyArrs 未添加的 {total} 个种子中的 {shown} 个。开启筛选时,计数只包含已加载的种子。",
+ "downloads.page.notLoaded.title": "尚未加载",
+ "downloads.page.notLoaded.text": "此标签页中的 {count} 个种子在下载器列表更靠后的位置。加载更多即可看到。",
"downloads.page.couldNotLoad": "无法加载下载。",
"downloads.page.details": "详情",
"downloads.page.done.pause": "下载已暂停",
diff --git a/app/frontend/src/lib/core/i18n/messages/zh-cn/server-lines.json b/app/frontend/src/lib/core/i18n/messages/zh-cn/server-lines.json
index 6a7ff2f..15a5971 100644
--- a/app/frontend/src/lib/core/i18n/messages/zh-cn/server-lines.json
+++ b/app/frontend/src/lib/core/i18n/messages/zh-cn/server-lines.json
@@ -839,7 +839,7 @@
"server.migrate.holyarrs-reads-trakt-lists-and-watchlists": "HolyArrs 读取 Trakt 列表和待看清单;已观看或收藏的列表仍留在 Radarr",
"server.migrate.holyarrs-sets-one-proxy-address-per": "HolyArrs 每个来源只设一个代理地址;请在用过它的来源上设置",
"server.migrate.holyarrs-stopped-during-this-import-before": "HolyArrs 在这次导入完成之前停止了。它已创建的内容带有标记:再导入一次即可完成(不会重复添加),也可以撤销。",
- "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs 只支持 qBittorrent、Transmission、Deluge、SABnzbd 和 NZBGet",
+ "server.migrate.holyarrs-talks-to-qbittorrent-transmission-deluge": "HolyArrs 只支持 qBittorrent、Transmission、Deluge、rTorrent、SABnzbd 和 NZBGet",
"server.migrate.holyarrs-uses-one-category-of-its": "HolyArrs 为每个下载器使用一个自己的分类(holyarrs)",
"server.migrate.holyarrs-writes-no-metadata-files-for": "HolyArrs 不会为媒体播放器写元数据文件",
"server.migrate.import-row-was-replaced": "导入的这一行已被替换",
diff --git a/app/frontend/src/lib/core/i18n/messages/zh-cn/settings-downloaders.json b/app/frontend/src/lib/core/i18n/messages/zh-cn/settings-downloaders.json
index 4054028..e434995 100644
--- a/app/frontend/src/lib/core/i18n/messages/zh-cn/settings-downloaders.json
+++ b/app/frontend/src/lib/core/i18n/messages/zh-cn/settings-downloaders.json
@@ -2,6 +2,7 @@
"settings.downloaders.catSab": "必须已存在于 SABnzbd 中。",
"settings.downloaders.catTransmission": "作为 Transmission 标签保存;需要 Transmission 4 或更高版本。",
"settings.downloaders.catDeluge": "作为 Deluge 标签保存;所连接的守护进程需要启用 Label 插件。",
+ "settings.downloaders.catRtorrent": "作为 rTorrent 标签保存,显示在 ruTorrent 的 Label 列中。",
"settings.downloaders.catNzbget": "作为 NZBGet 分类发送。",
"settings.downloaders.catQbit": "如果 qBittorrent 中没有,会自动创建。",
"settings.downloaders.saved": "{name} 已保存",
@@ -52,6 +53,7 @@
"settings.downloaders.secretDeluge": "Deluge 网页界面的密码。",
"settings.downloaders.secretKept": "加密保存,不会再次显示。把地址改到另一台主机时需要重新输入。",
"settings.downloaders.delugeNote": "Deluge 网页界面必须连接到已启用 Label 插件的守护进程",
+ "settings.downloaders.rtorrentNote": "请使用 XML-RPC 地址:/RPC2(crazymax 镜像中为端口 8000),或 ruTorrent 的 /plugins/httprpc/action.php。rTorrent 无法删除文件,因此 HolyArrs 会在它能访问到的位置自行删除。如果是种子盒,请为同步写入的文件夹添加一组路径。",
"settings.downloaders.moreOptions": "更多选项",
"settings.downloaders.local": "访问本地网络",
"settings.downloaders.localHint": "大多数环境下应开启",
@@ -91,6 +93,8 @@
"settings.downloaders.removeFailedHint": "它们的文件也会一并删除",
"settings.downloaders.autoAdd": "把匹配的条目加入你的媒体库",
"settings.downloaders.autoAddHint": "下载器中已有的确定匹配项,无需搜索就会被加入",
+ "settings.downloaders.sabOutside": "显示其他应用发送的 Usenet 任务",
+ "settings.downloaders.sabOutsideHint": "共享的 SABnzbd 或 NZBGet 中其他分类的任务会以只读方式显示在下载页。HolyArrs 永远不会匹配它们。",
"settings.downloaders.whenRemove": "移除下载时",
"settings.downloaders.deleteFiles": "删除它的文件",
"settings.downloaders.turnDown": "排除它的资源",
diff --git a/app/frontend/src/lib/core/i18n/messages/zh-cn/settings-index.json b/app/frontend/src/lib/core/i18n/messages/zh-cn/settings-index.json
index 5c24d75..4f54f54 100644
--- a/app/frontend/src/lib/core/i18n/messages/zh-cn/settings-index.json
+++ b/app/frontend/src/lib/core/i18n/messages/zh-cn/settings-index.json
@@ -206,7 +206,7 @@
"settings.index.search.search-now.search-now.label": "立即搜索",
"settings.index.search.search-now.search-now.words": "搜索 更好的副本 订阅源 运行 search better copy feeds run",
"settings.index.downloaders.downloaders-card.downloaders.label": "下载器",
- "settings.index.downloaders.downloaders-card.downloaders.words": "下载客户端 qbittorrent sabnzbd transmission deluge nzbget 种子客户端 添加 download client qbittorrent sabnzbd transmission deluge nzbget torrent client add",
+ "settings.index.downloaders.downloaders-card.downloaders.words": "下载客户端 qbittorrent sabnzbd transmission deluge rtorrent rutorrent nzbget 种子客户端 添加 download client qbittorrent sabnzbd transmission deluge rtorrent rutorrent nzbget torrent client add",
"settings.index.downloaders.st-stall.stalled-after.label": "多少小时后算停滞",
"settings.index.downloaders.st-stall.stalled-after.words": "停滞 卡住 小时 下载 stalled stuck hours download",
"settings.index.downloaders.st-act.give-up-and-try-the-next-release-after.label": "放弃并尝试下一个资源的等待时间",
diff --git a/app/frontend/src/lib/core/test-tag.test.ts b/app/frontend/src/lib/core/test-tag.test.ts
index c4450a5..21c0d34 100644
--- a/app/frontend/src/lib/core/test-tag.test.ts
+++ b/app/frontend/src/lib/core/test-tag.test.ts
@@ -10,6 +10,7 @@ describe('test tag words', () => {
});
it('names the app and adds a count', () => {
expect(testLabel('It answered: qbittorrent 5.1.2.')).toBe('qBittorrent v5.1.2');
+ expect(testLabel('It answered: rtorrent 0.16.25')).toBe('rTorrent v0.16.25');
expect(testLabel('Prowlarr 1.30.2.4939 answered.', 'Prowlarr', '3 indexers')).toBe('Prowlarr v1.30.2 · 3 indexers');
expect(testLabel('The Source answered.')).toBe('Connected');
expect(testLabel('The feed answered with 2 Releases.', '', testCount('The feed answered with 2 Releases.'))).toBe('Connected · 2 Releases');
diff --git a/app/frontend/src/lib/core/test-tag.ts b/app/frontend/src/lib/core/test-tag.ts
index 3aa1dc7..8463dfa 100644
--- a/app/frontend/src/lib/core/test-tag.ts
+++ b/app/frontend/src/lib/core/test-tag.ts
@@ -8,6 +8,7 @@ const apps: Record<string, string> = {
transmission: 'Transmission',
nzbget: 'NZBGet',
deluge: 'Deluge',
+ rtorrent: 'rTorrent',
prowlarr: 'Prowlarr',
jackett: 'Jackett',
sonarr: 'Sonarr',
diff --git a/app/frontend/src/lib/downloads/ConfirmMatch.svelte b/app/frontend/src/lib/downloads/ConfirmMatch.svelte
index 3e2d72b..8b372cb 100644
--- a/app/frontend/src/lib/downloads/ConfirmMatch.svelte
+++ b/app/frontend/src/lib/downloads/ConfirmMatch.svelte
@@ -1,6 +1,6 @@
<script lang="ts">
import { t } from '#lib/core/i18n/i18n.svelte.ts';
- // Sheet for torrents added outside HolyArrs that could not be matched to one title for sure. Picking a choice adds the title if missing and links the torrent. Reads only from HolyArrs, no outside lookups.
+ // Sheet for downloads added outside HolyArrs that could not be matched to one title for sure (never other apps' Usenet categories). Picking a choice adds the title if missing and links the download. Reads only from HolyArrs, no outside lookups.
import Sheet from '#lib/ui/Sheet.svelte';
import Button from '#lib/ui/Button.svelte';
import { bannerWords, candidateLine, type Match, type Matches } from './matches.ts';
diff --git a/app/frontend/src/lib/downloads/DlEmpty.svelte b/app/frontend/src/lib/downloads/DlEmpty.svelte
new file mode 100644
index 0000000..59c7977
--- /dev/null
+++ b/app/frontend/src/lib/downloads/DlEmpty.svelte
@@ -0,0 +1,18 @@
+<script lang="ts">
+ import { t } from '#lib/core/i18n/i18n.svelte.ts';
+ import GhostEmpty from './GhostEmpty.svelte';
+ import type { Empty } from './status-tabs.ts';
+
+ // The empty list's words and its one way on. A tab whose torrents are not loaded yet says so (left of them), not that there are none.
+ let { em, left = 0, more = false, onclear, onall, onmore }: { em: Empty; left?: number; more?: boolean; onclear: () => void; onall: () => void; onmore?: () => void } = $props();
+ const shown = $derived(left > 0 ? { title: t('downloads.page.notLoaded.title'), text: t('downloads.page.notLoaded.text', { count: left.toLocaleString() }), act: more ? 'more' : '', label: t('downloads.page.showMore') } : { title: em.title, text: em.text, act: em.action?.act ?? '', label: em.action?.label ?? '' });
+ const run = () => (shown.act === 'clear' ? onclear() : shown.act === 'all' ? onall() : onmore?.());
+</script>
+
+{#key shown.title}
+ <GhostEmpty title={shown.title} text={shown.text}>
+ {#snippet action()}
+ {#if shown.act}<button type="button" data-testid="dl-empty-act" onclick={run}>{shown.label}</button>{/if}
+ {/snippet}
+ </GhostEmpty>
+{/key}
diff --git a/app/frontend/src/lib/downloads/DlMoreNote.svelte b/app/frontend/src/lib/downloads/DlMoreNote.svelte
new file mode 100644
index 0000000..3644d4e
--- /dev/null
+++ b/app/frontend/src/lib/downloads/DlMoreNote.svelte
@@ -0,0 +1,31 @@
+<script lang="ts">
+ import { t } from '#lib/core/i18n/i18n.svelte.ts';
+ import type { moreOf } from './status-tabs.ts';
+
+ // Torrents HolyArrs did not add that the page has not loaded yet: a note under the tabs, or Show more at the end of the list.
+ let { mo, filtered = false, loaded, capMax, onmore, end = false }: { mo: ReturnType<typeof moreOf>; filtered?: boolean; loaded: number; capMax: number; onmore?: () => void; end?: boolean } = $props();
+</script>
+
+{#if end}
+ {#if mo.more}<p class="more"><button type="button" class="mn" onclick={() => onmore?.()} data-testid="dl-outside-more">{t('downloads.page.showMore')}</button></p>{/if}
+{:else if mo.left > 0}
+ <p class="morenote" id="dl-morenote" data-testid="dl-morenote">
+ {#if mo.more}<span>{t(filtered ? 'downloads.page.partialFiltered' : 'downloads.page.partial', { shown: loaded.toLocaleString(), total: mo.total.toLocaleString() })}</span><button type="button" class="mn" onclick={() => onmore?.()} data-testid="dl-outside-more-top">{t('downloads.page.showMore')}</button>
+ {:else}<span>{t('downloads.page.capped', { max: capMax.toLocaleString(), total: mo.total.toLocaleString() })}</span>{/if}
+ </p>
+{/if}
+
+<style>
+ .morenote { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 0; padding: 4px var(--dl-gutter); border-bottom: 1px solid var(--line); color: var(--text-muted); font: 400 12px/16px var(--font-ui); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
+ .more { display: flex; justify-content: center; margin: 0; padding: 12px var(--dl-gutter) 16px; color: var(--text-muted); font: 400 12px/16px var(--font-ui); text-align: center; }
+ .mn { min-height: 24px; padding: 0 4px; border: 0; background: none; color: var(--accent-text); font: inherit; font-weight: 600; cursor: pointer; }
+ .mn:hover { text-decoration: underline; }
+ .mn:focus-visible { outline: none; border-radius: 4px; box-shadow: var(--focus-ring); }
+ /* Desktop: the tab row has no line under it, so neither does the note. */
+ @media (min-width: 641px) { .morenote { border-bottom: 0; } }
+ /* Touch phones get a 44px target; the hit area grows with an invisible ::after so nothing moves. */
+ @media (max-width: 767px) and (pointer: coarse) {
+ .mn { position: relative; }
+ .mn::after { content: ''; position: absolute; inset: -10px 0; }
+ }
+</style>
diff --git a/app/frontend/src/lib/downloads/DlMorePop.svelte b/app/frontend/src/lib/downloads/DlMorePop.svelte
index 4e2a730..ab82e34 100644
--- a/app/frontend/src/lib/downloads/DlMorePop.svelte
+++ b/app/frontend/src/lib/downloads/DlMorePop.svelte
@@ -1,7 +1,7 @@
<script lang="ts">
import { t } from '#lib/core/i18n/i18n.svelte.ts';
import Popover from '#lib/ui/Popover.svelte';
- import { size as bytes } from './size.ts';
+ import { freeSize, size as bytes } from './size.ts';
import { CONN_HINT, CONN_WORD } from './pane-facts.ts';
import type { Downloaders } from './clients.svelte.ts';
@@ -31,7 +31,7 @@
{:else if s}
<div class="mcg">
<span><small>{t('downloads.pf.down')}</small>{bytes(s.speed)}/s</span>
- {#if usenet}<span><small>{t('downloads.more.free')}</small>{s.free_space ? bytes(s.free_space) : '–'}</span><span><small>{t('downloads.day.today')}</small>{s.day_down ? bytes(s.day_down) : '–'}</span>
+ {#if usenet}<span><small>{t('downloads.more.free')}</small>{s.free_space ? freeSize(s.free_space) : '–'}</span><span><small>{t('downloads.day.today')}</small>{s.day_down ? bytes(s.day_down) : '–'}</span>
{:else}<span><small>{t('downloads.pf.up')}</small>{bytes(s.up_speed)}/s</span><span data-testid="sb-session"><small>{t('downloads.more.session')}</small>↑ {bytes(s.session_up)}</span>{/if}
</div>
{#if s.slow_mode != null}<label class="slow"><span>{t('downloads.more.slow')}</span><input type="checkbox" role="switch" checked={s.slow_mode} disabled={watch || dls.slowBusy === c.id} onchange={(e) => dls.setSlow(c, e.currentTarget.checked)} data-testid="sb-slow" /></label>{/if}
diff --git a/app/frontend/src/lib/downloads/DlRow.svelte b/app/frontend/src/lib/downloads/DlRow.svelte
index fd010df..bb29d65 100644
--- a/app/frontend/src/lib/downloads/DlRow.svelte
+++ b/app/frontend/src/lib/downloads/DlRow.svelte
@@ -246,11 +246,13 @@
.pm[data-tone='qb'] { --cm: #2f6fd6; }
.pm[data-tone='tr'] { --cm: #d23c3c; }
.pm[data-tone='de'] { --cm: #5b7388; }
+ .pm[data-tone='rt'] { --cm: #7b4fc9; }
.pm[data-tone='sab'] { --cm: #a87a00; }
.pm[data-tone='nzb'] { --cm: #2e8b4a; }
:global([data-theme='dark']) .pm[data-tone='qb'] { --cm: #7aa8f5; }
:global([data-theme='dark']) .pm[data-tone='tr'] { --cm: #f07a7a; }
:global([data-theme='dark']) .pm[data-tone='de'] { --cm: #9db3c6; }
+ :global([data-theme='dark']) .pm[data-tone='rt'] { --cm: #b99af2; }
:global([data-theme='dark']) .pm[data-tone='sab'] { --cm: #f0c84a; }
:global([data-theme='dark']) .pm[data-tone='nzb'] { --cm: #6cd08c; }
.sw1 { display: grid; grid-template-columns: 42px 42px auto; column-gap: 4px; align-items: center; justify-content: start; }
@@ -319,6 +321,7 @@
:global(:root:not([data-theme='light'])) .pm[data-tone='qb'] { --cm: #7aa8f5; }
:global(:root:not([data-theme='light'])) .pm[data-tone='tr'] { --cm: #f07a7a; }
:global(:root:not([data-theme='light'])) .pm[data-tone='de'] { --cm: #9db3c6; }
+ :global(:root:not([data-theme='light'])) .pm[data-tone='rt'] { --cm: #b99af2; }
:global(:root:not([data-theme='light'])) .pm[data-tone='sab'] { --cm: #f0c84a; }
:global(:root:not([data-theme='light'])) .pm[data-tone='nzb'] { --cm: #6cd08c; }
}
diff --git a/app/frontend/src/lib/downloads/DlSections.svelte b/app/frontend/src/lib/downloads/DlSections.svelte
index 4b44afb..a9a4ea3 100644
--- a/app/frontend/src/lib/downloads/DlSections.svelte
+++ b/app/frontend/src/lib/downloads/DlSections.svelte
@@ -17,15 +17,16 @@
import { Downloaders } from './clients.svelte.ts';
import { PaneDetail } from './pane-detail.svelte.ts';
import { tabsOf, type PaneTab } from './pane-facts.ts';
- import GhostEmpty from './GhostEmpty.svelte';
+ import DlMoreNote from './DlMoreNote.svelte';
+ import DlEmpty from './DlEmpty.svelte';
import { reviewCount, reviewWord } from './status-views.ts';
import { listEsc, reviewShown, searchShortcut } from './keys.ts';
import { overlayScroll } from './overlay-scroll.ts';
import { dlTop } from './dl-top.svelte.ts';
- import { size as bytes, categoryWords, protocolOf, type KindKey } from './size.ts';
+ import { size as bytes, freeSize, categoryWords, protocolOf, type KindKey } from './size.ts';
import { kindOf, rowName } from './downloaders.ts';
import type { ImportRecord } from './types.ts';
- import { ALL, counts, emptyOf, pick, showOf, statusWord, subCounts, tabsFor } from './status-tabs.ts';
+ import { ALL, counts, emptyOf, moreOf, pick, showOf, statusWord, subCounts, tabsFor, withRest, type Rest } from './status-tabs.ts';
import { controllable, pausable } from './usenet.ts';
import { poster, who } from './row-art.ts';
import { byTracker, countLabel, pickRange, problemWords, toolbarTargets, trackerOptions, type BulkAction, type SteerMode } from './manage.ts';
@@ -70,7 +71,8 @@
changeOutside = true,
batchBusy = false,
watch = false,
- upTotal
+ upTotal,
+ outside = { rest: {}, canMore: false, capMax: 0 }
}: {
rows: DownloadRow[];
/** Notes from the page, such as a Downloader not answering, shown in the status popover. */
@@ -104,6 +106,7 @@
watch?: boolean;
/** Upload speed summed by the server over every sending row; falls back to the rows on hand. */
upTotal?: number;
+ outside?: { rest: Rest; canMore: boolean; capMax: number; onmore?: () => void }; // torrents left out of this page (tabs count them too), whether more can load, and how
} = $props();
let kindOn = $state<KindKey>('');
const typed = $derived(kindOn ? everyRow.filter((r) => kindOf(r) === kindOn) : everyRow);
@@ -142,12 +145,15 @@
}
}
const tabs = $derived(tabsFor(rows, torrent));
- const tally = $derived(counts(rows, tabs));
+ const filtered = $derived(!!(kindOn || q.trim() || trackKey)); // Unloaded torrents count on their tabs too (Torrent or Usenet filter included); other filters check loaded rows only.
+ const mo = $derived(moreOf({ rest: outside.rest, src: srcOn, partial: filtered, loaded: everyRow.filter((r) => r.client_item && (!srcOn || protocolOf(r) === srcOn)).length, canMore: outside.canMore }));
+ const tally = $derived(withRest(counts(rows, tabs), tabs, mo.extra));
const on = $derived(tabs.some((c) => c.key === show) ? show : ALL);
const onTab = $derived(tabs.find((c) => c.key === on));
- const subs = $derived(subCounts(rows, onTab));
+ const subs = $derived(withRest(subCounts(rows, onTab), onTab?.subs ?? [], mo.extra));
const subOn = $derived(subs.some((x) => x.key === sub) ? sub : '');
const shown = $derived(pick(rows, tabs, on, subOn));
+ const restHere = $derived((onTab?.subs.find((x) => x.key === subOn)?.stages ?? onTab?.stages ?? []).reduce((a, s) => a + (mo.extra[s] ?? 0), 0)); // not loaded yet, on this tab
function choose(k: string) {
show = k;
sub = '';
@@ -541,7 +547,7 @@
{#snippet pills()}
{#each tally as c (c.key)}
{@const t = tabs.find((x) => x.key === c.key)}
- {@const so = t ? subCounts(rows, t) : []}
+ {@const so = t ? withRest(subCounts(rows, t), t.subs, mo.extra) : []}
{@const open = on === c.key && so.length > 0}
<div class="pw" class:on={on === c.key} class:open class:leaf={on === c.key && !subOn} data-key={c.key}>
<button type="button" role="tab" class="tab" class:zero={c.count === 0} aria-selected={on === c.key} tabindex={on === c.key ? 0 : -1} data-nav data-testid="rail-item" data-key={c.key} data-count={c.count} onclick={() => choose(c.key)}><span class="lb">{c.label}</span><b class="n">{c.count}</b></button>
@@ -573,8 +579,9 @@
<div class="body">
<div class="col" bind:this={colEl}>
<!-- svelte-ignore a11y_no_static_element_interactions -->
-<div class="tabrow" data-testid="dl-tabrow" onkeydown={navKey}><div class="tabs" role="tablist" aria-label={t('downloads.list.status')}>{@render pills()}</div>{#if problemWords(trackProblems)}<button type="button" class="trchip" class:on={trackKey === 'p:any'} aria-pressed={trackKey === 'p:any'} onclick={() => (trackOn = trackKey === 'p:any' ? '' : 'p:any')} data-testid="dl-tracker-issues">{problemWords(trackProblems)}</button>{/if}<DlStatus down="{bytes(sum.speed)}/s" up={noUp ? '' : `${bytes(upSum)}/s`} eta={etaWords} free={dls.freeAll.length ? bytes(Math.min(...dls.freeAll)) : ''} today={dls.sumOf('day_down') ? bytes(dls.sumOf('day_down')) : ''} session={dls.sumOf('session_down') ? bytes(dls.sumOf('session_down')) : ''} review={reviewShown(watch, toReview)} onreview={openReview} more={morePop} limit={Number.isFinite(capNow) ? `${bytes(capNow)}/s` : ''} onlimit={watch ? undefined : onlimit} /></div>
-<p class="qline" data-testid="dl-qline">{#if onlimit && !watch}<button type="button" class="qd qbtn" onclick={() => onlimit?.()} title={Number.isFinite(capNow) ? t('downloads.list.limitChange', { speed: `${bytes(capNow)}/s` }) : t('downloads.list.setLimit')} data-testid="dl-q-down"><span class="sr">{t('downloads.list.speedSr')} </span>↓ {bytes(sum.speed)}/s{#if Number.isFinite(capNow)}<span class="qcap"><Icon name="gauge" size={12} /><span class="sr">{t('downloads.list.limitSr')} </span>{bytes(capNow)}/s</span>{:else}<span class="sr">. {t('downloads.list.setLimit')}</span>{/if}</button>{:else}<span class="qd" data-testid="dl-q-down">↓ {bytes(sum.speed)}/s</span>{/if}{#if dls.freeAll.length}<span class="qs" aria-hidden="true">·</span><span data-testid="dl-q-free">{t('downloads.list.free', { size: bytes(Math.min(...dls.freeAll)) })}</span>{/if}{#if etaWords}<span class="qs" aria-hidden="true">·</span><span>{t('downloads.list.left', { time: etaWords })}</span>{/if}{#if reviewShown(watch, toReview)}<button type="button" class="qrv" onclick={openReview} data-testid="dl-q-review">{reviewWord(toReview)}</button>{/if}</p>
+<div class="tabrow" data-testid="dl-tabrow" onkeydown={navKey}><div class="tabs" role="tablist" aria-label={t('downloads.list.status')} aria-describedby={mo.left > 0 ? 'dl-morenote' : undefined}>{@render pills()}</div>{#if problemWords(trackProblems)}<button type="button" class="trchip" class:on={trackKey === 'p:any'} aria-pressed={trackKey === 'p:any'} onclick={() => (trackOn = trackKey === 'p:any' ? '' : 'p:any')} data-testid="dl-tracker-issues">{problemWords(trackProblems)}</button>{/if}<DlStatus down="{bytes(sum.speed)}/s" up={noUp ? '' : `${bytes(upSum)}/s`} eta={etaWords} free={dls.freeAll.length ? freeSize(Math.min(...dls.freeAll)) : ''} today={dls.sumOf('day_down') ? bytes(dls.sumOf('day_down')) : ''} session={dls.sumOf('session_down') ? bytes(dls.sumOf('session_down')) : ''} review={reviewShown(watch, toReview)} onreview={openReview} more={morePop} limit={Number.isFinite(capNow) ? `${bytes(capNow)}/s` : ''} onlimit={watch ? undefined : onlimit} /></div>
+<DlMoreNote {mo} {filtered} loaded={mo.loaded} capMax={outside.capMax} onmore={outside.onmore} />
+<p class="qline" data-testid="dl-qline">{#if onlimit && !watch}<button type="button" class="qd qbtn" onclick={() => onlimit?.()} title={Number.isFinite(capNow) ? t('downloads.list.limitChange', { speed: `${bytes(capNow)}/s` }) : t('downloads.list.setLimit')} data-testid="dl-q-down"><span class="sr">{t('downloads.list.speedSr')} </span>↓ {bytes(sum.speed)}/s{#if Number.isFinite(capNow)}<span class="qcap"><Icon name="gauge" size={12} /><span class="sr">{t('downloads.list.limitSr')} </span>{bytes(capNow)}/s</span>{:else}<span class="sr">. {t('downloads.list.setLimit')}</span>{/if}</button>{:else}<span class="qd" data-testid="dl-q-down">↓ {bytes(sum.speed)}/s</span>{/if}{#if dls.freeAll.length}<span class="qs" aria-hidden="true">·</span><span data-testid="dl-q-free">{t('downloads.list.free', { size: freeSize(Math.min(...dls.freeAll)) })}</span>{/if}{#if etaWords}<span class="qs" aria-hidden="true">·</span><span>{t('downloads.list.left', { time: etaWords })}</span>{/if}{#if reviewShown(watch, toReview)}<button type="button" class="qrv" onclick={openReview} data-testid="dl-q-review">{reviewWord(toReview)}</button>{/if}</p>
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
<div class="listbox" bind:this={cols.listEl} data-testid="dl-listbox" use:overlayScroll={{ header: ".chead" }}>
{#if (pickedRows.length || selecting) && !watch}
@@ -586,18 +593,11 @@
<ul class="dlrows" class:vw={cols.windowed} bind:this={cols.ulEl} data-testid="dl-list" data-tab={on} data-rows={list.length} style={cols.windowed ? `padding-top: ${cols.span.a * cols.rh}px; padding-bottom: ${(list.length - cols.span.b) * cols.rh}px` : undefined}>
{#each cols.shownRows as r (r.id)}<DlRow {r} hist={inHistory(r)} {cols} {watch} {picked} {choosing} {openId} {tabRow} {importOf} {titles} {titlesReady} {rowMenu} onpickone={pickOne} onpickto={pickTo} onrowclick={rowClick} onrowkey={rowKey} onrowfocus={(id) => (rowFocus = id)} />{/each}
</ul>
+ <DlMoreNote {mo} loaded={mo.loaded} capMax={outside.capMax} onmore={outside.onmore} end />
</div></div>
{:else}
- {@const em = emptyOf(on, subOn, q, kindOn, tabs, srcOn)}
<div class="tw" data-testid="dl-tablebox"><div class="tin">{@render header()}</div></div>
- {#key em.title}
- <GhostEmpty title={em.title} text={em.text}>
- {#snippet action()}
- {#if em.action?.act === 'clear'}<button type="button" data-testid="dl-empty-act" onclick={() => (dlScope.term = '')}>{em.action.label}</button>
- {:else if em.action?.act === 'all'}<button type="button" data-testid="dl-empty-act" onclick={() => { kindOn = ''; srcOn = ''; }}>{em.action.label}</button>{/if}
- {/snippet}
- </GhostEmpty>
- {/key}
+ <DlEmpty em={emptyOf(on, subOn, q, kindOn, tabs, srcOn)} left={restHere} more={mo.more} onclear={() => (dlScope.term = '')} onall={() => { kindOn = ''; srcOn = ''; }} onmore={outside.onmore} />
{/if}
</div>
{#if openRow}
diff --git a/app/frontend/src/lib/downloads/downloaders.test.ts b/app/frontend/src/lib/downloads/downloaders.test.ts
index 1e71d7d..95dd005 100644
--- a/app/frontend/src/lib/downloads/downloaders.test.ts
+++ b/app/frontend/src/lib/downloads/downloaders.test.ts
@@ -52,7 +52,7 @@ describe('downloaders', () => {
});
it('preserves optional Downloader sign-in names and labels', () => {
- for (const [kind, name] of [['transmission', 'Transmission'], ['nzbget', 'NZBGet'], ['deluge', 'Deluge']] as const) {
+ for (const [kind, name] of [['transmission', 'Transmission'], ['nzbget', 'NZBGet'], ['deluge', 'Deluge'], ['rtorrent', 'rTorrent']] as const) {
const form = emptyForm(kind);
expect(form.name).toBe(name);
expect(form.category).toBe('holyarrs');
diff --git a/app/frontend/src/lib/downloads/downloaders.ts b/app/frontend/src/lib/downloads/downloaders.ts
index 2f9a1da..215c401 100644
--- a/app/frontend/src/lib/downloads/downloaders.ts
+++ b/app/frontend/src/lib/downloads/downloaders.ts
@@ -17,7 +17,7 @@ export interface PathMap {
export interface DownloaderView {
id: number;
name: string;
- kind: 'qbittorrent' | 'sabnzbd' | 'transmission' | 'nzbget' | 'deluge';
+ kind: 'qbittorrent' | 'sabnzbd' | 'transmission' | 'nzbget' | 'deluge' | 'rtorrent';
protocol: 'torrent' | 'usenet';
url: string;
username: string;
@@ -54,6 +54,8 @@ export interface DownloaderSettings {
remove_search_again: boolean;
/** Add the movie or show of a matched outside item to the Library, without a search. Off by default. */
downloads_auto_add?: boolean;
+ /** Show Usenet jobs in other apps' categories on Downloads, read-only; never matched. On by default. */
+ downloads_sab_outside?: boolean;
}
/** The public recovery record for one uncertain send. It has no Downloader address, request marker or error text on purpose. */
@@ -111,7 +113,8 @@ export const kindWords: Record<DownloaderView['kind'], string> = {
sabnzbd: 'SABnzbd',
transmission: 'Transmission',
nzbget: 'NZBGet',
- deluge: 'Deluge'
+ deluge: 'Deluge',
+ rtorrent: 'rTorrent'
};
/** Colours a Downloader's health chip. */
@@ -191,7 +194,7 @@ export function formBody(f: DownloaderForm): Record<string, unknown> {
name: f.name.trim(),
kind: f.kind,
url: f.url.trim(),
- username: f.kind === 'qbittorrent' || f.kind === 'transmission' || f.kind === 'nzbget' ? f.username.trim() : '',
+ username: f.kind === 'qbittorrent' || f.kind === 'transmission' || f.kind === 'nzbget' || f.kind === 'rtorrent' ? f.username.trim() : '',
secret: f.secret,
category: f.category.trim(),
category_movies: f.category_movies.trim(),
diff --git a/app/frontend/src/lib/downloads/index.ts b/app/frontend/src/lib/downloads/index.ts
index 57e8b60..eb47ee7 100644
--- a/app/frontend/src/lib/downloads/index.ts
+++ b/app/frontend/src/lib/downloads/index.ts
@@ -59,7 +59,7 @@ export { rowName } from './downloaders.ts';
export { rowPath } from './downloaders.ts';
export { searchShortcut } from './keys.ts';
export { sizeFields } from './pick-rules.ts';
-export { stageOf } from './status-tabs.ts';
+export { stageOf, type Rest } from './status-tabs.ts';
export { stepLabel } from './pick-rules.ts';
export { tidyBody } from './pick-rules.ts';
export { timeLeft } from './downloaders.ts';
diff --git a/app/frontend/src/lib/downloads/matches.test.ts b/app/frontend/src/lib/downloads/matches.test.ts
index a33c984..5e91005 100644
--- a/app/frontend/src/lib/downloads/matches.test.ts
+++ b/app/frontend/src/lib/downloads/matches.test.ts
@@ -2,10 +2,10 @@ import { bannerWords, candidateLine } from './matches.ts';
import { describe, expect, it } from 'vitest';
describe('Confirm match words', () => {
- it('counts the torrents waiting', () => {
+ it('counts the downloads waiting, torrent or Usenet', () => {
expect(bannerWords(0)).toBe('');
- expect(bannerWords(1)).toBe('1 torrent needs a match');
- expect(bannerWords(4)).toBe('4 torrents need a match');
+ expect(bannerWords(1)).toBe('1 download needs a match');
+ expect(bannerWords(4)).toBe('4 downloads need a match');
});
it('names a choice by kind and year', () => {
expect(candidateLine({ kind: 'movie', year: 2023 })).toBe('Movie · 2023');
diff --git a/app/frontend/src/lib/downloads/matches.ts b/app/frontend/src/lib/downloads/matches.ts
index f5851b9..4d2fd25 100644
--- a/app/frontend/src/lib/downloads/matches.ts
+++ b/app/frontend/src/lib/downloads/matches.ts
@@ -1,4 +1,4 @@
-// The Confirm match list: torrents in a Downloader that HolyArrs did not send and could not match to a title for sure. Pure helpers.
+// The Confirm match list: downloads in a Downloader that HolyArrs did not send and could not match to a title for sure. Pure helpers.
import { t } from '#lib/core/i18n/i18n.svelte.ts';
export interface MatchCandidate {
diff --git a/app/frontend/src/lib/downloads/panel-words.test.ts b/app/frontend/src/lib/downloads/panel-words.test.ts
index 90ef635..7805828 100644
--- a/app/frontend/src/lib/downloads/panel-words.test.ts
+++ b/app/frontend/src/lib/downloads/panel-words.test.ts
@@ -48,6 +48,7 @@ describe('clientMark', () => {
it('marks each kind', () => {
expect(clientMark('qbittorrent')).toEqual({ mark: 'qB', tone: 'qb' });
expect(clientMark('nzbget').mark).toBe('NZB');
+ expect(clientMark('rtorrent')).toEqual({ mark: 'rT', tone: 'rt' });
expect(clientMark('other').mark).toBe('');
});
});
diff --git a/app/frontend/src/lib/downloads/panel-words.ts b/app/frontend/src/lib/downloads/panel-words.ts
index 239e200..2a4e99b 100644
--- a/app/frontend/src/lib/downloads/panel-words.ts
+++ b/app/frontend/src/lib/downloads/panel-words.ts
@@ -90,6 +90,7 @@ export function clientMark(kind: string | undefined): { mark: string; tone: stri
case 'qbittorrent': return { mark: 'qB', tone: 'qb' };
case 'transmission': return { mark: 'Tr', tone: 'tr' };
case 'deluge': return { mark: 'De', tone: 'de' };
+ case 'rtorrent': return { mark: 'rT', tone: 'rt' };
case 'sabnzbd': return { mark: 'SAB', tone: 'sab' };
case 'nzbget': return { mark: 'NZB', tone: 'nzb' };
}
diff --git a/app/frontend/src/lib/downloads/readonly-menu.test.ts b/app/frontend/src/lib/downloads/readonly-menu.test.ts
index 7def48c..80794b8 100644
--- a/app/frontend/src/lib/downloads/readonly-menu.test.ts
+++ b/app/frontend/src/lib/downloads/readonly-menu.test.ts
@@ -9,9 +9,12 @@ describe("the pane's ⋯ menu", () => {
expect(paneExtras(torrent, { steer: true, fail: true })).toEqual(['recheck', 'reannounce', 'force', 'steer', 'fail']);
expect(paneExtras(torrent, { steer: false, fail: false })).toEqual(['recheck', 'reannounce']);
});
- it('offers Transmission and Deluge none of the qBittorrent-only calls', () => {
+ it('offers Transmission, Deluge and rTorrent none of the qBittorrent-only calls', () => {
expect(paneExtras({ ...torrent, downloader_kind: 'transmission' }, { steer: true, fail: true })).toEqual(['fail']);
expect(paneExtras({ ...torrent, downloader_kind: 'deluge' }, { steer: true, fail: false })).toEqual([]);
+ expect(paneExtras({ ...torrent, downloader_kind: 'rtorrent' }, { steer: true, fail: true })).toEqual(['fail']);
+ expect(paneExtras({ ...torrent, downloader_kind: 'rtorrent', can_act: false }, { steer: true, fail: true })).toEqual([]);
+ expect(rowItems({ ...torrent, downloader_kind: 'rtorrent', can_act: false })).toEqual([]);
});
it('gives a Usenet job only Mark failed beyond its row list, which has its queue moves and priority', () => {
expect(paneExtras(job, { steer: true, fail: true })).toEqual(['fail']);
diff --git a/app/frontend/src/lib/downloads/rowmenu.test.ts b/app/frontend/src/lib/downloads/rowmenu.test.ts
index 5c86401..f12564e 100644
--- a/app/frontend/src/lib/downloads/rowmenu.test.ts
+++ b/app/frontend/src/lib/downloads/rowmenu.test.ts
@@ -31,6 +31,11 @@ describe('row actions menu', () => {
it('keeps Transmission rows to remove', () => {
expect(rowItems({ ...tor, downloader_kind: 'transmission' })).toEqual(['remove']);
});
+ it('gives rTorrent rows pause or resume and remove only', () => {
+ expect(rowItems({ ...tor, downloader_kind: 'rtorrent' })).toEqual(['pause', 'remove']);
+ expect(rowItems({ ...tor, downloader_kind: 'rtorrent', state: 'paused' })).toEqual(['resume', 'remove']);
+ expect(rowItems({ ...tor, downloader_kind: 'rtorrent', can_act: false })).toEqual([]);
+ });
it('never offers a client change on a read-only row', () => {
expect(rowItems({ ...tor, can_act: false, title_id: 4 })).toEqual(['library']);
expect(rowItems({ ...tor, can_act: false })).toEqual([]);
diff --git a/app/frontend/src/lib/downloads/rowmenu.ts b/app/frontend/src/lib/downloads/rowmenu.ts
index 5fbfbf9..bc6b2e9 100644
--- a/app/frontend/src/lib/downloads/rowmenu.ts
+++ b/app/frontend/src/lib/downloads/rowmenu.ts
@@ -66,7 +66,7 @@ export function paneExtras(r: RowBits, opts: { steer: boolean; fail: boolean }):
const torrent = protocolOf(r) === 'torrent';
const client = clientOk(r);
if (client && torrent && controllable(r.downloader_kind)) out.push('recheck', 'reannounce');
- // Force start and the sheets are qBittorrent calls; Transmission and Deluge refuse them.
+ // Force start and the sheets are qBittorrent calls; Transmission, Deluge and rTorrent refuse them.
if (client && torrent && controllable(r.downloader_kind) && opts.steer && !!r.downloader_id && !!r.hash) out.push('force', 'steer');
if (opts.fail) out.push('fail');
return out;
diff --git a/app/frontend/src/lib/downloads/sab-outside-switch.test.ts b/app/frontend/src/lib/downloads/sab-outside-switch.test.ts
new file mode 100644
index 0000000..61cba9b
--- /dev/null
+++ b/app/frontend/src/lib/downloads/sab-outside-switch.test.ts
@@ -0,0 +1,14 @@
+import { readFileSync } from 'node:fs';
+import { describe, expect, it } from 'vitest';
+import { t } from '#lib/core/i18n/i18n.svelte.ts';
+
+const src = readFileSync(new URL('../../routes/settings/downloaders/+page.svelte', import.meta.url), 'utf8');
+
+describe('Settings > Downloaders: other apps Usenet jobs', () => {
+ it('has a switch for downloads_sab_outside, on until the server says', () => {
+ expect(src).toContain('bind:checked={settings.downloads_sab_outside}');
+ expect(src).toMatch(/downloads_sab_outside: true/);
+ expect(t('settings.downloaders.sabOutside')).toBe('Show Usenet jobs other apps sent');
+ expect(t('settings.downloaders.sabOutsideHint')).not.toBe('settings.downloaders.sabOutsideHint');
+ });
+});
diff --git a/app/frontend/src/lib/downloads/size.test.ts b/app/frontend/src/lib/downloads/size.test.ts
index 292a04f..c56d768 100644
--- a/app/frontend/src/lib/downloads/size.test.ts
+++ b/app/frontend/src/lib/downloads/size.test.ts
@@ -1,4 +1,4 @@
-import { protocolOf, size } from './size.ts';
+import { protocolOf, size, freeSize } from './size.ts';
import { describe, expect, it } from 'vitest';
describe('size', () => {
@@ -17,6 +17,7 @@ describe('size', () => {
it('names the protocol', () => {
expect(protocolOf({ protocol: 'usenet' })).toBe('usenet');
expect(protocolOf({ downloader_kind: 'qbittorrent' })).toBe('torrent');
+ expect(protocolOf({ downloader_kind: 'rtorrent' })).toBe('torrent');
expect(protocolOf({})).toBe('');
});
});
@@ -32,3 +33,19 @@ describe('categoryWords', () => {
expect(categoryWords('')).toBe('');
});
});
+
+describe('freeSize', () => {
+ it('shows disk space the way the Downloaders do: 1024 steps, one decimal', () => {
+ // qBittorrent's 14.152 TiB, SABnzbd's "14.2 T"
+ expect(freeSize(14.152 * 1024 ** 4)).toBe('14.2 TB');
+ expect(freeSize(10 * 1024 ** 4)).toBe('10.0 TB');
+ expect(freeSize(512.34 * 1024 ** 3)).toBe('512.3 GB');
+ expect(freeSize(700 * 1024 ** 2)).toBe('700 MB');
+ expect(freeSize(0)).toBe('0 B');
+ expect(freeSize(1023.96 * 1024 ** 3)).toBe('1.0 TB');
+ expect(freeSize(1023.6 * 1024 ** 2)).toBe('1.0 GB');
+ });
+ it('leaves download sizes as they are', () => {
+ expect(size(14.152 * 1024 ** 4)).toBe('16 TB');
+ });
+});
diff --git a/app/frontend/src/lib/downloads/size.ts b/app/frontend/src/lib/downloads/size.ts
index a6752f4..01355ab 100644
--- a/app/frontend/src/lib/downloads/size.ts
+++ b/app/frontend/src/lib/downloads/size.ts
@@ -20,13 +20,26 @@ export function size(n: number | null | undefined): string {
return `${t} ${UNITS[i]}`;
}
+/** Free disk space as the Downloaders show it: 1024-based steps, one decimal from GB up ("14.2 TB", "512.3 GB"). */
+export function freeSize(n: number | null | undefined): string {
+ if (!n || n < 0 || !Number.isFinite(n)) return '0 B';
+ let v = n;
+ let i = 0;
+ // Step on the shown (rounded) value, so 1023.96 GB reads 1.0 TB, not 1024.0 GB.
+ while (i < UNITS.length - 1 && (i < 3 ? Math.round(v) : Math.round(v * 10) / 10) >= 1024) {
+ v /= 1024;
+ i++;
+ }
+ return i < 3 ? `${Math.round(v)} ${UNITS[i]}` : `${(Math.round(v * 10) / 10).toFixed(1)} ${UNITS[i]}`;
+}
+
/** A Downloader's protocol from what the row carries. */
export function protocolOf(r: { protocol?: string; downloader_kind?: string }): 'torrent' | 'usenet' | '' {
const p = (r.protocol || '').toLowerCase();
if (p === 'torrent' || p === 'usenet') return p;
const k = (r.downloader_kind || '').toLowerCase();
if (k === 'sabnzbd' || k === 'nzbget') return 'usenet';
- if (k === 'qbittorrent' || k === 'transmission' || k === 'deluge') return 'torrent';
+ if (k === 'qbittorrent' || k === 'transmission' || k === 'deluge' || k === 'rtorrent') return 'torrent';
return '';
}
diff --git a/app/frontend/src/lib/downloads/status-tabs-rest.test.ts b/app/frontend/src/lib/downloads/status-tabs-rest.test.ts
new file mode 100644
index 0000000..a8d6ed6
--- /dev/null
+++ b/app/frontend/src/lib/downloads/status-tabs-rest.test.ts
@@ -0,0 +1,69 @@
+import { TABS, counts, moreOf, restSum, restTotal, subCounts, withRest, type Rest } from './status-tabs.ts';
+import { describe, expect, it } from 'vitest';
+
+type R = { phase: string; state: string; progress: number };
+const seeding = (n: number): R[] => Array.from({ length: n }, () => ({ phase: 'done', state: 'seeding', progress: 1 }));
+const count = (c: { key: string; count: number }[], key: string) => c.find((x) => x.key === key)?.count;
+
+describe('tab counts with torrents the page has not loaded', () => {
+ it('adds the rest the server reports to the loaded rows, so All says every torrent', () => {
+ const rest: Rest = { '1': { protocol: 'torrent', stages: { seeding: 682, downloading: 1 } } };
+ const c = withRest(counts(seeding(200), TABS), TABS, restSum(rest));
+ expect(count(c, 'active')).toBe(883);
+ expect(count(c, 'done')).toBe(882);
+ expect(count(c, 'progress')).toBe(1);
+ expect(count(c, 'waiting')).toBe(0);
+ });
+
+ it('keeps counting loaded rows live: one that moves stage moves tabs, with no count left behind', () => {
+ const rest: Rest = { '1': { protocol: 'torrent', stages: { seeding: 682 } } };
+ const loaded: R[] = [...seeding(199), { phase: 'downloading', state: 'downloading', progress: 0.3 }];
+ const before = withRest(counts(loaded, TABS), TABS, restSum(rest));
+ loaded[199] = { phase: 'done', state: 'seeding', progress: 1 };
+ const after = withRest(counts(loaded, TABS), TABS, restSum(rest));
+ expect(count(before, 'progress')).toBe(1);
+ expect(count(after, 'progress')).toBe(0);
+ expect(count(after, 'done')).toBe((count(before, 'done') ?? 0) + 1);
+ expect(count(after, 'active')).toBe(count(before, 'active'));
+ });
+
+ it('sums every Downloader and gives sub-tabs their share', () => {
+ const extra = restSum({ '1': { protocol: 'torrent', stages: { downloading: 2, stalled: 3 } }, '2': { protocol: 'usenet', stages: { downloading: 1, queued: 4 } } });
+ expect(extra).toEqual({ downloading: 3, stalled: 3, queued: 4 });
+ expect(restTotal(extra)).toBe(10);
+ const progress = TABS.find((t) => t.key === 'progress');
+ const subs = withRest(subCounts([], progress), progress?.subs ?? [], extra);
+ expect(count(subs, 'downloading')).toBe(6);
+ expect(count(subs, 'checking')).toBe(0);
+ });
+
+ it('changes nothing when the page holds every torrent', () => {
+ const loaded = seeding(5);
+ expect(withRest(counts(loaded, TABS), TABS, restSum({}))).toEqual(counts(loaded, TABS));
+ expect(restTotal(restSum({}))).toBe(0);
+ });
+
+ it('follows the source filter: Torrent offers more while torrents are left, Usenet never does when none are', () => {
+ const rest: Rest = { '1': { protocol: 'torrent', stages: { seeding: 682, downloading: 1 } } };
+ const torrent = moreOf({ rest, src: 'torrent', partial: false, loaded: 200, canMore: true });
+ expect(torrent.more).toBe(true);
+ expect(torrent.total).toBe(883);
+ const usenet = moreOf({ rest, src: 'usenet', partial: false, loaded: 0, canMore: true });
+ expect(usenet.more).toBe(false);
+ expect(usenet.left).toBe(0);
+ expect(usenet.extra).toEqual({});
+ // Back to Torrent (and to All): the offer is there again, with the same numbers.
+ expect(moreOf({ rest, src: 'torrent', partial: false, loaded: 200, canMore: true })).toEqual(torrent);
+ expect(moreOf({ rest, src: '', partial: false, loaded: 200, canMore: true }).more).toBe(true);
+ });
+
+ it('keeps the note but stops adding to the counts under another filter, and says capped at the limit', () => {
+ const rest: Rest = { '1': { protocol: 'torrent', stages: { seeding: 10 } } };
+ const searched = moreOf({ rest, src: '', partial: true, loaded: 2000, canMore: true });
+ expect(searched.extra).toEqual({});
+ expect(searched.more).toBe(true);
+ const atCap = moreOf({ rest, src: '', partial: false, loaded: 2000, canMore: false });
+ expect(atCap.more).toBe(false);
+ expect(atCap.capped).toBe(true);
+ });
+});
diff --git a/app/frontend/src/lib/downloads/status-tabs.ts b/app/frontend/src/lib/downloads/status-tabs.ts
index 2d77d84..141a56b 100644
--- a/app/frontend/src/lib/downloads/status-tabs.ts
+++ b/app/frontend/src/lib/downloads/status-tabs.ts
@@ -139,6 +139,47 @@ export function counts(rows: RowBits[], tabs: Tab[]): Counted[] {
return out;
}
+/** Torrents a view answer left out, per Downloader id: its protocol and how many per stage (its outside_rest). */
+export type Rest = Record<string, { protocol?: string; stages?: Partial<Record<Stage, number>> }>;
+
+/** The left-out torrents of every Downloader, per stage; with src only those of that protocol. */
+export function restSum(rest: Rest, src = ''): Partial<Record<Stage, number>> {
+ const out: Partial<Record<Stage, number>> = {};
+ for (const e of Object.values(rest)) {
+ if (src && e.protocol !== src) continue;
+ for (const [s, n] of Object.entries(e.stages ?? {}) as [Stage, number][]) out[s] = (out[s] ?? 0) + n;
+ }
+ return out;
+}
+
+/** How many torrents were left out in all. */
+export function restTotal(extra: Partial<Record<Stage, number>>): number {
+ return Object.values(extra).reduce((a, n) => a + (n ?? 0), 0);
+}
+
+/** Counts of the loaded rows plus the left-out torrents on each tab's (or sub-tab's) stages. */
+export function withRest(c: Counted[], groups: { key: string; stages: Stage[] }[], extra: Partial<Record<Stage, number>>): Counted[] {
+ return c.map((x) => {
+ const g = groups.find((y) => y.key === x.key);
+ return g ? { ...x, count: x.count + g.stages.reduce((a, s) => a + (extra[s] ?? 0), 0) } : x;
+ });
+}
+
+/** What the page says about torrents it has not loaded, for the source filter on (src) and whether another filter is on (partial). */
+export function moreOf(o: { rest: Rest; src: '' | 'usenet' | 'torrent'; partial: boolean; loaded: number; canMore: boolean }) {
+ const left = restSum(o.rest, o.src);
+ const n = restTotal(left);
+ return {
+ // Added to tab counts; another filter can only be checked against loaded rows.
+ extra: o.partial ? {} : left,
+ left: n,
+ loaded: o.loaded,
+ total: o.loaded + n,
+ more: n > 0 && o.canMore,
+ capped: n > 0 && !o.canMore
+ };
+}
+
/** A tab's sub-tabs with their counts. */
export function subCounts(rows: RowBits[], tab: Tab | undefined): Counted[] {
if (!tab) return [];
diff --git a/app/frontend/src/lib/downloads/usenet.test.ts b/app/frontend/src/lib/downloads/usenet.test.ts
index 2e384f5..9258da1 100644
--- a/app/frontend/src/lib/downloads/usenet.test.ts
+++ b/app/frontend/src/lib/downloads/usenet.test.ts
@@ -71,7 +71,13 @@ describe('controllable', () => {
expect(controllable('qbittorrent')).toBe(true);
expect(controllable('sabnzbd')).toBe(true);
expect(controllable(undefined)).toBe(true);
- for (const k of ['transmission', 'deluge', 'nzbget']) expect(controllable(k)).toBe(false);
+ for (const k of ['transmission', 'deluge', 'nzbget', 'rtorrent']) expect(controllable(k)).toBe(false);
expect(pausable({ protocol: 'torrent', phase: 'downloading', downloader_kind: 'deluge' })).toBe(false);
});
+ it('lets rTorrent pause and resume but take no other row control', () => {
+ expect(controllable('rtorrent')).toBe(false);
+ expect(pausable({ protocol: 'torrent', phase: 'downloading', downloader_kind: 'rtorrent' })).toBe(true);
+ expect(pausable({ protocol: 'torrent', phase: 'done', downloader_kind: 'rtorrent' })).toBe(true);
+ expect(retryable({ client_item: true, outside: true, hash: 'h', downloader_id: 3, protocol: 'torrent', phase: 'failed', downloader_kind: 'rtorrent' })).toBe(false);
+ });
});
diff --git a/app/frontend/src/lib/downloads/usenet.ts b/app/frontend/src/lib/downloads/usenet.ts
index f3e4816..f167f98 100644
--- a/app/frontend/src/lib/downloads/usenet.ts
+++ b/app/frontend/src/lib/downloads/usenet.ts
@@ -18,12 +18,12 @@ export function retryable(r: RetryBits & { downloader_kind?: string }): boolean
return (controllable(r.downloader_kind) || r.downloader_kind === 'nzbget') && !!r.client_item && !!r.outside && !!r.hash && !!r.downloader_id && r.protocol === 'usenet' && r.phase === 'failed';
}
-/** Whether Pause and Resume mean anything: a Usenet job in the finished list cannot be paused. NZBGet takes pause and resume but not the other row controls. */
+/** Whether Pause and Resume mean anything: a Usenet job in the finished list cannot be paused. NZBGet and rTorrent take pause and resume but not the other row controls. */
export function pausable(r: { protocol?: string; phase?: string; downloader_kind?: string }): boolean {
- return (controllable(r.downloader_kind) || r.downloader_kind === 'nzbget') && !(r.protocol === 'usenet' && (r.phase === 'done' || r.phase === 'failed'));
+ return (controllable(r.downloader_kind) || r.downloader_kind === 'nzbget' || r.downloader_kind === 'rtorrent') && !(r.protocol === 'usenet' && (r.phase === 'done' || r.phase === 'failed'));
}
-/** Whether the Downloader kind takes pause, resume, retry and the other row controls; Transmission, Deluge and NZBGet do not yet. An unknown kind is allowed and the server answers. */
+/** Whether the Downloader kind takes pause, resume, retry and the other row controls; Transmission, Deluge, rTorrent and NZBGet do not yet. An unknown kind is allowed and the server answers. */
export function controllable(kind?: string): boolean {
return !kind || kind === 'qbittorrent' || kind === 'sabnzbd';
}
diff --git a/app/frontend/src/lib/setup/welcome-downloader.svelte.ts b/app/frontend/src/lib/setup/welcome-downloader.svelte.ts
index effec7e..57e86de 100644
--- a/app/frontend/src/lib/setup/welcome-downloader.svelte.ts
+++ b/app/frontend/src/lib/setup/welcome-downloader.svelte.ts
@@ -5,8 +5,8 @@ import { api, message, ApiError } from '#lib/core/api.ts';
import { t as say } from '#lib/core/i18n/i18n.svelte.ts';
export function createWelcomeDownloader(ctx: any) {
- const dlKinds: DownloaderForm['kind'][] = ['qbittorrent', 'sabnzbd', 'transmission', 'nzbget', 'deluge'];
- const dlPorts: Record<DownloaderForm['kind'], string> = { qbittorrent: '8080', sabnzbd: '8080', transmission: '9091', nzbget: '6789', deluge: '8112' };
+ const dlKinds: DownloaderForm['kind'][] = ['qbittorrent', 'sabnzbd', 'transmission', 'nzbget', 'deluge', 'rtorrent'];
+ const dlPorts: Record<DownloaderForm['kind'], string> = { qbittorrent: '8080', sabnzbd: '8080', transmission: '9091', nzbget: '6789', deluge: '8112', rtorrent: '8000' };
let dl = $state<DownloaderForm>(emptyForm());
// Every connected downloader, each with its last test answer; the form shows when there is none yet or the owner adds another.
let dlList = $state<DownloaderView[]>([]);
@@ -19,7 +19,7 @@ export function createWelcomeDownloader(ctx: any) {
// Shown under User name when an app that signs in turned down a try without one.
let dlAuth = $state('');
const dlForm = $derived(dlList.length === 0 || dlAdding);
- const dlUser = $derived(dl.kind === 'qbittorrent' || dl.kind === 'transmission' || dl.kind === 'nzbget');
+ const dlUser = $derived(dl.kind === 'qbittorrent' || dl.kind === 'transmission' || dl.kind === 'nzbget' || dl.kind === 'rtorrent');
function pickDl(k: DownloaderForm['kind']) {
ctx.error = '';
dlError = '';
diff --git a/app/frontend/src/routes/downloads/+page.svelte b/app/frontend/src/routes/downloads/+page.svelte
index f936707..c5bdc30 100644
--- a/app/frontend/src/routes/downloads/+page.svelte
+++ b/app/frontend/src/routes/downloads/+page.svelte
@@ -12,14 +12,14 @@
import { toasts } from '#lib/core/toasts.svelte.ts';
import { type Decision, type DownloadRow } from '#lib/core/types.ts';
type ClientHealth = { id: number; name: string; health: 'ok' | 'slow' | 'offline' | 'waiting' | 'checking' | 'degraded' | (string & {}); stale?: boolean; seen_at?: string };
- type ViewAnswer = { downloads: DownloadRow[]; totals?: { speed: number; up_speed: number }; clients?: ClientHealth[]; outside_total?: number; next_cursor?: string; boot?: string; revs?: Record<string, number> };
+ type ViewAnswer = { downloads: DownloadRow[]; totals?: { speed: number; up_speed: number }; clients?: ClientHealth[]; outside_total?: number; outside_rest?: Rest; next_cursor?: string; boot?: string; revs?: Record<string, number> };
import { session } from '#lib/core/session.svelte.ts';
import Button from '#lib/ui/Button.svelte';
import Sheet from '#lib/ui/Sheet.svelte';
import EmptyState from '#lib/ui/EmptyState.svelte';
import LoadError from '#lib/ui/LoadError.svelte';
import type { TitleView } from '#lib/core/types.ts';
- import type { ImportRecord, SteerMode } from '#lib/downloads/index.ts';
+ import type { ImportRecord, Rest, SteerMode } from '#lib/downloads/index.ts';
// Someone who may not manage the Library only watches the downloads for what they asked for.
const watch = $derived(!session.can('manage_library'));
@@ -40,7 +40,8 @@
// Outside torrents come 200 at a time; Show more asks for the next 200 too.
let outsideLimit = $state(200);
let moreOutside = $state(false);
- let outsideTotal = $state(0);
+ // Torrents HolyArrs did not add that this page has not loaded, per Downloader and stage: the tabs count them too.
+ let outsideRest = $state<Rest>({});
// The most torrents the server sends that it did not add.
const outsideMax = 2000;
const clientNotes = $derived(
@@ -178,6 +179,11 @@
}
}
+ function showMore() {
+ outsideLimit = Math.min(outsideLimit + 200, outsideMax);
+ void load();
+ }
+
// Reads can overlap (a timed read, then a Remove's own read): only the newest one is applied, so an older answer never brings a removed row back.
let loadSeq = 0;
async function load() {
@@ -192,7 +198,7 @@
clientHealth = d.clients ?? [];
upTotal = d.totals?.up_speed;
moreOutside = !!d.next_cursor;
- outsideTotal = d.outside_total ?? 0;
+ outsideRest = d.outside_rest ?? {};
const was = sync;
sync = fromAnswer(d);
dlPush.on = sync !== null;
@@ -222,6 +228,8 @@
sync = out.sync;
// That client has more torrents than this page holds: offer them.
if (d.next_cursor) moreOutside = true;
+ // Only that client's left-out torrents changed.
+ if (d.outside_rest) outsideRest = { ...outsideRest, [String(id)]: d.outside_rest[String(id)] ?? {} };
})
.catch(() => soon())
.finally(() => rereading.delete(id));
@@ -555,9 +563,7 @@
{#if error}<div class="pad"><LoadError hasData message={t('downloads.page.couldNotLoad')} onretry={load} /></div>{/if}
{#if notes.length}<ul class="notes" role="status" data-testid="dl-notes">{#each notes as n (n)}<li>{n}</li>{/each}</ul>{/if}
{#if !watch}<div class="matchpad"><ConfirmMatch refresh={reads} onchange={() => void load()} /></div>{/if}
- <DlSections changeOutside={session.can('settings')} rows={allRows} {importOf} titles={titleById} {titlesReady} {busy} {torrent} {decisionsOf} bind:openId onfail={markFailed} onremove={askRemove} ondone={() => void load()} onact={act} onall={(p) => batch(() => all(p))} onlimit={openLimit} onadd={torrentClients.length ? () => (addOpen = true) : undefined} onbulk={(l, a) => batch(() => bulk(l, a))} onsteer={steer} onremovemany={askRemoveMany} onretry={(l) => batch(() => retryMany(l))} {batchBusy} {watch} {upTotal} {notes} />
- {#if moreOutside && outsideLimit < outsideMax}<p class="more"><Button size="sm" variant="plain" onclick={() => { outsideLimit = Math.min(outsideLimit + 200, outsideMax); void load(); }} data-testid="dl-outside-more">{t('downloads.page.showMore')}</Button></p>
- {:else if moreOutside}<p class="more small muted" data-testid="dl-outside-capped">{t('downloads.page.capped', { max: outsideMax.toLocaleString(), total: outsideTotal.toLocaleString() })}</p>{/if}
+ <DlSections changeOutside={session.can('settings')} rows={allRows} {importOf} titles={titleById} {titlesReady} {busy} {torrent} {decisionsOf} bind:openId onfail={markFailed} onremove={askRemove} ondone={() => void load()} onact={act} onall={(p) => batch(() => all(p))} onlimit={openLimit} onadd={torrentClients.length ? () => (addOpen = true) : undefined} onbulk={(l, a) => batch(() => bulk(l, a))} onsteer={steer} onremovemany={askRemoveMany} onretry={(l) => batch(() => retryMany(l))} {batchBusy} {watch} {upTotal} {notes} outside={{ rest: outsideRest, canMore: moreOutside && outsideLimit < outsideMax, capMax: outsideMax, onmore: showMore }} />
{/if}
</PageLoader>
@@ -631,9 +637,6 @@
.notes { list-style: none; margin: 0; padding: var(--s-2) var(--gutter) 0; display: grid; gap: 2px; color: var(--text-muted); font: var(--t-footnote); }
/* On desktop the notes live in the status popover (DlSections), behind a dot; the bare list is for phones. */
@media (min-width: 641px) { .notes { display: none; } }
- .more { display: flex; justify-content: center; padding: var(--s-4) var(--gutter); }
- /* Phones: the page fits the screen, so keep Show more torrents above the tab bar. */
- @media (max-width: 640px) { .more { padding-bottom: calc(var(--tabbar, 60px) + env(safe-area-inset-bottom, 0px) + var(--s-4)); } }
.matchpad:empty { display: none; }
.aside-link { text-align: center; margin-top: -24px; }
.aside-link a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent-text); font: var(--t-callout); font-weight: 500; }
diff --git a/app/frontend/src/routes/settings/(home)/settings-search.ts b/app/frontend/src/routes/settings/(home)/settings-search.ts
index 47728b4..4eaf76b 100644
--- a/app/frontend/src/routes/settings/(home)/settings-search.ts
+++ b/app/frontend/src/routes/settings/(home)/settings-search.ts
@@ -145,7 +145,7 @@ export const settingIndex: SettingEntry[] = [
e('/settings/search', 'episode-minutes', 'Episode length when not known', 'runtime minutes', true),
e('/settings/search', 'hold-unknown', 'Hold Releases of unknown size or date', 'hold unknown', true),
e('/settings/search', 'search-now', 'Search now', 'search better copy feeds run'),
- e('/settings/downloaders', 'downloaders-card', 'Downloaders', 'download client qbittorrent sabnzbd transmission deluge nzbget torrent client add'),
+ e('/settings/downloaders', 'downloaders-card', 'Downloaders', 'download client qbittorrent sabnzbd transmission deluge rtorrent rutorrent nzbget torrent client add'),
e('/settings/downloaders', 'st-stall', 'Stalled after', 'stalled stuck hours download', true),
e('/settings/downloaders', 'st-act', 'Give up and try the next Release after', 'give up hours retry', true),
e('/settings/downloaders', 'remove-failed', 'Remove failed downloads from the Downloader', 'failed remove cleanup'),
diff --git a/app/frontend/src/routes/settings/downloaders/+page.svelte b/app/frontend/src/routes/settings/downloaders/+page.svelte
index b8ebe69..a13629d 100644
--- a/app/frontend/src/routes/settings/downloaders/+page.svelte
+++ b/app/frontend/src/routes/settings/downloaders/+page.svelte
@@ -48,7 +48,8 @@
remove_delete_files: true,
remove_turn_down: false,
remove_search_again: true,
- downloads_auto_add: false
+ downloads_auto_add: false,
+ downloads_sab_outside: true
});
let setBusy = $state(false);
let saved = $state('');
@@ -135,7 +136,7 @@
}
function hasUsername(kind: DownloaderForm['kind']): boolean {
- return kind === 'transmission' || kind === 'nzbget' || (kind === 'qbittorrent' && qbitWay === 'login');
+ return kind === 'transmission' || kind === 'nzbget' || kind === 'rtorrent' || (kind === 'qbittorrent' && qbitWay === 'login');
}
function addressPlaceholder(kind: DownloaderForm['kind']): string {
@@ -148,6 +149,8 @@
return 'http://192.168.1.10:6789';
case 'deluge':
return 'http://192.168.1.10:8112';
+ case 'rtorrent':
+ return 'http://192.168.1.10:8000/RPC2';
default:
return 'http://192.168.1.10:8090';
}
@@ -157,6 +160,7 @@
if (kind === 'sabnzbd') return t('settings.downloaders.catSab');
if (kind === 'transmission') return t('settings.downloaders.catTransmission');
if (kind === 'deluge') return t('settings.downloaders.catDeluge');
+ if (kind === 'rtorrent') return t('settings.downloaders.catRtorrent');
if (kind === 'nzbget') return t('settings.downloaders.catNzbget');
return t('settings.downloaders.catQbit');
}
@@ -328,6 +332,7 @@
<label class="checkline"><input type="radio" name="kind" checked={form.kind === 'qbittorrent'} onchange={() => pickKind('qbittorrent')} /><span><b>qBittorrent</b> {t('settings.downloaders.torrents')}</span></label>
<label class="checkline"><input type="radio" name="kind" checked={form.kind === 'transmission'} onchange={() => pickKind('transmission')} /><span><b>Transmission</b> {t('settings.downloaders.torrents')}</span></label>
<label class="checkline"><input type="radio" name="kind" checked={form.kind === 'deluge'} onchange={() => pickKind('deluge')} /><span><b>Deluge</b> {t('settings.downloaders.torrents')}</span></label>
+ <label class="checkline"><input type="radio" name="kind" checked={form.kind === 'rtorrent'} onchange={() => pickKind('rtorrent')} /><span><b>rTorrent</b> {t('settings.downloaders.torrents')}</span></label>
<label class="checkline"><input type="radio" name="kind" checked={form.kind === 'sabnzbd'} onchange={() => pickKind('sabnzbd')} /><span><b>SABnzbd</b> {t('settings.downloaders.usenet')}</span></label>
<label class="checkline"><input type="radio" name="kind" checked={form.kind === 'nzbget'} onchange={() => pickKind('nzbget')} /><span><b>NZBGet</b> {t('settings.downloaders.usenet')}</span></label>
</div>
@@ -368,6 +373,8 @@
{/if}
{#if form.kind === 'deluge'}
<p class="notice">{t('settings.downloaders.delugeNote')}</p>
+ {:else if form.kind === 'rtorrent'}
+ <p class="notice">{t('settings.downloaders.rtorrentNote')}</p>
{/if}
{#if form.kind === 'qbittorrent'}
<details class="more"><summary>{t('settings.downloaders.moreOptions')}</summary>{@render moreFields()}</details>
@@ -474,6 +481,10 @@
<input id="auto-add" type="checkbox" bind:checked={settings.downloads_auto_add} />
<span><b>{t('settings.downloaders.autoAdd')}</b><br /><span class="hint">{t('settings.downloaders.autoAddHint')}</span></span>
</label>
+ <label class="checkline">
+ <input id="sab-outside" type="checkbox" bind:checked={settings.downloads_sab_outside} />
+ <span><b>{t('settings.downloaders.sabOutside')}</b><br /><span class="hint">{t('settings.downloaders.sabOutsideHint')}</span></span>
+ </label>
<fieldset class="defaults" id="remove-defaults" tabindex="-1">
<legend>{t('settings.downloaders.whenRemove')}</legend>
<label class="checkline">
diff --git a/app/frontend/src/routes/welcome/+page.svelte b/app/frontend/src/routes/welcome/+page.svelte
index e1a1f27..1af247c 100644
--- a/app/frontend/src/routes/welcome/+page.svelte
+++ b/app/frontend/src/routes/welcome/+page.svelte
@@ -388,7 +388,7 @@
{/if}
{/if}
{#if downloaderStep.dlForm}
- <div class="tiles five" role="radiogroup" aria-label={t('welcome.downloaderApp')}>
+ <div class="tiles six" role="radiogroup" aria-label={t('welcome.downloaderApp')}>
{#each downloaderStep.dlKinds as k (k)}
<label class="tile small" class:on={downloaderStep.dl.kind === k}>
<input type="radio" name="dlkind" value={k} checked={downloaderStep.dl.kind === k} onchange={() => downloaderStep.pickDl(k)} aria-label={kindWords[k]} />
@@ -533,7 +533,7 @@
/* Tiles: an icon and a word; picked tiles take the accent, with a tick. */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
- .tiles.five { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; }
+ .tiles.six { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; }
.tiles.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile {
position: relative;
@@ -679,7 +679,7 @@
@media (max-width: 520px) {
.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
- .tiles.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
+ .tiles.six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles.two-up { grid-template-columns: 1fr; }
.tile { min-height: 96px; }
.tile.small { min-height: 52px; }
diff --git a/app/tests/downloads/optional-downloaders.spec.ts b/app/tests/downloads/optional-downloaders.spec.ts
index 65ca9c0..69881f3 100644
--- a/app/tests/downloads/optional-downloaders.spec.ts
+++ b/app/tests/downloads/optional-downloaders.spec.ts
@@ -4,7 +4,7 @@ import { readFileSync } from 'node:fs';
import { join } from 'node:path';
import { plainForm } from '../helpers/helpers.ts';
-type Kind = 'qbittorrent' | 'sabnzbd' | 'transmission' | 'nzbget' | 'deluge';
+type Kind = 'qbittorrent' | 'sabnzbd' | 'transmission' | 'nzbget' | 'deluge' | 'rtorrent';
const configDir = process.env.HOLYARRS_OPTIONAL_UI_CONFIG;
const libraryDir = process.env.HOLYARRS_OPTIONAL_UI_LIBRARY;
@@ -20,6 +20,7 @@ const kinds: { kind: Kind; label: string; username: boolean; secretLabel: 'Passw
{ kind: 'qbittorrent', label: 'qBittorrent', username: true, secretLabel: 'Password', category: 'holyarrs' },
{ kind: 'transmission', label: 'Transmission', username: true, secretLabel: 'Password', category: 'holyarrs' },
{ kind: 'deluge', label: 'Deluge', username: false, secretLabel: 'Password', category: 'holyarrs' },
+ { kind: 'rtorrent', label: 'rTorrent', username: true, secretLabel: 'Password', category: 'holyarrs' },
{ kind: 'sabnzbd', label: 'SABnzbd', username: false, secretLabel: 'API key', category: 'movies' },
{ kind: 'nzbget', label: 'NZBGet', username: true, secretLabel: 'Password', category: 'holyarrs' }
];
@@ -89,7 +90,8 @@ async function verifyFieldMatrix(page: Page) {
await expect(page.getByLabel('Username')).toHaveCount(item.username ? 1 : 0);
await expect(page.getByLabel('API key', { exact: true })).toHaveCount(item.secretLabel === 'API key' ? 1 : 0);
await expect(page.getByLabel('Password', { exact: true })).toHaveCount(item.secretLabel === 'Password' ? 1 : 0);
- if (item.kind === 'deluge') await expect(page.getByText(/must already be connected to the intended daemon/)).toBeVisible();
+ if (item.kind === 'deluge') await expect(page.getByText(/connected to a daemon with the Label plugin on/)).toBeVisible();
+ if (item.kind === 'rtorrent') await expect(page.getByText(/plugins\/httprpc\/action\.php/)).toBeVisible();
}
await noSidewaysScroll(page);
await seriousA11y(page, 'desktop add form');
diff --git a/app/tests/whole-app/live-push.spec.ts b/app/tests/whole-app/live-push.spec.ts
index ec7c09b..18c5247 100644
--- a/app/tests/whole-app/live-push.spec.ts
+++ b/app/tests/whole-app/live-push.spec.ts
@@ -223,3 +223,42 @@ test('AC6: 2,000-row list scrolls smoothly and draws fewer than 100 rows', async
await ctx.close();
await fetch(`${qbit}/set?count=0`);
});
+
+// 883 torrents HolyArrs did not add: the tabs count every one, a note under
+// the tabs says only some are loaded, and Show more torrents sits at the end
+// of the list for Torrent (and every network), never for Usenet with none left.
+test('tab counts and Show more follow every torrent and the network filter', async ({ browser }) => {
+ test.setTimeout(120_000);
+ await fetch(`${qbit}/set?count=883`);
+ await expect.poll(async () => (await page.request.get('/api/v1/downloads/view?limit=1')).json().then((v) => v.outside_total), { timeout: 30_000 }).toBeGreaterThanOrEqual(883);
+ const ctx = await browser.newContext({ viewport: { width: 390, height: 844 }, storageState: await page.context().storageState() });
+ const p = await ctx.newPage();
+ await p.goto('/downloads');
+ const all = p.locator('[data-testid="rail-item"][data-key="active"]');
+ await expect.poll(async () => Number(await all.getAttribute('data-count')), { timeout: 30_000 }).toBeGreaterThanOrEqual(883);
+ await expect(p.getByTestId('dl-morenote')).toBeVisible();
+ const network = async (key: string) => {
+ await p.getByTestId('dl-filters-btn').click();
+ await p.locator(`[data-testid="dl-f-src"][data-key="${key}"]`).click();
+ await p.getByTestId('dl-filters-done').click();
+ };
+ const toEnd = () => p.getByTestId('dl-listbox').evaluate((b) => (b.scrollTop = b.scrollHeight));
+ const loaded = async () => Number(await p.locator('[data-testid="dl-list"]').getAttribute('data-rows'));
+
+ await network('torrent');
+ await toEnd();
+ await expect(p.getByTestId('dl-outside-more')).toBeInViewport();
+
+ await network('usenet');
+ await expect(p.getByTestId('dl-outside-more')).toHaveCount(0);
+ await expect(p.getByTestId('dl-morenote')).toHaveCount(0);
+
+ await network('torrent');
+ await toEnd();
+ const before = await loaded();
+ await expect(p.getByTestId('dl-outside-more')).toBeInViewport();
+ await p.getByTestId('dl-outside-more').click();
+ await expect.poll(loaded, { timeout: 30_000 }).toBeGreaterThan(before);
+ await ctx.close();
+ await fetch(`${qbit}/set?count=0`);
+});
diff --git a/docs/downloads/downloaders.md b/docs/downloads/downloaders.md
index 0d31d5d..331f726 100644
--- a/docs/downloads/downloaders.md
+++ b/docs/downloads/downloaders.md
@@ -1,6 +1,6 @@
---
title: Downloaders
-description: Connect qBittorrent, Transmission, Deluge, SABnzbd or NZBGet so HolyArrs can send Releases and import the finished files.
+description: Connect qBittorrent, Transmission, Deluge, rTorrent, SABnzbd or NZBGet so HolyArrs can send Releases and import the finished files.
level: Setup
sidebar: { order: 2 }
---
@@ -11,7 +11,7 @@ HolyArrs does not download by itself. It hands each Release to a Downloader, fol
| Kind | Apps |
|---|---|
-| Torrent | qBittorrent, Transmission 4 or newer, Deluge |
+| Torrent | qBittorrent, Transmission 4 or newer, Deluge, rTorrent (with or without ruTorrent) |
| Usenet | SABnzbd, NZBGet |
## Before you start
@@ -25,7 +25,7 @@ HolyArrs does not download by itself. It hands each Release to a Downloader, fol
2. Press **Add a Downloader**.
3. Under **Which app**, pick your app.
4. Type a **Name**.
-5. Type the **Address**, the app's web page, such as `http://192.168.1.10:8090`.
+5. Type the **Address**, the app's web page, such as `http://192.168.1.10:8090`. For rTorrent, see [rTorrent address](#rtorrent-address).
6. Fill in the sign-in. See [Sign-in for each app](#sign-in-for-each-app).
7. Press **Save**, then **Test** on the row.
@@ -42,11 +42,30 @@ If HolyArrs and the Downloader run in separate containers and see the download f
| qBittorrent | **API key** (qBittorrent 5.2 or newer) or **Username and password** | Options > Web UI |
| Transmission | Username and password, empty if it asks for none | Transmission settings |
| Deluge | Web UI password, no username | Deluge Web UI |
+| rTorrent | Username and password of the web server in front of rTorrent, empty if it asks for none | Your web server or seedbox settings |
| SABnzbd | API key | Config > General |
| NZBGet | Username and password, empty if NZBGet lets HolyArrs in without them | NZBGet settings |
HolyArrs stores keys and passwords encrypted and never shows them again. Leave the field alone to keep the stored one. When you change the address to another host, type the key again. HolyArrs never sends a stored key to a new host.
+## rTorrent address
+
+HolyArrs talks to rTorrent over XML-RPC. The **Address** is that link, not the ruTorrent page.
+
+| Setup | Address |
+|---|---|
+| crazymax/rtorrent-rutorrent | `http://host:8000/RPC2`. Port 8080 there is the ruTorrent page |
+| Through ruTorrent | `http://host:8080/plugins/httprpc/action.php`, or `/rutorrent/plugins/httprpc/action.php` when ruTorrent sits under `/rutorrent`. `/plugins/rpc/rpc.php` works too |
+| Seedbox | The link your seedbox gives, such as `https://host/user/RPC2` |
+
+An address with no path gets `/RPC2`. Tested with rTorrent 0.16.25 and ruTorrent 5.3.18.
+
+HolyArrs fetches each `.torrent` file itself and sends it to rTorrent, so rTorrent never contacts the Source.
+
+### rTorrent on a seedbox
+
+When rTorrent runs on another machine, HolyArrs cannot see its download folder. Set up a sync that copies the finished files to a folder HolyArrs can see. Then add a path pair under [Paths](#paths): **Downloader's path** is the seedbox folder, such as `/home/user/downloads`, and **HolyArrs' path** is the local folder the sync fills.
+
## Choices
For qBittorrent these sit under **More options**.
@@ -60,6 +79,7 @@ HolyArrs files its downloads under this category and only follows that category.
| qBittorrent | Made for you if missing |
| SABnzbd | Must exist first, under Config > Categories |
| Transmission, Deluge | Stored as a label |
+| rTorrent | Stored as the label in `d.custom1`, shown in ruTorrent's Label column |
| NZBGet | Sent as the download category |
### Priority and tags
@@ -90,6 +110,8 @@ Press **Mark failed** to end a download you do not want. HolyArrs then:
2. Removes it from the Downloader, with its files.
3. Searches again and sends the next best Release.
+rTorrent cannot delete files over XML-RPC, so HolyArrs deletes them itself where its save folder or path pairs reach them. Otherwise the files stay on the rTorrent machine.
+
If nothing else passes your rules, the title shows **Needs a decision**.
## Row states
@@ -116,11 +138,22 @@ If nothing else passes your rules, the title shows **Needs a decision**.
**Symptom:** Deluge does not work.
**Fix:** In the Deluge Web UI, connect to your daemon yourself and turn on the Label plugin. HolyArrs does not pick a daemon.
+**Symptom:** The rTorrent test says 404 or not found.
+**Cause:** The port or path is wrong. With crazymax/rtorrent-rutorrent, 8000 is XML-RPC and 8080 is the ruTorrent page.
+**Fix:** Use `http://host:8000/RPC2`, or a ruTorrent path from [rTorrent address](#rtorrent-address).
+
+**Symptom:** rTorrent says `not allowed for untrusted connections`.
+**Cause:** ruTorrent blocks a command HolyArrs needs.
+**Fix:** Update ruTorrent, or point the **Address** at rTorrent's `/RPC2`.
+
+**Symptom:** rTorrent refuses a Release with a size limit error.
+**Fix:** Raise `network.xmlrpc.size_limit` in rTorrent's config. In crazymax/rtorrent-rutorrent, set `XMLRPC_SIZE_LIMIT`.
+
**Symptom:** A `.torrent` or `.nzb` from a Source with a proxy is refused.
-**Cause:** Transmission, Deluge and NZBGet cannot take those files through a proxied Source yet. Magnet links work.
+**Cause:** Transmission, Deluge, rTorrent and NZBGet cannot take those files through a proxied Source yet. Magnet links work.
**Symptom:** A row says **Check whether this download arrived**.
-**Cause:** The connection dropped while Transmission, Deluge or NZBGet was taking a Release. HolyArrs does not send it again by itself.
+**Cause:** The connection dropped while Transmission, Deluge, rTorrent or NZBGet was taking a Release. HolyArrs does not send it again by itself.
**Fix:**
1. Look for the download in the Downloader app.
2. In HolyArrs, press **Give up on it**. The download stays in the Downloader. Pick another Release under **Needs a decision** if you want one.
@@ -188,6 +221,8 @@ A listed Downloader stays read only whatever its switch says, even after remove
- **Remove** is refused while the Downloader has active downloads. Pause it, let them finish, then remove.
- NZBGet deletes files whenever a download or its history entry is removed, so HolyArrs refuses removals that ask to keep files.
+- rTorrent cannot delete data over XML-RPC. When a removal asks to delete files, HolyArrs deletes them itself where its save folder or path pairs reach them. Otherwise the files stay on the rTorrent machine and HolyArrs logs why.
+- On **Downloads**, an rTorrent row offers **Pause** and **Resume**, but not the other qBittorrent controls.
- Every Downloader route is in `http://your-server:6262/api/v1/openapi.json`.
</details>
diff --git a/docs/downloads/index.md b/docs/downloads/index.md
index cb1d31b..0a4be03 100644
--- a/docs/downloads/index.md
+++ b/docs/downloads/index.md
@@ -9,7 +9,7 @@ HolyArrs finds Releases through Sources and hands them to a Downloader. Set up b
| Part | What it does | Page |
|---|---|---|
-| Downloaders | qBittorrent, Transmission, Deluge, SABnzbd and NZBGet fetch the files. HolyArrs follows each download and imports it | [Downloaders](downloaders/) |
+| Downloaders | qBittorrent, Transmission, Deluge, rTorrent, SABnzbd and NZBGet fetch the files. HolyArrs follows each download and imports it | [Downloaders](downloaders/) |
| Sources | Torznab, Newznab and RSS feeds that HolyArrs searches, or Jackett and Prowlarr linked in one go | [Sources](sources/) |
| Library search | Find a title you already added, from the Library page | [Library search](library-search/) |
| History | What was grabbed, imported or failed | [History](history/) |
diff --git a/docs/help/faq.md b/docs/help/faq.md
index a3f5007..fbf2c87 100644
--- a/docs/help/faq.md
+++ b/docs/help/faq.md
@@ -9,7 +9,7 @@ Short answers, each with a link to the full page.
## What does HolyArrs do?
-It runs movies, shows and music in one app: requests, searching your sources, picking a release, sending it to your downloader, importing the file, subtitles and alerts. It works with qBittorrent, SABnzbd, Transmission, NZBGet and Deluge. It does not download by itself.
+It runs movies, shows and music in one app: requests, searching your sources, picking a release, sending it to your downloader, importing the file, subtitles and alerts. It works with qBittorrent, SABnzbd, Transmission, NZBGet, Deluge and rTorrent. It does not download by itself.
## Do I need API keys for names and pictures?
diff --git a/docs/help/troubleshooting.md b/docs/help/troubleshooting.md
index cc4cb2f..ca2da73 100644
--- a/docs/help/troubleshooting.md
+++ b/docs/help/troubleshooting.md
@@ -63,7 +63,7 @@ See [Downloaders](../downloads/downloaders/) and [Sources](../downloads/sources/
**Symptom:** the doctor says hardlinks don't work, or disk use doubles after imports.
-**Cause:** downloads and Library folders are on different disks or mounts.
+**Cause:** downloads and Library folders are on different disks or mounts, or the disk can't hardlink (DrivePool, many NAS and SMB shares, Docker Desktop on Windows). Each file is still written once. Finished Usenet downloads are moved when they share a disk with the Library.
**Fix:** mount one shared parent folder into the container instead of separate ones. See [Folders](../start/folders/).
diff --git a/docs/migrate/sonarr-radarr.md b/docs/migrate/sonarr-radarr.md
index 5fb8538..b7213a4 100644
--- a/docs/migrate/sonarr-radarr.md
+++ b/docs/migrate/sonarr-radarr.md
@@ -36,7 +36,7 @@ Old apps often run in other containers and see folders under other names. A rule
| The untagged default wait rule | The preferred protocol and Usenet and torrent waits on the matched Pick rules, up to 7 days. See [Waits](#waits). |
| Radarr TMDB lists, Trakt lists and Trakt watchlists | **Outside lists**, added paused, with folder, Pick rules, Keep up to date, search on add, Release gate and read interval (6 to 168 hours). A Trakt list must be public and needs your Trakt key. |
| Torznab, Newznab and RSS indexers | **Sources**, added paused and blocked from your home network. |
-| Download clients (qBittorrent, SABnzbd, Transmission, Deluge, NZBGet) | **Downloaders**, added paused and blocked from your home network. They use the `holyarrs` category, so they never pick up the old apps' downloads. |
+| Download clients (qBittorrent, SABnzbd, Transmission, Deluge, rTorrent, NZBGet) | **Downloaders**, added paused and blocked from your home network. They use the `holyarrs` category, so they never pick up the old apps' downloads. For rTorrent, the old directory, priority, add-stopped and post-import label are not used. |
| Remote path mappings | **Different folder names** on the Downloader at that host, up to 100 pairs. A Downloader that was already here is left alone, and its pairs are listed for you to add by hand. A pair whose folder HolyArrs cannot see yet is still added and marked "not visible here yet (check your mounts)". |
| Naming | HolyArrs naming, where a pattern word has a match. Nothing on disk is renamed. |
| Discord, webhook and email notifications | **Alerts**, off until you type the link, address or mail password. |
diff --git a/docs/music/downloads.md b/docs/music/downloads.md
index 6ba3e69..68dc248 100644
--- a/docs/music/downloads.md
+++ b/docs/music/downloads.md
@@ -29,7 +29,7 @@ A multi-disc album keeps every track in one album folder, each name starting wit
Put downloads and the Library on the same disk. HolyArrs then hardlinks each file, a second name for the same data, so it takes no extra space and your Downloader keeps sharing it. On another disk files are copied. See [Folders](../start/folders.md).
:::
-HolyArrs never moves or deletes the Downloader's files, and never writes over a file it did not put there.
+A finished Usenet download is moved instead, which is instant on the same disk; if it can't be moved, it is copied. A Downloader marked read-only keeps its files. HolyArrs never writes over a file it did not put there.
## When an album misses tracks
diff --git a/docs/run/health.md b/docs/run/health.md
index 3b807db..f4bc7a4 100644
--- a/docs/run/health.md
+++ b/docs/run/health.md
@@ -52,7 +52,7 @@ The update settings live on the same card; see [Updates](updates.md#choices).
## If it does not work
**Symptom:** a download waits for its files after a share came back.
-**Cause:** qBittorrent, Deluge and Transmission keep the error until the files are checked again.
+**Cause:** qBittorrent, Deluge, Transmission and rTorrent keep the error until the files are checked again.
**Fix:** on **Downloads**, select **Check again** on that row, or recheck it in the downloader.
**Symptom:** a Library folder shows broken after a reboot.
diff --git a/docs/shows/downloads.md b/docs/shows/downloads.md
index 2877b86..e5310a3 100644
--- a/docs/shows/downloads.md
+++ b/docs/shows/downloads.md
@@ -34,7 +34,7 @@ Copper Valley (2025)/Season 1/Copper Valley - S01E02-E03 - The Mill + Flood 1080
Copper Valley (2025)/Specials/Copper Valley - S00E01 - Behind the scenes 1080p WEB.mkv
```
-Files are hardlinked when the download and the Library share a disk: they take no extra space and your Downloader keeps seeding. On another disk they are copied. HolyArrs never moves or deletes your Downloader's files, and never writes over a file it did not put there.
+Torrent files are hardlinked when the download and the Library share a disk: they take no extra space and your Downloader keeps seeding. On another disk they are copied. A finished Usenet download is moved instead, which is instant on the same disk; if it can't be moved, it is copied. A Downloader marked read-only keeps its files. HolyArrs never writes over a file it did not put there.
:::tip
A download fills one Version. For a show kept in HD and 4K, each pack goes to its own Version's folder, for example `Copper Valley (2025)` and `Copper Valley (2025) [4K]`.
diff --git a/docs/start/connect.md b/docs/start/connect.md
index c0c9453..d11d1be 100644
--- a/docs/start/connect.md
+++ b/docs/start/connect.md
@@ -27,6 +27,7 @@ HolyArrs does not download by itself. A **downloader** (qBittorrent, SABnzbd and
| SABnzbd | API key, in Config > General |
| Transmission | Username and password, empty if it asks for none. Version 4 or newer |
| Deluge | Web UI password, no username |
+ | rTorrent | Username and password of the web server in front of it, empty if it asks for none. The address is its XML-RPC link, such as `http://192.168.1.10:8000/RPC2`. See [rTorrent address](../downloads/downloaders.md#rtorrent-address) |
| NZBGet | Username and password |
5. Press **Save**, then **Test** on its row.
diff --git a/docs/start/folders.md b/docs/start/folders.md
index 1d4d635..de12efa 100644
--- a/docs/start/folders.md
+++ b/docs/start/folders.md
@@ -54,7 +54,7 @@ Separate NAS shares or datasets under `/srv/data` are separate filesystems. File
### Separate mounts
-`/movies`, `/tv`, `/music` and `/downloads` as four mounts still work. Every import then copies the file, which takes longer and uses double the space until the downloader deletes its copy.
+`/movies`, `/tv`, `/music` and `/downloads` as four mounts still work. Every import then copies the file, which takes longer and uses double the space until the downloader deletes its copy. That holds for Usenet downloads too, even on one disk: a file can only move instantly within one mount, so use the shared parent folder above.
### Downloader in another container with other paths