{"action":"created","issue":{"url":"https://api.github.com/repos/clinton-hall/nzbToMedia/issues/846","labels_url":"https://api.github.com/repos/clinton-hall/nzbToMedia/issues/846/labels{/name}","comments_url":"https://api.github.com/repos/clinton-hall/nzbToMedia/issues/846/comments","events_url":"https://api.github.com/repos/clinton-hall/nzbToMedia/issues/846/events","html_url":"https://github.com/clinton-hall/nzbToMedia/issues/846","id":109621717,"number":846,"title":"Plex library updates are triggered for failed downloads","user":{"login":"hugepants","id":4482452,"avatar_url":"https://avatars.githubusercontent.com/u/4482452?v=3","gravatar_id":"","url":"https://api.github.com/users/hugepants","html_url":"https://github.com/hugepants","followers_url":"https://api.github.com/users/hugepants/followers","following_url":"https://api.github.com/users/hugepants/following{/other_user}","gists_url":"https://api.github.com/users/hugepants/gists{/gist_id}","starred_url":"https://api.github.com/users/hugepants/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hugepants/subscriptions","organizations_url":"https://api.github.com/users/hugepants/orgs","repos_url":"https://api.github.com/users/hugepants/repos","events_url":"https://api.github.com/users/hugepants/events{/privacy}","received_events_url":"https://api.github.com/users/hugepants/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/clinton-hall/nzbToMedia/labels/BUG","name":"BUG","color":"fc2929"},{"url":"https://api.github.com/repos/clinton-hall/nzbToMedia/labels/Fix%20needs%20verification","name":"Fix needs verification","color":"eb6420"},{"url":"https://api.github.com/repos/clinton-hall/nzbToMedia/labels/in%20nightly","name":"in nightly","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-03T12:51:44Z","updated_at":"2015-10-10T23:24:13Z","closed_at":null,"body":"Plex library updates are working well (thanks Clinton!), but updates are triggered even when there is a failed download, causing unnecessary library scans that eat up resources.\r\n\r\n```\r\n[21:04:58] [INFO]::MAIN: Loading config from [/storage/.kodi/userdata/addon_data/script.service.audo/scripts/autoProcessMedia.cfg]\r\n[21:04:58] [INFO]::MAIN: Checking database structure...\r\n[21:04:58] [DEBUG]::MAIN: Checking Initial Schema database upgrade\r\n[21:04:58] [DEBUG]::MAIN: InitialSchema upgrade not required\r\n[21:04:58] [INFO]::MAIN: Version checking is disabled, not checking for the newest version\r\n[21:04:58] [INFO]::MAIN: nzbToMedia Version:10.12 Branch:master (Linux 4.1.6)\r\n[21:04:58] [DEBUG]::MAIN: Connecting to transmission: http://127.0.0.1:9091\r\n[21:04:58] [INFO]::MAIN: #########################################################\r\n[21:04:58] [INFO]::MAIN: ## ..::[nzbToMedia.pyo]::.. ##\r\n[21:04:58] [INFO]::MAIN: #########################################################\r\n[21:04:58] [DEBUG]::MAIN: Options passed into nzbToMedia: ['/storage/.kodi/userdata/addon_data/script.service.audo/scripts/nzbToSickBeard.py', '/storage/pool/downloads/incomplete/Show.2015.S01E01.720p.x264', 'Show.2015.S01E01.720p.x264.nzb', 'Show.2015.S01E01.720p.x264', '', 'sickbeard', 'alt.some.group', '3']\r\n[21:04:58] [INFO]::MAIN: Script triggered from SABnzbd\r\n[21:04:58] [DEBUG]::MAIN: Searching for nzoid from SAbnzbd ...\r\n[21:04:58] [DEBUG]::MAIN: Adding NZB download info for directory /storage/pool/downloads/incomplete/Show.2015.S01E01.720p.x264 to database\r\n[21:04:58] [INFO]::MAIN: Auto-detected SECTION:SickBeard\r\n[21:04:58] [DEBUG]::MAIN: Checking for archives to extract in directory: /storage/pool/downloads/incomplete/Show.2015.S01E01.720p.x264\r\n[21:04:59] [DEBUG]::MAIN: EXTRACTOR: Unknown file type: \r\n[21:04:59] [INFO]::MAIN: Extracting /storage/pool/downloads/incomplete/Show.2015.S01E01.720p.x264/__ADMIN__/Show.2015.S01E01.720p.x264.nzb.gz to /storage/pool/downloads/incomplete/Show.2015.S01E01.720p.x264/__ADMIN__\r\n[21:04:59] [DEBUG]::MAIN: Extracting [] /storage/pool/downloads/incomplete/Show.2015.S01E01.720p.x264/__ADMIN__/Show.2015.S01E01.720p.x264.nzb.gz /storage/pool/downloads/incomplete/Show.2015.S01E01.720p.x264/__ADMIN__\r\n[21:04:59] [ERROR]::MAIN: EXTRACTOR: Extraction failed for /storage/pool/downloads/incomplete/Show.2015.S01E01.720p.x264/__ADMIN__/Show.2015.S01E01.720p.x264.nzb.gz. Result was 126\r\n[21:04:59] [INFO]::MAIN: Calling SickBeard:sickbeard to post-process:Show.2015.S01E01.720p.x264.nzb\r\n[21:04:59] [INFO]::MAIN: SickBeard:sickbeard fork set to sickrage\r\n[21:04:59] [WARNING]::SICKBEARD: No media files found in directory /storage/pool/downloads/incomplete/Show.2015.S01E01.720p.x264. Processing this as a failed download\r\n[21:04:59] [POSTPROCESS]::SICKBEARD: FAILED: The download failed. Sending 'failed' process request to sickrage branch\r\n[21:04:59] [DEBUG]::SICKBEARD: Opening URL: http://127.0.0.1:8082/home/postprocess/processEpisode with params: {'nzbName': 'Show.2015.S01E01.720p.x264.nzb', 'quiet': 1, 'failed': 1, 'dir': '/storage/pool/downloads/incomplete/Show.2015.S01E01.720p.x264'}\r\n[21:04:59] [POSTPROCESS]::SICKBEARD: Processing folder /storage/pool/downloads/incomplete/Show.2015.S01E01.720p.x264\r\n[21:04:59] [POSTPROCESS]::SICKBEARD: TV_DOWNLOAD_DIR: /storage/downloads/\r\n[21:04:59] [POSTPROCESS]::SICKBEARD: PostProcessing Path: /storage/pool/downloads/incomplete\r\n[21:04:59] [POSTPROCESS]::SICKBEARD: PostProcessing Dirs: [u'Show.2015.S01E01.720p.x264']\r\n[21:04:59] [POSTPROCESS]::SICKBEARD: PostProcessing Files: []\r\n[21:04:59] [POSTPROCESS]::SICKBEARD: PostProcessing VideoFiles: []\r\n[21:04:59] [POSTPROCESS]::SICKBEARD: PostProcessing RarContent: []\r\n[21:04:59] [POSTPROCESS]::SICKBEARD: PostProcessing VideoInRar: []\r\n[21:04:59] [POSTPROCESS]::SICKBEARD: Processing folder Show.2015.S01E01.720p.x264\r\n[21:04:59] [POSTPROCESS]::SICKBEARD: Failed download detected: (Show.2015.S01E01.720p.x264.nzb, /storage/pool/downloads/incomplete/Show.2015.S01E01.720p.x264)\r\n[21:04:59] [POSTPROCESS]::SICKBEARD: Failed Download Processing succeeded: (Show.2015.S01E01.720p.x264.nzb, /storage/pool/downloads/incomplete/Show.2015.S01E01.720p.x264)\r\n[21:04:59] [POSTPROCESS]::SICKBEARD: Processing completed\r\n[21:04:59] [POSTPROCESS]::SICKBEARD: I did encounter some unprocessable items: \r\n[21:04:59] [POSTPROCESS]::SICKBEARD: [Show.2015.S01E01.720p.x264 : Failed download]\r\n[21:04:59] [POSTPROCESS]::SICKBEARD: Deleting failed files and folder /storage/pool/downloads/incomplete/Show.2015.S01E01.720p.x264\r\n[21:04:59] [INFO]::MAIN: Deleting /storage/pool/downloads/incomplete/Show.2015.S01E01.720p.x264\r\n[21:04:59] [DEBUG]::PLEX: Attempting to update Plex Library for category sickbeard.\r\n[21:04:59] [DEBUG]::PLEX: Plex Library has been refreshed.\r\n[21:04:59] [INFO]::CLEANDIR: Directory /storage/pool/downloads/incomplete/Show.2015.S01E01.720p.x264 has been processed and removed ...\r\n[21:04:59] [INFO]::MAIN: The /storage/.kodi/userdata/addon_data/script.service.audo/scripts/nzbToSickBeard.py script completed successfully.\r\nSickBeard: Successfully post-processed Show.2015.S01E01.720p.x264.nzb!\r\n```"},"comment":{"url":"https://api.github.com/repos/clinton-hall/nzbToMedia/issues/comments/147135483","html_url":"https://github.com/clinton-hall/nzbToMedia/issues/846#issuecomment-147135483","issue_url":"https://api.github.com/repos/clinton-hall/nzbToMedia/issues/846","id":147135483,"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":"2015-10-10T23:24:13Z","updated_at":"2015-10-10T23:24:13Z","body":"Can you please test the latest nightly?"}}