[GetScripts] Various Scripts

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
clintonhall
Posts: 449
Joined: 15 Dec 2012, 01:52
Location: Australia
Contact:

Re: [GetScripts] Various Scripts

Post by clintonhall » 16 Nov 2015, 11:07

If the "sample" exists in the release name, then it won't be deleted.

You do have the option to set

Code: Select all

SampleIDs=sizeonly

kjKmcQN3
Posts: 58
Joined: 29 Aug 2015, 15:09

Re: [GetScripts] Various Scripts

Post by kjKmcQN3 » 16 Nov 2015, 12:07

By release name, do you mean the name of the nzb file? The example that I talked about is named in the following manner:

File name: abc.def.720p-sample.mp4.nzb
Nzb title in NZBGet: abc def 720p-sample mp4
Files that I am left with once download finishes (after Cleanup etc): abc.def.720p-sample.mp4 and abc.def.720p.mp4

asselnik
Posts: 13
Joined: 11 Nov 2015, 08:01

Re: [GetScripts] Various Scripts

Post by asselnik » 22 Nov 2015, 12:22

Hello,
what can i do when i only want to copy *.mkv Files, and all other Files i want to delete?

Pixelfanatic
Posts: 13
Joined: 11 Jul 2014, 17:27

Re: [GetScripts] Various Scripts

Post by Pixelfanatic » 13 Aug 2016, 09:19

Unfortunately I get the following error when using SafeRename with Sabnzbd (Already opened an issue in github):

Code: Select all

Script triggered from SABnzbd
[INFO] Extracting file /share/Downloads/complete/tv/xxxx/win_click2rename.bat with command UnRAR.exe x -p339124433 Click.rar
Traceback (most recent call last):
File "/usr/share/sabnzbdplus/sabnzbd/SafeRename.py", line 160, in rename_script(dirname)
File "/usr/share/sabnzbdplus/sabnzbd/SafeRename.py", line 117, in rename_script
p = Popen(cmd, stdout=devnull, stderr=devnull) # should extract files fine.
File "/usr/lib/python2.7/subprocess.py", line 679, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

Tried NZBget - same error:

Code: Select all

ERROR Sat Aug 13 2016 10:57:51 Post-process-script SafeRename.py for xxxxx failed (terminated with unknown status)
INFO Sat Aug 13 2016 10:57:51 SafeRename: OSError: [Errno 2] No such file or directory
INFO Sat Aug 13 2016 10:57:51 SafeRename: raise child_exception
INFO Sat Aug 13 2016 10:57:51 SafeRename: File "/usr/lib/python2.7/subprocess.py", line 1259, in execute_child
INFO Sat Aug 13 2016 10:57:51 SafeRename: errread, errwrite)
INFO Sat Aug 13 2016 10:57:51 SafeRename: File "/usr/lib/python2.7/subprocess.py", line 679, in __init_
INFO Sat Aug 13 2016 10:57:51 SafeRename: p = Popen(cmd, stdout=devnull, stderr=devnull) # should extract files fine.
INFO Sat Aug 13 2016 10:57:51 SafeRename: File "/opt/nzbget/scripts/SafeRename.py", line 117, in rename_script
INFO Sat Aug 13 2016 10:57:51 SafeRename: rename_script(dirname)
Edit:
The File "win_click2rename.bat" causes the issue.
After deleting "win_click2rename.bat" the script is working fine. Because I am not able to fix the script myself, I hope clintonhall is still active :)

Edit2:

I changed the line

if re.search('(rename\S*\.(sh|bat)$)',file,re.IGNORECASE) or file == 'What.sh':
to
if re.search('(a_Linux_2rename\S*\.(sh|bat)$)',file,re.IGNORECASE) or file == 'What.sh':

I don´t know if thats complete nonsense, but the script now works ;)

Pixelfanatic
Posts: 13
Joined: 11 Jul 2014, 17:27

Re: [GetScripts] Various Scripts

Post by Pixelfanatic » 28 Nov 2016, 17:51

Sorry for the late reply.
There seems to be an error in the updated SafeRename.py:
It does not show up in the postscript list, because the configuration definition is missing (After adding it at the beginning of the script shows up in list)

Unfortunately I had no file yet to test the script...

clintonhall
Posts: 449
Joined: 15 Dec 2012, 01:52
Location: Australia
Contact:

Re: [GetScripts] Various Scripts

Post by clintonhall » 30 Nov 2016, 12:11

What config definition did you add?

This is showing and working at my end.

Pixelfanatic
Posts: 13
Joined: 11 Jul 2014, 17:27

Re: [GetScripts] Various Scripts

Post by Pixelfanatic » 04 Dec 2016, 21:26

*facepalm*
tried to clone the script with wget instead of git command..... nevermind...

Edit:
Saferename Error when launching script:

Sun Dec 4 22:41:00 2016 INFO SafeRename: Script triggered from NZBGet Version 17.1.
Sun Dec 4 22:41:00 2016 INFO SafeRename: Traceback (most recent call last):
Sun Dec 4 22:41:00 2016 INFO SafeRename: File "/opt/nzbget/scripts/SafeRename.py", line 84, in <module>
Sun Dec 4 22:41:00 2016 INFO SafeRename: CHMOD = int(str(os.environ["CHMOD"]), 8)
Sun Dec 4 22:41:00 2016 INFO SafeRename: File "/usr/lib/python2.7/UserDict.py", line 23, in __getitem__
Sun Dec 4 22:41:00 2016 INFO SafeRename: raise KeyError(key)
Sun Dec 4 22:41:00 2016 INFO SafeRename: KeyError: 'CHMOD'

clintonhall
Posts: 449
Joined: 15 Dec 2012, 01:52
Location: Australia
Contact:

Re: [GetScripts] Various Scripts

Post by clintonhall » 05 Dec 2016, 03:51

I just updated this agin to include a new feature. Please look at the script in NZBget settings, save all changes, restart and then try to postprocess again.

Pixelfanatic
Posts: 13
Joined: 11 Jul 2014, 17:27

Re: [GetScripts] Various Scripts

Post by Pixelfanatic » 05 Dec 2016, 22:41

Same error

Code: Select all

Mon Dec  5 23:31:46 2016	INFO	SafeRename.py: Script triggered from NZBGet Version 17.1.
Mon Dec  5 23:31:46 2016	INFO	SafeRename.py: Traceback (most recent call last):
Mon Dec  5 23:31:46 2016	INFO	SafeRename.py:   File "/opt/nzbget/scripts/SafeRename.py", line 84, in <module>
Mon Dec  5 23:31:46 2016	INFO	SafeRename.py:     CHMOD = int(str(os.environ["CHMOD"]), 8)
Mon Dec  5 23:31:46 2016	INFO	SafeRename.py:   File "/usr/lib/python2.7/UserDict.py", line 23, in __getitem__
Mon Dec  5 23:31:46 2016	INFO	SafeRename.py:     raise KeyError(key)
Mon Dec  5 23:31:46 2016	INFO	SafeRename.py: KeyError: 'CHMOD'
The error occurs with every file

clintonhall
Posts: 449
Joined: 15 Dec 2012, 01:52
Location: Australia
Contact:

Re: [GetScripts] Various Scripts

Post by clintonhall » 06 Dec 2016, 04:46


Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests