<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Hand downloading over to NAS (completely external download)]]></title><description><![CDATA[<h2>As parallel downloads this already works</h2>
<p dir="auto"><img src="/assets/uploads/files/1672169038529-mediathekview-download-set-1.png" alt="MediathekView - Download Set 1.png" class=" img-fluid img-markdown" /></p>
<p dir="auto"><img src="/assets/uploads/files/1672169051310-mediathekview-download-set-2.png" alt="MediathekView - Download Set 2.png" class=" img-fluid img-markdown" /></p>
<p dir="auto"><img src="/assets/uploads/files/1672169060681-mediathekview-download-set-3.png" alt="MediathekView - Download Set 3.png" class=" img-fluid img-markdown" /></p>
<p dir="auto"><img src="/assets/uploads/files/1672169079948-mediathekview-download-on-nas.png" alt="MediathekView - Download on NAS.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">MediathekView allows to define an external download app.</p>
<p dir="auto">MediathekView &gt; Preferences &gt; Download and Playback &gt; Edit sets &gt; Your Set &gt; Helper apps:</p>
<p dir="auto">I created one which runs a non-interactive SSH to my NAS where I trigger a wget download, and immediately exit the SSH again, but the download continues on the NAS, like this:</p>
<p dir="auto">Program:</p>
<pre><code>/usr/bin/ssh
</code></pre>
<p dir="auto">Arguments:</p>
<pre><code class="language-bash">nas cd /srv/dev-disk-by-uuid-LONG-UID/Shared/Videos/ ; mkdir -p "$(dirname "**")" ; curl --continue-at - --output "**" %F 1&gt;/dev/null 2&gt;/dev/null &amp;
</code></pre>
<p dir="auto">The two special patterns <code>**</code> and <code>%f</code> are expanded per each download invocation:</p>
<ul>
<li>
<p dir="auto"><code>**</code> gets filled with the the relative folder path and filename which you have set in the download dialog, e.g.:./Series/My Documentation Name/My Video Name.mp4</p>
</li>
<li>
<p dir="auto"><code>%f</code> gets filled with the URL for the chosen quality (low, medium, high) which you have chosen in the download dialog, e.g.https://some-content-delivery-network.com/media/a3e8-20c08f58e1c1-3c3a2d2ca7c6_2b.mp4</p>
</li>
</ul>
<p dir="auto">Explanation of the command line for the helper app</p>
<ul>
<li>
<p dir="auto"><code>ssh nas</code> Established a passwordless SSH connection from my end device to my NAS.</p>
</li>
<li>
<p dir="auto"><code>cd</code> I then change into the video base directory on the NAS.<br />
mkdir -p “$(dirname “**”)” and I create the target directory (if it does not exist yet with the -p flag)</p>
</li>
<li>
<p dir="auto"><code>curl</code> and I start a curl instance</p>
</li>
<li>
<p dir="auto"><code>--continue-at</code> - which continues the file (if previously started), special value <code>-</code> means to determine the download continuation offset from the given <code>--output</code> file.</p>
</li>
<li>
<p dir="auto"><code>--output</code> uses my optional relative sub-directory plus the friendly name of the video that the catalog software provides.</p>
</li>
<li>
<p dir="auto"><code>1&gt;/dev/null 2&gt;/dev/null</code> I redirect the output of curl to /dev/null, and therefore the non-interactive SSH connection terminates immediately after having triggered the command, whereas curl on the NAS continues to run at its own tempo, until done.</p>
</li>
</ul>
<p dir="auto">Important note:</p>
<ul>
<li>
<p dir="auto">If you try your command first yourself in Terminal, you will need to use single quotes around the program argument which you pass to the non-interactive SSH, so <code>ssh nas 'cd ... &amp;'</code>.</p>
</li>
<li>
<p dir="auto">But in the arguments textfield in MediathekView do not use the single quotes around the SSH program argument! Mediathek does that on your behalf. If you add single quotes there yourself, the command will just fail silently.</p>
</li>
</ul>
<h2>Serial downloads on NAS (add to download queue) - Looking for solutions</h2>
<p dir="auto">The downside of the above method is that each new download invocation causes another parallel download (running in its own curl or wget instance) which puts your downloads to a crawl as soon as you reach a certain amount of parallel downloads.</p>
<ul>
<li>I would prefer a solution where the download button on the end device running MediaView would trigger the NAS to add another filepath/URL pair to a download queue. And this download queue on the NAS runs in its own tempo, independent from when a download gets added.
<ul>
<li>wget and curl both don’t have a queue management.</li>
<li>I asked <a href="https://forum.openmediavault.org/index.php?thread/45643-how-to-programmatically-add-url-filepath-pair-to-http-s-download-queue-on-nas/" target="_blank" rel="noopener noreferrer nofollow ugc">How to programmatically add URL + filepath pair to HTTP(S) download queue on NAS ?</a> on the forum of OpenMediaVault, the distro that I use on my NAS.</li>
<li>Should I find out how, I will share this here too.</li>
</ul>
</li>
</ul>
<h2>Other questions &amp; related inquiry</h2>
<ul>
<li><strong>Does your built in JDownloader feature</strong> also work with a JDownloader running on another host in your LAN such as on a NAS?</li>
<li>If so I would look whether JDownloader is available as a CLI version to run on a NAS.</li>
<li><a href="https://forum.mediathekview.de/topic/5042/mediathekview-nas-edition-w%C3%A4re-fein-web-app-auf-docker-image">MediathekView NAS Edition (Web App on Docker Image) ?</a></li>
</ul>
]]></description><link>https://forum.mediathekview.de/topic/5041/hand-downloading-over-to-nas-completely-external-download</link><generator>RSS for Node</generator><lastBuildDate>Thu, 11 Jun 2026 10:43:44 GMT</lastBuildDate><atom:link href="https://forum.mediathekview.de/topic/5041.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 27 Dec 2022 19:27:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Hand downloading over to NAS (completely external download) on Thu, 29 Dec 2022 23:50:33 GMT]]></title><description><![CDATA[<p dir="auto">Schöner formatiertes Log ohne Secret:<br />
<a href="/assets/uploads/files/1672357713877-aria2-remote.sh.txt">aria2-remote.sh.txt</a></p>
]]></description><link>https://forum.mediathekview.de/post/32697</link><guid isPermaLink="true">https://forum.mediathekview.de/post/32697</guid><dc:creator><![CDATA[porg]]></dc:creator><pubDate>Thu, 29 Dec 2022 23:50:33 GMT</pubDate></item><item><title><![CDATA[Reply to Hand downloading over to NAS (completely external download) on Thu, 29 Dec 2022 19:50:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/vitusson" aria-label="Profile: vitusson">@<bdi>vitusson</bdi></a> Danke, Deine Tipps haben mich zum Ziel geführt!</p>
<p dir="auto">Es waren noch einige Anpassungen nötig, aber nun läuft dies bei mir auf macOS mit dem MediathekView zum Stöbern und Download-Beauftragen und dem OMV NAS als aria2 server, der dann die Downloads in der Schleife vornimmt.</p>
<h3>Anpassungen am Client (Mac)</h3>
<ol>
<li><strong>MediaThekView &gt; Einstellungen</strong>
<ul>
<li>Aufzeichnen und Abspielen &gt; Set bearbeiten &gt; Mein Set &gt; Hilfeprogramme:</li>
<li><strong>Programm</strong>: Muss <strong>absoluter Pfad</strong> sein zu <code>aria2-remote.sh</code></li>
<li>Weder <code>~</code> (Tilde) noch <code>$HOME</code> werden aufgelöst!</li>
</ul>
</li>
<li><strong><a href="https://github.com/mediathekview/MediathekView/blob/master/res/bin/aria2-remote.sh" target="_blank" rel="noopener noreferrer nofollow ugc">aria2-remote.sh</a></strong> — as of commit  <a href="https://github.com/mediathekview/MediathekView/commit/9558f62a46cff0b1b8078083629647b5e87e82ca" target="_blank" rel="noopener noreferrer nofollow ugc">9558f62</a> from 2016-01-26:</li>
</ol>
<ul>
<li>a) Script fails on macOS with: <code>base64: invalid option -- w</code>
<ul>
<li>Bugfix: <code>base64 -w 0 -</code> (<code>--wrap</code>) heisst am Mac <code>--break</code>. Dann wird base64 ausgeführt und in Folge die RPC Anfrage richtig geformt.</li>
</ul>
</li>
<li>b) Mit <code>filename=$(basename "$2")</code> kommen alle Downloads flach ins Aria Download Root Directory ( <code>--dir</code>). Dies gefiel mir nicht.
<ul>
<li>Änderte es auf <code>filepath="$2"</code> (ohne die <code>basename</code> operation) damit man von MediathekView aus im <strong>Zielfpad</strong> relative Angaben wie <code>./serien/tageschau/</code> plus dem <strong>Dateinamen</strong> <code>Name des Videos.mp4</code> übergeben kann, die dann relativ zum Aria Download Root Directory fungieren, z.B. <code>--dir=/srv/media/video</code>, d.h. es ergibt sich dann: <code>/srv/media/video/serien/tageschau/Name des Videos.mp4</code>.</li>
<li>Der Download Dialog der MediathekView merkt sich die letzten Pfadangaben im <strong>Zielpfad</strong>-Dropdown Menü.
<ul>
<li>Somit kann man durch Verwenden des Dropdown-Menüs super bequem und konsistent in bereits genutzte Ordnerstrukturen ablegen.</li>
</ul>
</li>
</ul>
</li>
<li>👉 Download der verbesserten Version:  <a href="/assets/uploads/files/1672343147143-aria2-remote.sh.txt">aria2-remote.sh</a></li>
</ul>
<h3>Setup am Server (OpenMediaVault NAS)</h3>
<pre><code>aria2c --enable-rpc --rpc-listen-all --rpc-secret mySecret --dir=/srv/dev-disk-by-uuid-LONG-UID/Shared/Videos
</code></pre>
<ul>
<li>Wichtig: Ohne abschließendem Schrägstrich, damit der relative übergebene Pfad schon dazu gesetzt wird und kein Doppelschrägstrich rauskommt.</li>
</ul>
<p dir="auto"><a href="/assets/uploads/files/1672343137213-aria2-remote.sh.txt">aria2-remote.sh.txt</a></p>
]]></description><link>https://forum.mediathekview.de/post/32695</link><guid isPermaLink="true">https://forum.mediathekview.de/post/32695</guid><dc:creator><![CDATA[porg]]></dc:creator><pubDate>Thu, 29 Dec 2022 19:50:46 GMT</pubDate></item><item><title><![CDATA[Reply to Hand downloading over to NAS (completely external download) on Wed, 28 Dec 2022 06:58:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/porg" aria-label="Profile: porg">@<bdi>porg</bdi></a> sagte in <a href="/post/32684">Hand downloading over to NAS (completely external download)</a>:</p>
<blockquote>
<h2>As parallel downloads this already works</h2>
</blockquote>
<blockquote>
<h2>Serial downloads on NAS (add to download queue) - Looking for solutions</h2>
<p dir="auto">The downside of the above method is that each new download invocation causes another parallel download (running in its own curl or wget instance) which puts your downloads to a crawl as soon as you reach a certain amount of parallel downloads.</p>
<ul>
<li>I would prefer a solution where the download button on the end device running MediaView would trigger the NAS to add another filepath/URL pair to a download queue. And this download queue on the NAS runs in its own tempo, independent from when a download gets added.
<ul>
<li>wget and curl both don’t have a queue management.</li>
</ul>
</li>
</ul>
</blockquote>
<p dir="auto">Was spricht denn gegen den Einsatz von aria2 im Deamon-Mode auf dem NAS Gerät?<br />
Das kann queue und startet nicht sofort 30 parallele Downloads.<br />
Existieren tut das anscheinend für openmediavault https://github.com/henryouly/openmediavault-aria2 (Disclaimer: schnelles google-Ergebnis, hab selbst kein solches Gerät.)<br />
Und eine Programmgruppe für aria2 gibt es für MV auch schon<br />
https://forum.mediathekview.de/topic/907/downloadgeschwindigkeit-set-wget/5?_=1672208459901</p>
]]></description><link>https://forum.mediathekview.de/post/32687</link><guid isPermaLink="true">https://forum.mediathekview.de/post/32687</guid><dc:creator><![CDATA[vitusson]]></dc:creator><pubDate>Wed, 28 Dec 2022 06:58:34 GMT</pubDate></item></channel></rss>