Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Dongattack
Dec 20, 2006

by Cyrano4747

bred posted:

Sonarr will see the download as failed, mark the nzb as failed, then try another nzb until it has a good download or runs out of nzbs that fit your criteria. It depends on how many results your indexers provide and how strict your criteria are.

Hmm, that's not happening on my end. Instead of marking it as failed they just get moved to the very end of the download que, can i mark it as failed manually or something like that? Yep! Found it, thanks for the help.

Adbot
ADBOT LOVES YOU

insularis
Sep 21, 2002

Donated $20. Get well, Lowtax.
Fun Shoe

Dongattack posted:

What do i do when Sonarr/SABNZBD finds a download with missing archives and skips that download? I need it to go find a different download i assume, but i don't know how to do it.

Also thanks insularis for helping me with the mp4 converting thing and pointing me towards ffmpeg/scripts, i wanted to post and say thanks when i figured out how to do it, but i'm not quite there yet!

No problem, PM me if you need a little more help with the scripting.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Regarding that Completion.py nzbget script...

Am I understanding correctly that it only checks your primary usenet server for missing parts before failing the download?

Methylethylaldehyde
Oct 23, 2004

BAKA BAKA

Thermopyle posted:

Regarding that Completion.py nzbget script...

Am I understanding correctly that it only checks your primary usenet server for missing parts before failing the download?

You can configure it to have a minimum threshold before failing it. I set mine to 30%, just so I don't burn block accounts trying to get an nzb that only exists on a Finnish news server operating out of Latvia. If you set it to zero, it'll just go down the list based on the level your servers were set at, checking articles until it either has a statistically complete and valid sample for releases with par2 files, or a 100% complete check on files without par2.

It works amazingly well, and I'm really surprised it isn't baked into the default nzbget software yet.

Methylethylaldehyde fucked around with this message at 00:24 on Feb 26, 2018

Jesse Iceberg
Jan 7, 2012

Has anyone gotten the form or Basic authentication working for NZBHydra? When I enable it with a configured user+pass, it just seems to be ignored, even after restarting the service.

Edit - Ah, never mind, I needed to set the access restrictions to get the form auth to take effect.

Jesse Iceberg fucked around with this message at 01:15 on Feb 28, 2018

Parker Lewis
Jan 4, 2006

Can't Lose


Thermopyle posted:

Regarding that Completion.py nzbget script...

Am I understanding correctly that it only checks your primary usenet server for missing parts before failing the download?

No, there's a whole settings page for the Completion script and two of the options are "Servers" and "FillServers" where you can put in the index numbers of any of your unlimited/fill servers that you want to have checked.

The script will stop checking servers and start downloading once it finds one that has an acceptable completion %, otherwise it goes through the list in order until it either finds a good one or has reached the end of the list.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Yeah,I figured out that it had its own settings page.

I'm often pretty dumb.

EL BROMANCE
Jun 10, 2006

COWABUNGA DUDES!
🥷🐢😬



Something seems to be up with the Radarr site, which in turn means local installs keep throwing up User/Password boxes. Frustrating! Hope it's fixed soon.

Dicty Bojangles
Apr 14, 2001

I heard it has something to do with the analytics script, and if you disable analytics in settings it'll go away. Can't test until tonight, though.

calandryll
Apr 25, 2003

Ask me where I do my best drinking!



Pillbug

Dicty Brojangles posted:

I heard it has something to do with the analytics script, and if you disable analytics in settings it'll go away. Can't test until tonight, though.

Just tried it and worked for me.

RoboBoogie
Sep 18, 2008
i need some automation in my process

I have a VPS in France that downloads linux isos that was pushed by sonarr using nzbget. After it downloads i run the list of commands to push the unrar'd folders to a rclone folder for post processing by sonarr

code:
mv * ../staging && cd ../staging && rclone move . "linux:staging/" && rm -rf * && cd ../linuxiso 
Then sonarr would move the files to the right folder and then the file will magically show up on Plex. This is not girlfriend friendly and is not a smooth process as i need to log in and run the list of commands for magic to happen.

what is the best way to create a script that will move the folder to the rclone drive and then deletes the empty folder after it completes unrar-ing?

Cheers

Dongattack
Dec 20, 2006

by Cyrano4747
How important would you say is it to have a secure Plex account password? The Plex server can only be accessed via my wifi, not via the internet or anything (i hope).
My current password is like all my passwords a long string of computer generated rng bullshit, but my new cellphone keeps signing me out of Plex every other day for some reason and it's suuuuch a loving hassle to type it in on that tiny keyboard with giant sausage carpenter fingers.

bobfather
Sep 20, 2001

I will analyze your nervous system for beer money
Plex has a spotty history of user security (their forums got hacked recently, and a bunch of Plex account passwords supposedly got leaked).

First, why don't you try using a password manager like 1Password or KeePass? These will store passwords and let you copy/paste them into apps instead of typing them in.

They also let you generate strong, but memorable passwords like "battery-horse-staple".

Dongattack
Dec 20, 2006

by Cyrano4747

bobfather posted:

Plex has a spotty history of user security (their forums got hacked recently, and a bunch of Plex account passwords supposedly got leaked).

First, why don't you try using a password manager like 1Password or KeePass? These will store passwords and let you copy/paste them into apps instead of typing them in.

They also let you generate strong, but memorable passwords like "battery-horse-staple".

I do use KeePass, but i can't use that to automatically log in on my phone can i? I know very little about cellphone technology.

bobfather
Sep 20, 2001

I will analyze your nervous system for beer money

Dongattack posted:

I do use KeePass, but i can't use that to automatically log in on my phone can i? I know very little about cellphone technology.

I don't think KeePass has deep integration with either Android or iOS, but you can always open KeePass, copy the password, switch back to Plex and paste the password.

porktree
Mar 23, 2002

You just fucked with the wrong Mexican.

Dongattack posted:

I do use KeePass, but i can't use that to automatically log in on my phone can i? I know very little about cellphone technology.

You can use it to copy the pw from KeepPass and paste it into the login.

SymmetryrtemmyS
Jul 13, 2013

I got super tired of seeing your avatar throwing those fuckin' glasses around in the astrology thread so I fixed it to a .jpg
Bitwarden is a good alternative that does have Android integration - not sure about iOS, though.

8-bit Miniboss
May 24, 2005

CORPO COPS CAME FOR MY :filez:

SymmetryrtemmyS posted:

Bitwarden is a good alternative that does have Android integration - not sure about iOS, though.

I use Bitwarden on iOS currently. Seems fine and works with Safari and apps that use it.

Fart of Presto
Feb 9, 2001
Clapping Larry

Dongattack posted:

I do use KeePass, but i can't use that to automatically log in on my phone can i? I know very little about cellphone technology.

I use Keepass2Android which has just added the Android 8 Autofill feature. Not sure if it's just a web thing or also apps, as I haven't tried that functionality out yet.

Lawen
Aug 7, 2000

RoboBoogie posted:

i need some automation in my process

I have a VPS in France that downloads linux isos that was pushed by sonarr using nzbget. After it downloads i run the list of commands to push the unrar'd folders to a rclone folder for post processing by sonarr

code:
mv * ../staging && cd ../staging && rclone move . "linux:staging/" && rm -rf * && cd ../linuxiso 
Then sonarr would move the files to the right folder and then the file will magically show up on Plex. This is not girlfriend friendly and is not a smooth process as i need to log in and run the list of commands for magic to happen.

what is the best way to create a script that will move the folder to the rclone drive and then deletes the empty folder after it completes unrar-ing?

Cheers

