Moved to https://github.com/Xaero252/unraid-plex-nvdec/tree/master
-
-
Save Xaero252/9f81593e4a5e6825c045686d685e2428 to your computer and use it in GitHub Desktop.
This ends up throwing an error due to EOF in it's current state in User Scripts or an actual terminal. It's due to the spacing prior to @eof it should be all the way to the left with no padding, that appears to resolve the issue.
Applying hardware decode patch... ./patch_transcode.sh: line 36: warning: here-document at line 18 delimited by end-of-file (wanted `@EOF')
./patch_transcode.sh: line 37: syntax error: unexpected end of file
Oh man, I had it right originally and pushed the broken code. Commit history even shows it lol.
Fixed, thank you!
Frustrating that we can't have proper indentation everywhere though. heredocs are a blessing and a curse. I suppose I could put it in a variable but that feels ugly.
i'm having this error:
Applying hardware decode patch...
Downloading patch script...
/bin/sh: 1: wget: not found
chmod: cannot access '/usr/lib/plexmediaserver/plex-nvdec-patch.sh': No such file or directory
/bin/sh: 1: /usr/lib/plexmediaserver/plex-nvdec-patch.sh: not found
on unraid user scripts, the old one was working...
what am i doing wrong?
yup its the official docker
EDIT: please try the revised script, the issue should be resolved since unraid's wget is being used instead of the container's.
I see 4 potential solutions to this; I'm going to test something.
Solutions are:
- Pure bash download function (will always work)
- curl instead of wget (if it's present - it is in the ls.io container)
- pipe the output of wget or curl into the docker exec command and use cat to push the content to the file (I assume unraid has wget and curl included, but this would break support for non unraid systems that don't have the required tool)
- check for the appropriate tool, and if not present install it - I'd rather not do this.
working fine with the oficial docker, the revised script did the trick, thanks!
How should I put that in my User Scripts Plugin? I just need to create a new Script and copy what is here and run it when? Array start? what trigger you suggest?
I have mine set to run slightly after my CA Auto Updater. The only time the script should be run is when the plex docker is updated. There's no built-in trigger for force updating or installing a docker, so if you manually reinstall the docker you'll need to manually run the script, or wait for whenever you schedule it to run.
I'll work on writing a conditional for a case where either Plex Transcoder2 already exists, or the Plex Transcoder doesn't look like the original.
For example, my CA Auto Updater is set to run at ~3am - when probably nobody is going to be doing much with my server. Just after that at ~3:15am, I have this script scheduled to run.
And yes, you can just copy the script from gist directly into a new script on the user scripts plugin.
@Xaero252 worked flawlessly with unRaid 6.7.0 and gtx1070
Thank you.
Moved: https://github.com/Xaero252/unraid-plex-nvdec/
This script now depends on https://github.com/revr3nd/plex-nvdec/
Things that have changed with the most recent version of this script:
Changes 5/25/19"
Changes 4/24/19:
Changes 4/23/19:
Changes 3/9/19:
<<-'EOF'
to<<'@EOF'
this preserves indentation, but includes the leading two tabs.xargs -0 printf
withsed
to trim leading tabs present from above change.Changes 3/7/19:
$( ... )
instead of backticks` ... `
for variable population