{"action":"created","issue":{"url":"https://api.github.com/repos/clinton-hall/GetScripts/issues/14","repository_url":"https://api.github.com/repos/clinton-hall/GetScripts","labels_url":"https://api.github.com/repos/clinton-hall/GetScripts/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/clinton-hall/GetScripts/issues/14/comments","events_url":"https://api.github.com/repos/clinton-hall/GetScripts/issues/14/events","html_url":"https://github.com/clinton-hall/GetScripts/issues/14","id":190752392,"number":14,"title":"SafeRename.py","user":{"login":"w00druff","id":10478168,"avatar_url":"https://avatars.githubusercontent.com/u/10478168?v=3","gravatar_id":"","url":"https://api.github.com/users/w00druff","html_url":"https://github.com/w00druff","followers_url":"https://api.github.com/users/w00druff/followers","following_url":"https://api.github.com/users/w00druff/following{/other_user}","gists_url":"https://api.github.com/users/w00druff/gists{/gist_id}","starred_url":"https://api.github.com/users/w00druff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w00druff/subscriptions","organizations_url":"https://api.github.com/users/w00druff/orgs","repos_url":"https://api.github.com/users/w00druff/repos","events_url":"https://api.github.com/users/w00druff/events{/privacy}","received_events_url":"https://api.github.com/users/w00druff/received_events","type":"User","site_admin":false},"labels":[{"id":149546086,"url":"https://api.github.com/repos/clinton-hall/GetScripts/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":24,"created_at":"2016-11-21T15:39:35Z","updated_at":"2016-12-01T22:10:44Z","closed_at":"2016-12-01T02:19:37Z","body":"Hey Clinton,\r\n\r\ncan you please check the nzb i just mailed you when you get some time ?\r\nMaybe its my fault but it would be nice if you can just try this nzb on your side.\r\nThanks a lot !\r\n\r\nI thought it already worked with this one but after many minutes ill get this output:\r\n\r\n`Traceback (most recent call last):\r\n  File \"/var/opt/sabnzbd/scripts/SafeRename.py\", line 211, in <module>\r\n    rename_script(dirname)\r\n  File \"/var/opt/sabnzbd/scripts/SafeRename.py\", line 112, in rename_script\r\n    cmd = extract_command(shlex.split(line), dirname)\r\n  File \"/var/opt/sabnzbd/scripts/SafeRename.py\", line 162, in extract_command\r\n    if platform.system() == 'Windows':\r\nNameError: global name 'platform' is not defined`"},"comment":{"url":"https://api.github.com/repos/clinton-hall/GetScripts/issues/comments/264311357","html_url":"https://github.com/clinton-hall/GetScripts/issues/14#issuecomment-264311357","issue_url":"https://api.github.com/repos/clinton-hall/GetScripts/issues/14","id":264311357,"user":{"login":"clinton-hall","id":1888006,"avatar_url":"https://avatars.githubusercontent.com/u/1888006?v=3","gravatar_id":"","url":"https://api.github.com/users/clinton-hall","html_url":"https://github.com/clinton-hall","followers_url":"https://api.github.com/users/clinton-hall/followers","following_url":"https://api.github.com/users/clinton-hall/following{/other_user}","gists_url":"https://api.github.com/users/clinton-hall/gists{/gist_id}","starred_url":"https://api.github.com/users/clinton-hall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clinton-hall/subscriptions","organizations_url":"https://api.github.com/users/clinton-hall/orgs","repos_url":"https://api.github.com/users/clinton-hall/repos","events_url":"https://api.github.com/users/clinton-hall/events{/privacy}","received_events_url":"https://api.github.com/users/clinton-hall/received_events","type":"User","site_admin":false},"created_at":"2016-12-01T22:10:44Z","updated_at":"2016-12-01T22:10:44Z","body":"Yeah... all of these scripts were written for NZBGet. I added SABnzbd functionality to SafeRename only (presumably on request... by you??).\r\n\r\nAnyway, I had forgotten that you actually call this from SABnzbd, so when I added this I by-passed SABnzbd.\r\n\r\nWhat I have done is set this up to CHMOD 0775 by default. I have also set this up to delete .sh and .bat by default.\r\n\r\nIf you want to add/change, you need to change these on lines 103/104\r\nhttps://github.com/clinton-hall/GetScripts/blob/b0bf2a9f552b8b09937e6c3717f4882494d1d0ec/SafeRename.py#L103-L104\r\n\r\nChange from\r\n```\r\n    CHMOD = int(\"0775\", 8)\r\n    CLEANUP = [\".sh\", \".bat\"]\r\n```\r\nto\r\n```\r\n    CHMOD = int(\"0777\", 8)\r\n    CLEANUP = [\".sh\", \".bat\", \".rar\", \".zip\"]\r\n```\r\n etc.\r\n\r\nI think this will probably mean for future updates you will need to `git reset -- hard` before doing git pull. And then you will need to edit these after updating... So make a config file I need to add a bit more, and unless I make all scripts SABnzbd compatible, this seems rather un-necessary?\r\nKeep in mind, SABnzbd can only launch 1 script, whereas NZBGet can process multiple scripts in a defined order..."}}
{"actor":{"display_login":"clinton-hall"}}