How good is your bash? You should be able to take the commands you listed and turn them into a shell script pretty easily. Use `set -e` if you want it to behave like the && are behaving (stop/break if one of the commands doesn't return 0). Add the directory you want to run it on as your $1 argument. Add some error handling, maybe.

If you really want to automate it, make the script iterate over everything in your incoming folder and set a cronjob to run it once an hour or whatever.

Volguus
Mar 3, 2009

RoboBoogie posted:

i need some automation in my process

I have a VPS in France that downloads linux isos that was pushed by sonarr using nzbget. After it downloads i run the list of commands to push the unrar'd folders to a rclone folder for post processing by sonarr

code:
mv * ../staging && cd ../staging && rclone move . "linux:staging/" && rm -rf * && cd ../linuxiso 
Then sonarr would move the files to the right folder and then the file will magically show up on Plex. This is not girlfriend friendly and is not a smooth process as i need to log in and run the list of commands for magic to happen.

what is the best way to create a script that will move the folder to the rclone drive and then deletes the empty folder after it completes unrar-ing?

Cheers

Here's an move.sh script that I use to move downloads into a folder. Feel free to modify and improve it as you see fit:

code:
#!/bin/sh

##############################################################################
### NZBGET POST-PROCESSING SCRIPT                                          ###

# move to folder

### NZBGET POST-PROCESSING SCRIPT       ###
###########################################


if [ "$NZBPP_TOTALSTATUS" != "SUCCESS" ]; then
        echo "[ERROR] This nzb-file was not processed correctly, terminating the script"
        exit 95
fi

dest_dir="/target_folder/$NZBPP_CATEGORY"

if [ -z "$NZBPP_CATEGORY" ]; then
        dest_dir="target_folder"
fi

size=$(du -s "$NZBPP_DIRECTORY"|cut -f 1)
echo "dir size is $size bytes"
start=$(date +%s)

mkdir -p "$dest_dir"
mv -f "$NZBPP_DIRECTORY" "$dest_dir"
result=$?

end=$(date +%s)
duration=$(echo $(($end - $start)))
speed=$(echo $(($size / $duration)))

echo "Moved $NZBPP_NZBNAME of size $size KB in $duration seconds, an average of $speed KB/s"

if [ $result -eq 0 ]; then
        echo "move success"
        echo "[NZB] DIRECTORY=$dest_dir"
        exit 93
fi

echo "move failed"
exit 94

Dongattack
Dec 20, 2006

by Cyrano4747

insularis posted:

Well, it looks like you can install ffmpeg on a Synology, so changing containers shouldn't be hard. Basically just make a script that runs every so often that looks for .MKV extension files and pipes that result into

code:
ffmpeg -i %scriptoutput.mkv -acodec copy -vcodec copy out.mp4  && rm %scriptoutput.mkv
That way you're not transcoding the content and hammering your NAS processor, just changing containers.

Here's a Synology forum thread about installing ffmpeg that you can read through whenever their forums come back up.

Here's a little script to do everything in a directory:

code:
#!/bin/bash
if [ -d "${1}" ] ; then
  cd "${1}" && for f in *.mkv; do ffmpeg -i "$f" -acodec copy -vcodec copy "${f%.mkv}.mp4"; done
fi
Save that as mkv2mp4 and
code:
chmod +x mkv2mp4
it to make it executable.

and then use it by calling:

code:
find /mnt/media/series/SomeDirectoryWhereYourMKVsAre -type d -exec ./mkv2mp4 "{}" \; && rm *.mkv
This took about 30 seconds to complete the conversion in a TV directory with 13 MKVs on my FreeNAS array.

So, just put command in a scheduled task or cron job (not sure how Synology handles those), and all your .mkv files will be converted to .mp4 every time it runs, and then the .mkv files will be deleted.

I'm working on this now and i have managed to install ffmpeg on the synology, but i'm stumped with the rest. I don't know how to make the script, i don't know where to type the commands you list here (can't seem to find a command prompt of any sort on the NAS) and also have no idea how to make it into a scheduled task (might not be possible? id be fine with just batch doing it manually tbh).
Would really love some more help! Depending on your timezone i might reply late, i'm going to bed over here now.

insularis
Sep 21, 2002

Donated $20. Get well, Lowtax.
Fun Shoe

Dongattack posted:

I'm working on this now and i have managed to install ffmpeg on the synology, but i'm stumped with the rest. I don't know how to make the script, i don't know where to type the commands you list here (can't seem to find a command prompt of any sort on the NAS) and also have no idea how to make it into a scheduled task (might not be possible? id be fine with just batch doing it manually tbh).
Would really love some more help! Depending on your timezone i might reply late, i'm going to bed over here now.

Sure, no problem, and if it gets too long-winded for the thread, we can move it to PM.

First things first, and I apologize if I'm making assumptions, but what you're going to need is an SSH connection, which stands for Secure SHell. It's an encrypted connection between two systems, usually used to provide a terminal to work on a remote system. Get a copy of PuTTY (an SSH/terminal connection manager program) from here.

Big fat warning ... you're interested, so I'm telling you, but it doesn't really sound like you have the background yet to be safely working in a root terminal session. If you don't understand something, stop. You can rapidly destroy everything from this window with one bad command.

Next on your Synology, go turn on SSH.

Log in with your admin username and password on the Synology, then open up Control Panel > Terminal and tick the “Enable SSH service” checkbox. Click OK and you're done! Now, run PuTTY, type in 192.168.0.6 , where 192.168.0.6 is the IP of your DiskStation. Choose the radio button underneath for SSH as the connection type. Press Enter, and you'll be asked for a username.
Use the username root. Then it will ask for your Synology password. Type that and press Enter.

Now, from that command window, that's where you'll be typing commands. To edit a file, the easiest thing to do is use nano, a very simple text editor that looks like it's included on the Diskstation. Type nano and press enter. You should see the screen change. Copy and past my script in that window, and press CTRL-O to save it. Give it a name of mkv2mp4.sh Press CTRL-X to exit nano. Type chmod +x mkv2mp4.sh. This tells the system to allow that file to run as a program.

I'm going to make you do some background research here, because I don't have a Synology to look at. You need to find the file path for the directories where your movies/TV are stored that you want to change containers on. Probably something like /mnt/share/movies/blahblahblah/blahblah.mkv for an example of a full path to one movie. I wrote that tiny little script with the intent of feeding it a directory, so for example (you must find your directory structure) you would run the command I gave you with an example directory like from my original post:

find /mnt/media/series/SomeDirectoryWhereYourMKVsAre -type d -exec ./mkv2mp4.sh "{}" \;

I've removed the && rm command from my original line, as that's going to delete files (the mkv's) and I want you to get the conversion one hundred percent functional and reliable before you delete anything. rm stands for remove in Linux land and it's a remorseless killing machine.

So, steps:

1) Turn on SSH.
2) Connect to the terminal of your Synology through SSH
3) Edit and save the script
4) Make it executable
5) Find your file structure so you can pass the script accurate locations on the disk
6) Use the command to feed the script the locations where you want every mkv turned into an mp4.

