...provided the .ts has been decrypted, which is not a given if it is HiDef - see Things Every... (click) section 5. However:They will play if you delete the corresponding 'hmt' files
...confirms they are decrypted.The .ts files will play on a computer.
sidecar -n
if the .nts file is missing.for f in *.ts; do file=${f%.ts}; echo $file; if [ ! -f "$file.nts" ]; then sidecar -n "$file" ;fi ; done
#!/bin/sh
* (on a line on its own, at the start of the file). Save it with a sensible name, and use the editor button to make executable.abduco
A problem with running a long process from a Telnet session or the webshell package (a command terminal available as a web page - access via WebIF >> Diagnostics >> Command Line) is that the session inconveniently drops out and terminates any active processes if you take the focus away to do something else. Then you have to reconnect and restart the youtube-dl command, which then has to do its initial thinking before the download resumes...
The command abduco is already available to support other long processes such as fix-disk, and can be used here to create a protected command session which carries on regardless of the terminal session dropping out. So, before launching the main download, use the following to create a protected session:
This creates a protected session called "yt" (call it what you like), and the next command prompt is within that session. Then start your youtube-dl process as described above. You can now "do other stuff" and the session will carry on regardless - to break out of the session and do other things on the command line, use Ctrl+\.Code:# abduco -A yt
To come back later, use the same abduco line again. This time, as there already exists a session called "yt", the command connects to it rather than starting a new one.
To close the session (from within the session), type "exit".
To inspect open abduco sessions, type "abduco" (with no other parameters).
#!/bin/bash
, but that only works if you have bash installed (not necessary).In case the file names have spaces, this needs to be quoted as well:...
I think this would do the trick
Code:for f in *.ts; do file=${f%.ts}; echo $file; if [ ! -f "$file.nts" ]; then sidecar -n "$file" ;fi ; done
... file="${f%.ts}"; ...
.My test files did have spaces in the name and I didn't need the quotes there (but quoting doesn't hurt)In case the file names have spaces, this needs to be quoted as well:... file="${f%.ts}"; ...
.
Bash is available but it is listed as advanced package which isn't displayed by default (see button on top right of packages page)But as has also been said, the script should be on the server. But then how do I run it? The custom software doesn't have bash listed. Is there some other similar program?
Install webshell. That gives you command line access through WebIF >> Diagnostics. No need to install bash if that command line works as is, but you might as well. All you have to do then is open a webshell session, create an abduco session, and fire off the command.As pointed out, Telnet has problems. I use RISC OS, where writing a script is only a few keystrokes. Dropping the script into a Telnet window, a few lines at a time, is simple and works.
But as has also been said, the script should be on the server. But then how do I run it? The custom software doesn't have bash listed. Is there some other similar program?
/bin/sh
or the slightly different /mod/bin/busybox/sh
that gets installed (and used as sh
by default) with the busybox repo package./bin/sh
unless the busybox package is installed. or bash
if the bash package is installed and you type bash
or have arranged to make it root's default shell.I wouldn't bother. Bash just uses more memory (and encourages sloppy, non-POSIX-conformant scripting)No need to install bash if that command line works as is, but you might as well.
...or you could have addeddid sh Spool
#!/bin/sh
at the start of your script in the manner I described.I looked online for help on abduco - its incomprehensible, I have no idea what it is or does!
abduco
A problem with running a long process from a Telnet session or the webshell package (a command terminal available as a web page - access via WebIF >> Diagnostics >> Command Line) is that the session inconveniently drops out and terminates any active processes if you take the focus away to do something else. Then you have to reconnect and restart the youtube-dl [substitute whatever you want here] command, which then has to do its initial thinking before the download resumes...
The command abduco is already available to support other long processes such as fix-disk, and can be used here to create a protected command session which carries on regardless of the terminal session dropping out. So, before launching the main download, use the following to create a protected session:
This creates a protected session called "yt" (call it what you like), and the next command prompt is within that session. Then start your youtube-dl [substitute whatever you want here] process as described above. You can now "do other stuff" and the session will carry on regardless - to break out of the session and do other things on the command line, use Ctrl+\.Code:# abduco -A yt
To come back later, use the same abduco line again. This time, as there already exists a session called "yt", the command connects to it rather than starting a new one.
To close the session (from within the session), type "exit".
To inspect open abduco sessions, type "abduco" (with no other parameters).