7) Once everything is verified working, start using rm in the command to remove the mkv's after they've been converted (copied) to mp4s.

insularis fucked around with this message at 12:49 on Mar 9, 2018

Dongattack
Dec 20, 2006

by Cyrano4747
It does not seem like i have nano here, i just get a "-sh: nano: command not found" error when i type "nano into the putty window.

edit: trying to figure out how to install it now
edit2: god drat i wish i had just built a regular computer instead of buying a NAS
edit3: ok, i have discovered that the synology i have has a builtin text editor called VIM or VI, trying to use that now

Dongattack fucked around with this message at 14:50 on Mar 9, 2018

derk
Sep 24, 2004

Dongattack posted:

It does not seem like i have nano here, i just get a "-sh: nano: command not found" error when i type "nano into the putty window.

edit: trying to figure out how to install it now
edit2: god drat i wish i had just built a regular computer instead of buying a NAS
edit3: ok, i have discovered that the synology i have has a builtin text editor called VIM or VI, trying to use that now

you should be able to install nano. VI is confusing to use, especially for a rookie such as yourself, unless you have documentation on how to navigate and execute in VI, i highly suggest NOT using it!

Volguus
Mar 3, 2009

derk posted:

you should be able to install nano. VI is confusing to use, especially for a rookie such as yourself, unless you have documentation on how to navigate and execute in VI, i highly suggest NOT using it!

Oh come on, figuring out how to exit vi is a rite of passage.

Slash
Apr 7, 2011

Dongattack posted:

It does not seem like i have nano here, i just get a "-sh: nano: command not found" error when i type "nano into the putty window.

edit: trying to figure out how to install it now
edit2: god drat i wish i had just built a regular computer instead of buying a NAS
edit3: ok, i have discovered that the synology i have has a builtin text editor called VIM or VI, trying to use that now

Synology does indeed have vi

Have fun with vi if you've never used it!

derk
Sep 24, 2004

Volguus posted:

Oh come on, figuring out how to exit vi is a rite of passage.

lol, anyways!

1st: https://www.jimmybonney.com/articles/install_gmvault_on_a_synology_nas_follow_up/

2nd:
https://www.jimmybonney.com/articles/configure_nano_syntax_highlighting_synology/

Dongattack
Dec 20, 2006

by Cyrano4747
It wasn't that bad, :q! and :wq.
To even install nano i have to have something called IPKG and to get that going i need to get the correct bootstrap for my CPU, i didn't manage to find the correct one for my DS218+ that is running Intel Celeron J3355.

So i tried to do it in VI by doing "vi mkv2mp4.sh", pasting in the script and going :wq to save and quit. But i can't seem to create/save files i think, i get a error that says ""mkv2mp4.sh" E212: Can't open file for writing".

Edit: Also i can't seem to get into the "root" account via SSH putty, none of my passwords work for that. I can access the admin and my user account tho.

derk
Sep 24, 2004

Volguus posted:

Oh come on, figuring out how to exit vi is a rite of passage.

I have experience with VI and I would rather use nano.

Dead Goon
Dec 13, 2002

No Obvious Flaws



code:
:q

Dongattack
Dec 20, 2006

by Cyrano4747
Ok, i at least got into the "root" account now by logging into the admin account and doing sudo -i which gave me a spiderman quote. Have made the script and told it to run as a program. Currently trying to figure out the path to my mkv files :yayclod:

edit: ok holy poo poo its doing something, i think its doing it
edit2: hah yeah, it's doing it! Thank you sooooo much insularis! I'll be back ITT pretty soon probably to ask for help with making it a scheduled operation or to whine that this didn't fix my stuttering issues via PLEX.

Dongattack fucked around with this message at 16:13 on Mar 9, 2018

insularis
Sep 21, 2002

Donated $20. Get well, Lowtax.
Fun Shoe

Dongattack posted:

Ok, i at least got into the "root" account now by logging into the admin account and doing sudo -i which gave me a spiderman quote. Have made the script and told it to run as a program. Currently trying to figure out the path to my mkv files :yayclod:

edit: ok holy poo poo its doing something, i think its doing it
edit2: hah yeah, it's doing it! Thank you sooooo much insularis! I'll be back ITT pretty soon probably to ask for help with making it a scheduled operation or to whine that this didn't fix my stuttering issues via PLEX.

DUDE!

Excellent work, and great job working through some roadblocks. I'm really glad it's working for you ... you'll find all sorts of uses for ffmpeg over the years, it's insanely powerful. And don't feel bad about buying a NAS, that underlying Linux system is almost identical to what I'm using (which is a full blown Linux VM, but the commandline concepts are the same).

Let me know when you're ready to move forward with scheduling and auto-deletion.

EL BROMANCE
Jun 10, 2006

COWABUNGA DUDES!
🥷🐢😬



I still need to learn the strings for ffmpeg so I can stream out from my HDHomeRun over the web at a useable bitrate. I’m sure it will work. Eventually.

wolrah
May 8, 2006
what?

derk posted:

I have experience with VI and I would rather use nano.
:hfive:

Figuring out how to exit vi is a rite of passage, but the real test is how you react to the experience.

The correct reaction of course being ":psyboom: wtf why do people choose to use this nonsensical thing?"

A text editor should not require a manual to perform basic functions. Have all the hidden shortcuts and commands you want for advanced features, but there's no good reason for load/save/find/replace to be anything but straightforward. 95% of the time where I need a command line editor all I need to do is change a few lines in a config file, anything beyond that is what GUI editors and IDEs are for. Nano is perfect for config files.

insularis
Sep 21, 2002

Donated $20. Get well, Lowtax.
Fun Shoe

wolrah posted:

:hfive:

Figuring out how to exit vi is a rite of passage, but the real test is how you react to the experience.

The correct reaction of course being ":psyboom: wtf why do people choose to use this nonsensical thing?"

A text editor should not require a manual to perform basic functions. Have all the hidden shortcuts and commands you want for advanced features, but there's no good reason for load/save/find/replace to be anything but straightforward. 95% of the time where I need a command line editor all I need to do is change a few lines in a config file, anything beyond that is what GUI editors and IDEs are for. Nano is perfect for config files.

Agreed on all counts. Besides, if you need to seriously manipulate text in a complicated way, there's better tools, like sed/awk/anything else.

Keito
Jul 21, 2005

WHAT DO I CHOOSE ?
I use vim for everything because it works very well and is convenient once you get used to it. It sure is an acquired taste. Good thing there's no lack of alternatives for those who don't like it.

Dongattack
Dec 20, 2006

by Cyrano4747
So Plex is still stuttering. I found a status menu that tells me it's still transcoding from "VC1" to "H264". Maybe mp4 wasn't what was needed, can that script be changed to do mkv to H264?

derk
Sep 24, 2004
Ok, what are you running plex on for the server? What is your client setup? Is the client hard wired or wireless? is it local or remote?

Adbot
ADBOT LOVES YOU

Dongattack
Dec 20, 2006

by Cyrano4747
I'm running Plex on a Synology NAS DS218+. I'm not sure what you mean by client setup. The client(s) are wireless. I'm also not sure what you mean by local or remote, the NAS is in the same building as me connected wired to the router.

Edit: I wonder if maybe the bitrate is just too much sometimes. Cause the episodes that are below 4 gigs play fine, but once they hit 5 gigs it starts to act up.

Dongattack fucked around with this message at 18:12 on Mar 9, 2018

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply