Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TorrentToMedia with Synology - Using temp download directory - not recognising sickrage paths #925

Closed
MrCee opened this issue Dec 24, 2015 · 20 comments

Comments

@MrCee
Copy link

MrCee commented Dec 24, 2015

Hi All,

I've updated the Download Station wiki to enable scripts to run on Synology Download Station after the DSM 5.1 AppArmor inclusion. This worked for myself for sometime, but now I'm seeing some issues where TorrentToMedia.py picks up on the original DOWNLOAD_TR_TMP_DIR instead of the directory the downloaded files are supposed to be used for post processing.

Download Station will download partial downloads to DOWNLOAD_TR_TMP_DIR. Once complete, the DOWNLOAD_TR_TMP_DIR would normally be used for seeding until files are removed from Download Station. My saved destination for post processing torrents would be /volume1/downloads/process/tv. They are linked to the same file, but the script will always pick up on the DOWNLOAD_TR_TMP_DIR first and class this as UNCAT.

I have seen other users having the same problem here >>>
https://sickrage.tv/forums/forum/help-support/nzbtomedia-support/30815-torrenttomedia-with-synology-using-temp-download-directory

Im using sickrage and not sickragetv.... yet we (other user posting the same issue) are both on Synology NAS. Note: Download Station forces us to use the DOWNLOAD_TR_TMP_DIR. The path is listed in settings.json "incomplete-dir": "/var/services/download", >>> This points to /volume1/@Download.

Is there anyway you can get the TorrentToMedia.py to recognise the chosen downloaded directory and not the DOWNLOAD_TR_TMP_DIR?

I went back to an old commit just to see if it would work again, no luck.

015-12-24 22:34:22 INFO    ::MAIN: Loading config from [/volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/autoProcessMedia.cfg]
2015-12-24 22:34:22 INFO    ::ENVIRONMENT: TR_APP_VERSION: 2.84
2015-12-24 22:34:22 INFO    ::ENVIRONMENT: TR_TORRENT_HASH: ba1a98ac157f4366c2cfca325ba2c98676aea1e7
2015-12-24 22:34:22 INFO    ::ENVIRONMENT: PWD: /
2015-12-24 22:34:22 INFO    ::ENVIRONMENT: TR_TIME_LOCALTIME: Thu Dec 24 22:33:45 2015
2015-12-24 22:34:22 INFO    ::ENVIRONMENT: TR_TORRENT_NAME: Into.The.Badlands.S01E03.HDTV.XviD-FUM[ettv]
2015-12-24 22:34:22 INFO    ::ENVIRONMENT: TR_TORRENT_ID: 1766
2015-12-24 22:34:22 INFO    ::ENVIRONMENT: PATH: /sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin
2015-12-24 22:34:22 INFO    ::ENVIRONMENT: TR_TORRENT_DIR: /var/services/download/1766/DOWNLOAD_TR_TMP_DIR
2015-12-24 22:34:22 INFO    ::MAIN: Checking database structure...
2015-12-24 22:34:22 DEBUG   ::MAIN: Checking Initial Schema database upgrade
2015-12-24 22:34:22 DB      ::MAIN: nzbtomedia.db: SELECT 1 FROM sqlite_master WHERE name = ?; with args ('db_version',)
2015-12-24 22:34:22 DB      ::MAIN: nzbtomedia.db: SELECT db_version FROM db_version
2015-12-24 22:34:22 DEBUG   ::MAIN: InitialSchema upgrade not required
2015-12-24 22:34:22 DEBUG   ::MAIN: Checking if we can use git commands: "/usr/local/bin/git" version
2015-12-24 22:34:22 DEBUG   ::MAIN: Executing "/usr/local/bin/git" version with your shell in /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia
2015-12-24 22:34:22 DEBUG   ::MAIN: git output: git version 2.6.3
2015-12-24 22:34:22 DEBUG   ::MAIN: "/usr/local/bin/git" version : returned successful
2015-12-24 22:34:22 DEBUG   ::MAIN: Using: "/usr/local/bin/git"
2015-12-24 22:34:22 DEBUG   ::MAIN: Executing "/usr/local/bin/git" symbolic-ref -q HEAD with your shell in /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia
2015-12-24 22:34:22 DEBUG   ::MAIN: git output:
2015-12-24 22:34:22 DEBUG   ::MAIN: "/usr/local/bin/git" symbolic-ref -q HEAD returned :
2015-12-24 22:34:22 INFO    ::MAIN: Checking if git needs an update
2015-12-24 22:34:22 DEBUG   ::MAIN: Executing "/usr/local/bin/git" rev-parse HEAD with your shell in /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia
2015-12-24 22:34:23 DEBUG   ::MAIN: git output: 3f0d2d49339cef1f958beb1668452e1cf1bf9ca7
2015-12-24 22:34:23 DEBUG   ::MAIN: "/usr/local/bin/git" rev-parse HEAD : returned successful
2015-12-24 22:34:23 DEBUG   ::MAIN: Executing "/usr/local/bin/git" fetch origin with your shell in /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia
2015-12-24 22:34:24 DEBUG   ::MAIN: git output:
2015-12-24 22:34:24 DEBUG   ::MAIN: "/usr/local/bin/git" fetch origin : returned successful
2015-12-24 22:34:24 DEBUG   ::MAIN: Executing "/usr/local/bin/git" rev-parse --verify --quiet "@{upstream}" with your shell in /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToM$
2015-12-24 22:34:24 DEBUG   ::MAIN: git output: fatal: HEAD does not point to a branch
2015-12-24 22:34:24 DEBUG   ::MAIN: "/usr/local/bin/git" rev-parse --verify --quiet "@{upstream}" returned : fatal: HEAD does not point to a branch
2015-12-24 22:34:24 DEBUG   ::MAIN: git didn't return newest commit hash
2015-12-24 22:34:24 INFO    ::MAIN: No update needed
2015-12-24 22:34:24 INFO    ::MAIN: nzbToMedia Version:3f0d2d49339cef1f958beb1668452e1cf1bf9ca7 Branch:master (Linux 3.2.40)
2015-12-24 22:34:24 DEBUG   ::MAIN: Connecting to transmission: http://localhost:9093
2015-12-24 22:34:24 INFO    ::MAIN: #########################################################
2015-12-24 22:34:24 INFO    ::MAIN: ## ..::[TorrentToMedia.py]::.. ##
2015-12-24 22:34:24 INFO    ::MAIN: #########################################################
2015-12-24 22:34:24 DEBUG   ::MAIN: Options passed into TorrentToMedia: ['/nzbToMedia/TorrentToMedia.py']
2015-12-24 22:34:24 DEBUG   ::MAIN: Adding TORRENT download info for directory /var/services/download/1766/DOWNLOAD_TR_TMP_DIR to database
2015-12-24 22:34:24 DB      ::MAIN: nzbtomedia.db: UPDATE downloads SET status = ?, client_agent = ?, last_update = ?, input_id = ?, input_hash = ?, input_name = ? WHERE input_direct$
2015-12-24 22:34:24 DB      ::MAIN: nzbtomedia.db: INSERT OR IGNORE INTO downloads (status, client_agent, last_update, input_id, input_hash, input_name, input_directory) VALUES (?, ?$
2015-12-24 22:34:24 DEBUG   ::MAIN: Received Directory: /var/services/download/1766/DOWNLOAD_TR_TMP_DIR | Name: Into.The.Badlands.S01E03.HDTV.XviD-FUM[ettv] | Category:
2015-12-24 22:34:24 DEBUG   ::MAIN: SEARCH: Could not find a category in the directory structure
2015-12-24 22:34:24 INFO    ::MAIN: SEARCH: Could not find a unique directory for this download. Assume a common directory.
2015-12-24 22:34:24 INFO    ::MAIN: SEARCH: We will try and determine which files to process, individually
2015-12-24 22:34:24 DEBUG   ::MAIN: Determined Directory: /var/services/download/1766/DOWNLOAD_TR_TMP_DIR | Name: Into.The.Badlands.S01E03.HDTV.XviD-FUM[ettv] | Category: UNCAT
2015-12-24 22:34:24 ERROR   ::MAIN: Unable to locate a section with subsection:UNCAT enabled in your autoProcessMedia.cfg, exiting!
@clinton-hall
Copy link
Owner

I don't understand why Synology does this
TR_TORRENT_DIR: /var/services/download/1766/DOWNLOAD_TR_TMP_DIR

So you actually have everything downloaded to /var/services/download/1766/DOWNLOAD_TR_TMP_DIR?

this is the folder that Download Station is telling TorrentToMedia to check...

Where do you expect TorrentToMedia should check, and what files should it find there?

@MrCee
Copy link
Author

MrCee commented Dec 28, 2015

In the JSON settings we have....

    "incomplete-dir": "/var/services/download",
    "incomplete-dir-enabled": true,

This "incomplete-dir" is a hidden temporary download directory and the JSON settings cannot be changed to false, they are overwritten and revert back to the settings above. The files are moved/linked to the directory specified in Sickrage and only become visible on completion....

/downloads/process/tv/

If there was a way TorrentToMedia.py could use the newest link location specified in Sickrage (which is passed to Download Station) and not the original "incomplete-dir" which stores the files for seeding (even if seeding is disabled) this would possibly fix the issue.

Note: Files are deleted from "incomplete-dir": "/var/services/download" when the torrents are removed from Download Station manually. At this stage when TorrentToMedia.py connects to transmission, the script isn't removing torrents from the Download Station app. I'm not sure if it's supposed to. I have seen it attempt to in the past, I'm not seeing that now and not having much luck with a manual execution.

One other thing I have needed to do is when specifying paths in Sickrage >> Torrent Search >> Download File Location, the path needs to be:

downloads/process/tv and NOT /volume1/downloads/process/tv/

The reason for this is if you specify the full path, when you right click the torrent in Download Station and 'Open Folder Containing'..... Download Station GUI cannot find the file as it appends it's own /volume1/ to the path the file has been moved/linked to.

Any path in auto process.config would need the absolute path i.e. /volume1/downloads/process/tv/

@clinton-hall
Copy link
Owner

The only way to achieve this is to set autoProcessMedia.cfg

[SickBeard]
    [[tv]]
        watch_dir = /volume1/downloads/process/tv/

then run the script manually and not called from Download Station.

@MrCee
Copy link
Author

MrCee commented Dec 29, 2015

Thanks for getting back Clinton. Much appreciated.

I've tried this all again with a fresh install of Sickrage (new branch) and I am back to the latest version of Download Station. (Previously I have tried going back to older versions of Download Station app and TorrentToMedia.py scripts as we used to have this working).

I can confirm that the Sickrage path is definitly specifided as the final destination for the files.
i.e. downloads/process/tv is shown in the Download Station GUI

Furthermore, on new versions of Download Station, the /volume1/@download/1777/DOWNLOAD_TR_TMP_DIR (which is the same as /var/services/download/1777/DOWNLOAD_TR_TMP_DIR
is empty apon completion of download, so I'm unsure why the script picks up on this temp directory. Note: 1777 is the temp torrent download ID generated in Synology.

I still think there has to be a way for TorrentToMedia.py to pick up the path listed in the GUI which is provided by Sickrage and act on this path. I'll keep trying from my end.

@clinton-hall
Copy link
Owner

this is where TorrentToMedia gets the directory
ENVIRONMENT: TR_TORRENT_DIR: /var/services/download/1766/DOWNLOAD_TR_TMP_DIR
So it is Download station that tells TorrenToMedia where to look.
this appears to be a fault in DS where it calls the script before updating the TR_TORRENT_DIR variable...

@MrCee
Copy link
Author

MrCee commented Dec 29, 2015

That makes sense of things, I am sure you are correct with this. Thank you. I had even played around with timing before the script kicked in to no avail. I'll be raising the with Synology. I appreciate your help. I'll update the wiki with any new info I receive.
Cheers.

@MrCee
Copy link
Author

MrCee commented Jan 2, 2016

A manual run of the script is not working either.

I do have watch folders set up. This was working a month or so ago on a manual run. The manual run script would look at the sickrage.db and figure out where to store the final result files which had been renamed. TorrentToMedia.py would at least work with the directories specified in sick rage. I don't believe this is happening now? I have tried changing many options such as Torrent_NoLink = 0 to 1 and dealing with output folders to be appended by the script.

My main question is.... on a manual run of TorrentToMedia.py, should the script pick up the final destination listed in sickrage and move the files to this location. I did have this working not so long ago.

[19:41:24] [INFO]::MAIN: Loading config from [/volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/autoProcessMedia.cfg]
[19:41:24] [INFO]::ENVIRONMENT: LANG: en_US.utf8
[19:41:24] [INFO]::ENVIRONMENT: TERM: xterm-256color
[19:41:24] [INFO]::ENVIRONMENT: SHELL: /bin/ash
[19:41:24] [INFO]::ENVIRONMENT: TZ: AEST-10AEDT,M10.1.0,M4.1.0/3
[19:41:24] [INFO]::ENVIRONMENT: LC_ALL: en_US.utf8
[19:41:24] [INFO]::ENVIRONMENT: SSH_TTY: /dev/pts/0
[19:41:24] [INFO]::ENVIRONMENT: OLDPWD: /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/core
[19:41:24] [INFO]::ENVIRONMENT: PWD: /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia
[19:41:24] [INFO]::ENVIRONMENT: PATH: /opt/bin:/opt/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin
[19:41:24] [INFO]::ENVIRONMENT: PGDATA: /var/services/pgsql
[19:41:24] [INFO]::ENVIRONMENT: LOGNAME: root
[19:41:24] [INFO]::ENVIRONMENT: USER: root
[19:41:24] [INFO]::ENVIRONMENT: TERMINFO: /usr/share/terminfo
[19:41:24] [INFO]::ENVIRONMENT: HOME: /root
[19:41:24] [INFO]::ENVIRONMENT: MAIL: /var/mail/root
[19:41:24] [INFO]::ENVIRONMENT: PAGER: more
[19:41:24] [INFO]::ENVIRONMENT: LD_LIBRARY_PATH: /opt/lib:/opt/include
[19:41:24] [INFO]::MAIN: Checking database structure...
[19:41:24] [DEBUG]::MAIN: Checking Initial Schema database upgrade
[19:41:24] [DB]::MAIN: nzbtomedia.db: SELECT 1 FROM sqlite_master WHERE name = ?; with args ('db_version',)
[19:41:24] [DB]::MAIN: nzbtomedia.db: SELECT db_version FROM db_version
[19:41:24] [DEBUG]::MAIN: InitialSchema upgrade not required
[19:41:24] [DEBUG]::MAIN: Checking if we can use git commands: "/usr/local/bin/git" version
[19:41:24] [DEBUG]::MAIN: Executing "/usr/local/bin/git" version with your shell in /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia
[19:41:24] [DEBUG]::MAIN: git output: git version 2.6.3
[19:41:24] [DEBUG]::MAIN: "/usr/local/bin/git" version : returned successful
[19:41:24] [DEBUG]::MAIN: Using: "/usr/local/bin/git"
[19:41:24] [DEBUG]::MAIN: Executing "/usr/local/bin/git" symbolic-ref -q HEAD with your shell in /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia
[19:41:24] [DEBUG]::MAIN: git output: refs/heads/nightly
[19:41:24] [DEBUG]::MAIN: "/usr/local/bin/git" symbolic-ref -q HEAD : returned successful
[19:41:24] [INFO]::MAIN: Checking if git needs an update
[19:41:24] [DEBUG]::MAIN: Executing "/usr/local/bin/git" rev-parse HEAD with your shell in /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia
[19:41:24] [DEBUG]::MAIN: git output: 6552007fc95d841c95d65f7c9a553b593aed1f8c
[19:41:24] [DEBUG]::MAIN: "/usr/local/bin/git" rev-parse HEAD : returned successful
[19:41:24] [DEBUG]::MAIN: Executing "/usr/local/bin/git" fetch origin with your shell in /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia
[19:41:26] [DEBUG]::MAIN: git output: 
[19:41:26] [DEBUG]::MAIN: "/usr/local/bin/git" fetch origin : returned successful
[19:41:26] [DEBUG]::MAIN: Executing "/usr/local/bin/git" rev-parse --verify --quiet "@{upstream}" with your shell in /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia
[19:41:26] [DEBUG]::MAIN: git output: 6552007fc95d841c95d65f7c9a553b593aed1f8c
[19:41:26] [DEBUG]::MAIN: "/usr/local/bin/git" rev-parse --verify --quiet "@{upstream}" : returned successful
[19:41:26] [DEBUG]::MAIN: Executing "/usr/local/bin/git" rev-list --left-right "@{upstream}"...HEAD with your shell in /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia
[19:41:26] [DEBUG]::MAIN: git output: 
[19:41:26] [DEBUG]::MAIN: "/usr/local/bin/git" rev-list --left-right "@{upstream}"...HEAD : returned successful
[19:41:26] [DEBUG]::MAIN: cur_commit = 6552007fc95d841c95d65f7c9a553b593aed1f8c % (newest_commit)= 6552007fc95d841c95d65f7c9a553b593aed1f8c, num_commits_behind = 0, num_commits_ahead = 0
[19:41:26] [INFO]::MAIN: No update needed
[19:41:26] [INFO]::MAIN: nzbToMedia Version:6552007fc95d841c95d65f7c9a553b593aed1f8c Branch:nightly (Linux 3.2.40)
[19:41:27] [DEBUG]::MAIN: Connecting to transmission: http://localhost:9093
[19:41:27] [ERROR]::MAIN: Failed to connect to Transmission  (***NOTE THE DOWNLOAD STATION DAEMON WAS NOT RUNNING - SYNOLOGY DOWNLOAD STATION ISSUE - DOES NOT AFFECT THE OUTCOME IN THIS CASE)
[19:41:27] [INFO]::MAIN: #########################################################
[19:41:27] [INFO]::MAIN: ## ..::[TorrentToMedia.py]::.. ##
[19:41:27] [INFO]::MAIN: #########################################################
[19:41:27] [DEBUG]::MAIN: Options passed into TorrentToMedia: ['./TorrentToMedia.py']
[19:41:27] [WARNING]::MAIN: Invalid number of arguments received from client, Switching to manual run mode ...
[19:41:27] [INFO]::MAIN: Searching /volume1/downloads/movie/ for mediafiles to post-process ...
[19:41:27] [INFO]::MAIN: Searching /volume1/downloads/movie for mediafiles to post-process ...
[19:41:27] [DEBUG]::MAIN: No directories identified in CouchPotato:movie for post-processing
[19:41:27] [INFO]::MAIN: Searching /volume1/downloads/tv/ for mediafiles to post-process ...
[19:41:27] [DEBUG]::MAIN: Found file 12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4 in root directory /volume1/downloads/tv/.
[19:41:29] [INFO]::COPYLINK: MEDIAFILE: [12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4]
[19:41:29] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/downloads/tv]
[19:41:29] [INFO]::COPYLINK: TARGET FOLDER: [/volume1/downloads/tv/Monkeys]
[19:41:29] [INFO]::COPYLINK: Hard linking SOURCE MEDIAFILE -> TARGET FOLDER
[19:41:29] [INFO]::MAIN: Searching /volume1/downloads/tv for mediafiles to post-process ...
[19:41:29] [DEBUG]::MAIN: Found file 12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4 in root directory /volume1/downloads/tv.
[19:41:29] [INFO]::COPYLINK: MEDIAFILE: [12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4]
[19:41:29] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/downloads/tv]
[19:41:29] [INFO]::COPYLINK: TARGET FOLDER: [/volume1/downloads/tv/Monkeys]
[19:41:29] [INFO]::COPYLINK: MEDIAFILE already exists in the TARGET folder, skipping ...
[19:41:29] [INFO]::MAIN: Starting manual run for SickBeard:tv - Folder:/volume1/downloads/tv/Monkeys
[19:41:29] [INFO]::MAIN: Checking database for download info for Monkeys ...
[19:41:29] [DB]::DB: Getting download info for Monkeys from the DB
[19:41:29] [DB]::MAIN: nzbtomedia.db: SELECT * FROM downloads WHERE input_name=? AND status=? with args [u'Monkeys', 0]
[19:41:29] [INFO]::MAIN: Unable to locate download info for Monkeys, continuing to try and process this release ...
[19:41:29] [DEBUG]::MAIN: Received Directory: /volume1/downloads/tv/Monkeys | Name: Monkeys | Category: tv
[19:41:29] [DEBUG]::MAIN: SEARCH: Found the Category: tv in directory structure
[19:41:29] [INFO]::MAIN: SEARCH: Found a unique directory Monkeys in the category directory
[19:41:29] [DEBUG]::MAIN: Determined Directory: /volume1/downloads/tv/Monkeys | Name: Monkeys | Category: tv
[19:41:29] [INFO]::MAIN: Auto-detected SECTION:SickBeard
[19:41:29] [INFO]::MAIN: Output directory set to: /volume1/downloads/tv/Monkeys
[19:41:29] [DEBUG]::MAIN: Scanning files in directory: /volume1/downloads/tv/Monkeys
[19:41:29] [DEBUG]::MAIN: Found 1 files in /volume1/downloads/tv/Monkeys
[19:41:29] [INFO]::COPYLINK: MEDIAFILE: [12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4]
[19:41:29] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/downloads/tv/Monkeys]
[19:41:29] [INFO]::COPYLINK: TARGET FOLDER: [/volume1/downloads/tv/Monkeys]
[19:41:29] [INFO]::COPYLINK: SOURCE AND TARGET files are the same, skipping ...
[19:41:29] [DEBUG]::MAIN: Checking for archives to extract in directory: /volume1/downloads/tv/Monkeys
[19:41:29] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/downloads/tv/Monkeys
[19:41:29] [DEBUG]::MAIN: Checking for empty folders in:/volume1/downloads/tv/Monkeys
[19:41:29] [INFO]::MAIN: Found 1 media files in /volume1/downloads/tv/Monkeys
[19:41:29] [INFO]::MAIN: Calling SickBeard:tv to post-process:Monkeys
[19:41:29] [INFO]::MAIN: Changing file mode of /volume1/downloads/tv/Monkeys to 01
[19:41:29] [INFO]::MAIN: SickBeard:tv fork set to sickrage
[19:41:30] [DEBUG]::MAIN: calling command: /volume1/@appstore/VideoStation/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/tests/test.mp4
/volume1/@appstore/VideoStation/bin/ffprobe: /opt/lib/libz.so.1: no version information available (required by /var/packages/VideoStation/target/lib/ffmpeg/libavcodec.so.55)
[19:41:30] [INFO]::TRANSCODER: Checking [12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4] for corruption, please stand by ...
[19:41:30] [DEBUG]::MAIN: calling command: /volume1/@appstore/VideoStation/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /volume1/downloads/tv/Monkeys/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4
/volume1/@appstore/VideoStation/bin/ffprobe: /opt/lib/libz.so.1: no version information available (required by /var/packages/VideoStation/target/lib/ffmpeg/libavcodec.so.55)
[19:41:30] [INFO]::TRANSCODER: SUCCESS: [12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4] has no corruption.
[19:41:30] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request
[19:41:30] [DEBUG]::SICKBEARD: Opening URL: https://localhost:8899/home/postprocess/processEpisode with params: {'nzbName': 'Monkeys', 'force': 1, 'quiet': 1, 'failed': 0, 'dir': '/volume1/downloads/tv/Monkeys', 'process_method': 'move'}
[19:41:32] [POSTPROCESS]::SICKBEARD: Processing folder /volume1/downloads/tv/Monkeys
[19:41:32] [POSTPROCESS]::SICKBEARD: PostProcessing Path: /volume1/downloads/tv
[19:41:32] [POSTPROCESS]::SICKBEARD: PostProcessing Dirs: [u'Monkeys']
[19:41:32] [POSTPROCESS]::SICKBEARD: PostProcessing Files: []
[19:41:32] [POSTPROCESS]::SICKBEARD: PostProcessing VideoFiles: []
[19:41:32] [POSTPROCESS]::SICKBEARD: PostProcessing RarContent: []
[19:41:32] [POSTPROCESS]::SICKBEARD: PostProcessing VideoInRar: []
[19:41:32] [POSTPROCESS]::SICKBEARD: Processing folder Monkeys
[19:41:32] [POSTPROCESS]::SICKBEARD: Monkeys : No processable items found in folder
[19:41:32] [POSTPROCESS]::SICKBEARD: Successfully processed
[19:41:32] [DEBUG]::PLEX: Attempting to update Plex Library for category tv.
[19:41:33] [DEBUG]::PLEX: Plex Library has been refreshed.
[19:41:33] [INFO]::CLEANDIR: Doing Forceful Clean of /volume1/downloads/tv/Monkeys
[19:41:33] [INFO]::MAIN: Deleting /volume1/downloads/tv/Monkeys
[19:41:33] [INFO]::MAIN: The ./TorrentToMedia.py script completed successfully.

As far as I'm aware, this script used to pick up on the final download destination when it is run manually and use the sickrage renamer... which it is not. In the past on a manual run, all of my files were renamed and moved to a final destination folder as specified in sickrage being e.g. "/volume1/video/TV Shows/12 Monkeys (2015)" as specified in sickrage >> edit show >> main settings >> show location.
It's not happening now. Am I incorrect with this? Either way the sickrage renamer is not being called.

Much appreciated if you have some further questions or input.

P.S. Ticket raised with Synology regarding the /var/services/download/xxxx/DOWNLOAD_TR_TMP_DIR
Cheers.

@MrCee
Copy link
Author

MrCee commented Jan 2, 2016

As per the above post, here is another example from a manual run:

[00:51:26] [INFO]::MAIN: Loading config from [/volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/autoProcessMedia.cfg]
[00:51:26] [INFO]::ENVIRONMENT: LANG: en_US.utf8
[00:51:26] [INFO]::ENVIRONMENT: TERM: xterm-256color
[00:51:26] [INFO]::ENVIRONMENT: SHELL: /bin/ash
[00:51:26] [INFO]::ENVIRONMENT: TZ: AEST-10AEDT,M10.1.0,M4.1.0/3
[00:51:26] [INFO]::ENVIRONMENT: LC_ALL: en_US.utf8
[00:51:26] [INFO]::ENVIRONMENT: SSH_TTY: /dev/pts/0
[00:51:26] [INFO]::ENVIRONMENT: OLDPWD: /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/core
[00:51:26] [INFO]::ENVIRONMENT: PWD: /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia
[00:51:26] [INFO]::ENVIRONMENT: PATH: /opt/bin:/opt/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin
[00:51:26] [INFO]::ENVIRONMENT: PGDATA: /var/services/pgsql
[00:51:26] [INFO]::ENVIRONMENT: SSH_CLIENT: XXXXX
[00:51:26] [INFO]::ENVIRONMENT: LOGNAME: root
[00:51:26] [INFO]::ENVIRONMENT: USER: root
[00:51:26] [INFO]::ENVIRONMENT: TERMINFO: /usr/share/terminfo
[00:51:26] [INFO]::ENVIRONMENT: HOME: /root
[00:51:26] [INFO]::ENVIRONMENT: MAIL: /var/mail/root
[00:51:26] [INFO]::ENVIRONMENT: SSH_CONNECTION: XXXXXX
[00:51:26] [INFO]::ENVIRONMENT: PAGER: more
[00:51:26] [INFO]::ENVIRONMENT: LD_LIBRARY_PATH: /opt/lib:/opt/include
[00:51:26] [INFO]::MAIN: Checking database structure...
[00:51:26] [DEBUG]::MAIN: Checking Initial Schema database upgrade
[00:51:26] [DB]::MAIN: nzbtomedia.db: SELECT 1 FROM sqlite_master WHERE name = ?; with args ('db_version',)
[00:51:26] [DB]::MAIN: nzbtomedia.db: SELECT db_version FROM db_version
[00:51:26] [DEBUG]::MAIN: InitialSchema upgrade not required
[00:51:26] [DEBUG]::MAIN: Checking if we can use git commands: "/usr/local/bin/git" version
[00:51:26] [DEBUG]::MAIN: Executing "/usr/local/bin/git" version with your shell in /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia
[00:51:26] [DEBUG]::MAIN: git output: git version 2.6.3
[00:51:26] [DEBUG]::MAIN: "/usr/local/bin/git" version : returned successful
[00:51:26] [DEBUG]::MAIN: Using: "/usr/local/bin/git"
[00:51:26] [DEBUG]::MAIN: Executing "/usr/local/bin/git" symbolic-ref -q HEAD with your shell in /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia
[00:51:26] [DEBUG]::MAIN: git output: refs/heads/nightly
[00:51:26] [DEBUG]::MAIN: "/usr/local/bin/git" symbolic-ref -q HEAD : returned successful
[00:51:26] [INFO]::MAIN: Checking if git needs an update
[00:51:26] [DEBUG]::MAIN: Executing "/usr/local/bin/git" rev-parse HEAD with your shell in /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia
[00:51:26] [DEBUG]::MAIN: git output: 6552007fc95d841c95d65f7c9a553b593aed1f8c
[00:51:26] [DEBUG]::MAIN: "/usr/local/bin/git" rev-parse HEAD : returned successful
[00:51:26] [DEBUG]::MAIN: Executing "/usr/local/bin/git" fetch origin with your shell in /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia
[00:51:27] [DEBUG]::MAIN: git output: 
[00:51:27] [DEBUG]::MAIN: "/usr/local/bin/git" fetch origin : returned successful
[00:51:27] [DEBUG]::MAIN: Executing "/usr/local/bin/git" rev-parse --verify --quiet "@{upstream}" with your shell in /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia
[00:51:28] [DEBUG]::MAIN: git output: 6552007fc95d841c95d65f7c9a553b593aed1f8c
[00:51:28] [DEBUG]::MAIN: "/usr/local/bin/git" rev-parse --verify --quiet "@{upstream}" : returned successful
[00:51:28] [DEBUG]::MAIN: Executing "/usr/local/bin/git" rev-list --left-right "@{upstream}"...HEAD with your shell in /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia
[00:51:28] [DEBUG]::MAIN: git output: 
[00:51:28] [DEBUG]::MAIN: "/usr/local/bin/git" rev-list --left-right "@{upstream}"...HEAD : returned successful
[00:51:28] [DEBUG]::MAIN: cur_commit = 6552007fc95d841c95d65f7c9a553b593aed1f8c % (newest_commit)= 6552007fc95d841c95d65f7c9a553b593aed1f8c, num_commits_behind = 0, num_commits_ahead = 0
[00:51:28] [INFO]::MAIN: No update needed
[00:51:28] [INFO]::MAIN: nzbToMedia Version:6552007fc95d841c95d65f7c9a553b593aed1f8c Branch:nightly (Linux 3.2.40)
[00:51:28] [DEBUG]::MAIN: Connecting to transmission: http://localhost:9093
[00:51:28] [ERROR]::MAIN: Failed to connect to Transmission
[00:51:28] [INFO]::MAIN: #########################################################
[00:51:28] [INFO]::MAIN: ## ..::[TorrentToMedia.py]::.. ##
[00:51:28] [INFO]::MAIN: #########################################################
[00:51:28] [DEBUG]::MAIN: Options passed into TorrentToMedia: ['/nzbToMedia/TorrentToMedia.py']
[00:51:28] [WARNING]::MAIN: Invalid number of arguments received from client, Switching to manual run mode ...
[00:51:28] [INFO]::MAIN: Searching /volume1/downloads/movie/ for mediafiles to post-process ...
[00:51:28] [INFO]::MAIN: Searching /volume1/downloads/movie for mediafiles to post-process ...
[00:51:28] [DEBUG]::MAIN: No directories identified in CouchPotato:movie for post-processing
[00:51:28] [INFO]::MAIN: Searching /volume1/downloads/tv/ for mediafiles to post-process ...
[00:51:28] [DEBUG]::MAIN: Found file 12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4 in root directory /volume1/downloads/tv/.
[00:51:30] [INFO]::COPYLINK: MEDIAFILE: [12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4]
[00:51:30] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/downloads/tv]
[00:51:30] [INFO]::COPYLINK: TARGET FOLDER: [/volume1/downloads/tv/Monkeys]
[00:51:30] [INFO]::COPYLINK: Hard linking SOURCE MEDIAFILE -> TARGET FOLDER
[00:51:30] [INFO]::MAIN: Searching /volume1/downloads/tv for mediafiles to post-process ...
[00:51:30] [DEBUG]::MAIN: Found file 12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4 in root directory /volume1/downloads/tv.
[00:51:30] [INFO]::COPYLINK: MEDIAFILE: [12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4]
[00:51:30] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/downloads/tv]
[00:51:30] [INFO]::COPYLINK: TARGET FOLDER: [/volume1/downloads/tv/Monkeys]
[00:51:30] [INFO]::COPYLINK: MEDIAFILE already exists in the TARGET folder, skipping ...
[00:51:31] [INFO]::MAIN: Starting manual run for SickBeard:tv - Folder:/volume1/downloads/tv/iZombie.S02E06.HDTV.x264-LOL[ettv]
[00:51:31] [INFO]::MAIN: Checking database for download info for iZombie.S02E06.HDTV.x264-LOL[ettv] ...
[00:51:31] [DB]::DB: Getting download info for iZombie.S02E06.HDTV.x264-LOL[ettv] from the DB
[00:51:31] [DB]::MAIN: nzbtomedia.db: SELECT * FROM downloads WHERE input_name=? AND status=? with args [u'iZombie.S02E06.HDTV.x264-LOL[ettv]', 0]
[00:51:31] [INFO]::MAIN: Found download info for iZombie.S02E06.HDTV.x264-LOL[ettv], setting variables now ...
[00:51:31] [DEBUG]::MAIN: Received Directory: /volume1/downloads/tv/iZombie.S02E06.HDTV.x264-LOL[ettv] | Name: iZombie.S02E06.HDTV.x264-LOL[ettv] | Category: tv
[00:51:31] [DEBUG]::MAIN: SEARCH: Found the Category: tv in directory structure
[00:51:31] [INFO]::MAIN: SEARCH: Found a unique directory iZombie.S02E06.HDTV.x264-LOL[ettv] in the category directory
[00:51:31] [DEBUG]::MAIN: Determined Directory: /volume1/downloads/tv/iZombie.S02E06.HDTV.x264-LOL[ettv] | Name: iZombie.S02E06.HDTV.x264-LOL[ettv] | Category: tv
[00:51:31] [INFO]::MAIN: Auto-detected SECTION:SickBeard
[00:51:31] [DEBUG]::MAIN: Stopping torrent iZombie.S02E06.HDTV.x264-LOL[ettv] in transmission while processing
[00:51:31] [WARNING]::MAIN: Failed to stop torrent iZombie.S02E06.HDTV.x264-LOL[ettv] in transmission
[00:51:31] [INFO]::MAIN: Output directory set to: /volume1/downloads/tv/iZombie.S02E06.HDTV.x264-LOL[ettv]
[00:51:31] [DEBUG]::MAIN: Scanning files in directory: /volume1/downloads/tv/iZombie.S02E06.HDTV.x264-LOL[ettv]
[00:51:31] [DEBUG]::MAIN: Found 1 files in /volume1/downloads/tv/iZombie.S02E06.HDTV.x264-LOL[ettv]
[00:51:31] [INFO]::COPYLINK: MEDIAFILE: [izombie.206.hdtv-lol[ettv].mp4]
[00:51:31] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/downloads/tv/iZombie.S02E06.HDTV.x264-LOL[ettv]]
[00:51:31] [INFO]::COPYLINK: TARGET FOLDER: [/volume1/downloads/tv/iZombie.S02E06.HDTV.x264-LOL[ettv]]
[00:51:31] [INFO]::COPYLINK: SOURCE AND TARGET files are the same, skipping ...
[00:51:31] [DEBUG]::MAIN: Checking for archives to extract in directory: /volume1/downloads/tv/iZombie.S02E06.HDTV.x264-LOL[ettv]
[00:51:31] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/downloads/tv/iZombie.S02E06.HDTV.x264-LOL[ettv]
[00:51:31] [DEBUG]::MAIN: Checking for empty folders in:/volume1/downloads/tv/iZombie.S02E06.HDTV.x264-LOL[ettv]
[00:51:31] [INFO]::MAIN: Found 1 media files in /volume1/downloads/tv/iZombie.S02E06.HDTV.x264-LOL[ettv]
[00:51:31] [INFO]::MAIN: Calling SickBeard:tv to post-process:iZombie.S02E06.HDTV.x264-LOL[ettv]
[00:51:31] [INFO]::MAIN: Changing file mode of /volume1/downloads/tv/iZombie.S02E06.HDTV.x264-LOL[ettv] to 01
[00:51:31] [INFO]::MAIN: SickBeard:tv fork set to sickrage
[00:51:31] [DEBUG]::MAIN: calling command: /volume1/@appstore/VideoStation/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/tests/test.mp4
/volume1/@appstore/VideoStation/bin/ffprobe: /opt/lib/libz.so.1: no version information available (required by /var/packages/VideoStation/target/lib/ffmpeg/libavcodec.so.55)
[00:51:32] [INFO]::TRANSCODER: Checking [izombie.206.hdtv-lol[ettv].mp4] for corruption, please stand by ...
[00:51:32] [DEBUG]::MAIN: calling command: /volume1/@appstore/VideoStation/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /volume1/downloads/tv/iZombie.S02E06.HDTV.x264-LOL[ettv]/izombie.206.hdtv-lol[ettv].mp4
/volume1/@appstore/VideoStation/bin/ffprobe: /opt/lib/libz.so.1: no version information available (required by /var/packages/VideoStation/target/lib/ffmpeg/libavcodec.so.55)
[00:51:32] [INFO]::TRANSCODER: SUCCESS: [izombie.206.hdtv-lol[ettv].mp4] has no corruption.
[00:51:32] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request
[00:51:32] [DEBUG]::SICKBEARD: Opening URL: https://localhost:8899/home/postprocess/processEpisode with params: {'nzbName': 'iZombie.S02E06.HDTV.x264-LOL[ettv]', 'force': 1, 'quiet': 1, 'failed': 0, 'dir': '/volume1/downloads/tv/iZombie.S02E06.HDTV.x264-LOL[ettv]', 'process_method': 'move'}
[00:51:34] [POSTPROCESS]::SICKBEARD: Processing folder /volume1/downloads/tv/iZombie.S02E06.HDTV.x264-LOL[ettv]
[00:51:34] [POSTPROCESS]::SICKBEARD: PostProcessing Path: /volume1/downloads/tv
[00:51:34] [POSTPROCESS]::SICKBEARD: PostProcessing Dirs: [u'iZombie.S02E06.HDTV.x264-LOL[ettv]']
[00:51:34] [POSTPROCESS]::SICKBEARD: PostProcessing Files: []
[00:51:34] [POSTPROCESS]::SICKBEARD: PostProcessing VideoFiles: []
[00:51:34] [POSTPROCESS]::SICKBEARD: PostProcessing RarContent: []
[00:51:34] [POSTPROCESS]::SICKBEARD: PostProcessing VideoInRar: []
[00:51:34] [POSTPROCESS]::SICKBEARD: Processing folder iZombie.S02E06.HDTV.x264-LOL[ettv]
[00:51:34] [POSTPROCESS]::SICKBEARD: Successfully processed
[00:51:34] [DEBUG]::PLEX: Attempting to update Plex Library for category tv.
[00:51:34] [DEBUG]::PLEX: Plex Library has been refreshed.
[00:51:34] [DB]::DB: Updating status of our download iZombie.S02E06.HDTV.x264-LOL[ettv] in the DB to 1
[00:51:34] [DB]::MAIN: nzbtomedia.db: UPDATE downloads SET status=?, last_update=? WHERE input_name=? with args [1, 735966, u'iZombie.S02E06.HDTV.x264-LOL[ettv]']
[00:51:34] [DEBUG]::MAIN: Deleting torrent iZombie.S02E06.HDTV.x264-LOL[ettv] from transmission
[00:51:34] [WARNING]::MAIN: Failed to delete torrent iZombie.S02E06.HDTV.x264-LOL[ettv] in transmission
[00:51:34] [INFO]::CLEANDIR: Doing Forceful Clean of /volume1/downloads/tv/iZombie.S02E06.HDTV.x264-LOL[ettv]
[00:51:34] [INFO]::MAIN: Deleting /volume1/downloads/tv/iZombie.S02E06.HDTV.x264-LOL[ettv]
[00:51:34] [INFO]::MAIN: Starting manual run for SickBeard:tv - Folder:/volume1/downloads/tv/iZombie.S02E08.HDTV.x264-LOL[ettv]
[00:51:34] [INFO]::MAIN: Checking database for download info for iZombie.S02E08.HDTV.x264-LOL[ettv] ...
[00:51:34] [DB]::DB: Getting download info for iZombie.S02E08.HDTV.x264-LOL[ettv] from the DB
[00:51:34] [DB]::MAIN: nzbtomedia.db: SELECT * FROM downloads WHERE input_name=? AND status=? with args [u'iZombie.S02E08.HDTV.x264-LOL[ettv]', 0]
[00:51:34] [INFO]::MAIN: Found download info for iZombie.S02E08.HDTV.x264-LOL[ettv], setting variables now ...
[00:51:34] [DEBUG]::MAIN: Received Directory: /volume1/downloads/tv/iZombie.S02E08.HDTV.x264-LOL[ettv] | Name: iZombie.S02E08.HDTV.x264-LOL[ettv] | Category: tv
[00:51:34] [DEBUG]::MAIN: SEARCH: Found the Category: tv in directory structure
[00:51:34] [INFO]::MAIN: SEARCH: Found a unique directory iZombie.S02E08.HDTV.x264-LOL[ettv] in the category directory
[00:51:34] [DEBUG]::MAIN: Determined Directory: /volume1/downloads/tv/iZombie.S02E08.HDTV.x264-LOL[ettv] | Name: iZombie.S02E08.HDTV.x264-LOL[ettv] | Category: tv
[00:51:34] [INFO]::MAIN: Auto-detected SECTION:SickBeard
[00:51:35] [DEBUG]::MAIN: Stopping torrent iZombie.S02E08.HDTV.x264-LOL[ettv] in transmission while processing
[00:51:35] [WARNING]::MAIN: Failed to stop torrent iZombie.S02E08.HDTV.x264-LOL[ettv] in transmission
[00:51:35] [INFO]::MAIN: Output directory set to: /volume1/downloads/tv/iZombie.S02E08.HDTV.x264-LOL[ettv]
[00:51:35] [DEBUG]::MAIN: Scanning files in directory: /volume1/downloads/tv/iZombie.S02E08.HDTV.x264-LOL[ettv]
[00:51:35] [DEBUG]::MAIN: Found 1 files in /volume1/downloads/tv/iZombie.S02E08.HDTV.x264-LOL[ettv]
[00:51:35] [INFO]::COPYLINK: MEDIAFILE: [izombie.208.hdtv-lol[ettv].mp4]
[00:51:35] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/downloads/tv/iZombie.S02E08.HDTV.x264-LOL[ettv]]
[00:51:35] [INFO]::COPYLINK: TARGET FOLDER: [/volume1/downloads/tv/iZombie.S02E08.HDTV.x264-LOL[ettv]]
[00:51:35] [INFO]::COPYLINK: SOURCE AND TARGET files are the same, skipping ...
[00:51:35] [DEBUG]::MAIN: Checking for archives to extract in directory: /volume1/downloads/tv/iZombie.S02E08.HDTV.x264-LOL[ettv]
[00:51:35] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/downloads/tv/iZombie.S02E08.HDTV.x264-LOL[ettv]
[00:51:35] [DEBUG]::MAIN: Checking for empty folders in:/volume1/downloads/tv/iZombie.S02E08.HDTV.x264-LOL[ettv]
[00:51:35] [INFO]::MAIN: Found 1 media files in /volume1/downloads/tv/iZombie.S02E08.HDTV.x264-LOL[ettv]
[00:51:35] [INFO]::MAIN: Calling SickBeard:tv to post-process:iZombie.S02E08.HDTV.x264-LOL[ettv]
[00:51:35] [INFO]::MAIN: Changing file mode of /volume1/downloads/tv/iZombie.S02E08.HDTV.x264-LOL[ettv] to 01
[00:51:35] [INFO]::MAIN: SickBeard:tv fork set to sickrage
[00:51:35] [DEBUG]::MAIN: calling command: /volume1/@appstore/VideoStation/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/tests/test.mp4
/volume1/@appstore/VideoStation/bin/ffprobe: /opt/lib/libz.so.1: no version information available (required by /var/packages/VideoStation/target/lib/ffmpeg/libavcodec.so.55)
[00:51:35] [INFO]::TRANSCODER: Checking [izombie.208.hdtv-lol[ettv].mp4] for corruption, please stand by ...
[00:51:35] [DEBUG]::MAIN: calling command: /volume1/@appstore/VideoStation/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /volume1/downloads/tv/iZombie.S02E08.HDTV.x264-LOL[ettv]/izombie.208.hdtv-lol[ettv].mp4
/volume1/@appstore/VideoStation/bin/ffprobe: /opt/lib/libz.so.1: no version information available (required by /var/packages/VideoStation/target/lib/ffmpeg/libavcodec.so.55)
[00:51:35] [INFO]::TRANSCODER: SUCCESS: [izombie.208.hdtv-lol[ettv].mp4] has no corruption.
[00:51:35] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request
[00:51:35] [DEBUG]::SICKBEARD: Opening URL: https://localhost:8899/home/postprocess/processEpisode with params: {'nzbName': 'iZombie.S02E08.HDTV.x264-LOL[ettv]', 'force': 1, 'quiet': 1, 'failed': 0, 'dir': '/volume1/downloads/tv/iZombie.S02E08.HDTV.x264-LOL[ettv]', 'process_method': 'move'}
[00:51:36] [POSTPROCESS]::SICKBEARD: Processing folder /volume1/downloads/tv/iZombie.S02E08.HDTV.x264-LOL[ettv]
[00:51:36] [POSTPROCESS]::SICKBEARD: PostProcessing Path: /volume1/downloads/tv
[00:51:36] [POSTPROCESS]::SICKBEARD: PostProcessing Dirs: [u'iZombie.S02E08.HDTV.x264-LOL[ettv]']
[00:51:36] [POSTPROCESS]::SICKBEARD: PostProcessing Files: []
[00:51:36] [POSTPROCESS]::SICKBEARD: PostProcessing VideoFiles: []
[00:51:36] [POSTPROCESS]::SICKBEARD: PostProcessing RarContent: []
[00:51:36] [POSTPROCESS]::SICKBEARD: PostProcessing VideoInRar: []
[00:51:36] [POSTPROCESS]::SICKBEARD: Processing folder iZombie.S02E08.HDTV.x264-LOL[ettv]
[00:51:36] [POSTPROCESS]::SICKBEARD: Successfully processed
[00:51:36] [DEBUG]::PLEX: Attempting to update Plex Library for category tv.
[00:51:36] [DEBUG]::PLEX: Plex Library has been refreshed.
[00:51:36] [DB]::DB: Updating status of our download iZombie.S02E08.HDTV.x264-LOL[ettv] in the DB to 1
[00:51:36] [DB]::MAIN: nzbtomedia.db: UPDATE downloads SET status=?, last_update=? WHERE input_name=? with args [1, 735966, u'iZombie.S02E08.HDTV.x264-LOL[ettv]']
[00:51:36] [DEBUG]::MAIN: Deleting torrent iZombie.S02E08.HDTV.x264-LOL[ettv] from transmission
[00:51:36] [WARNING]::MAIN: Failed to delete torrent iZombie.S02E08.HDTV.x264-LOL[ettv] in transmission
[00:51:36] [INFO]::CLEANDIR: Doing Forceful Clean of /volume1/downloads/tv/iZombie.S02E08.HDTV.x264-LOL[ettv]
[00:51:36] [INFO]::MAIN: Deleting /volume1/downloads/tv/iZombie.S02E08.HDTV.x264-LOL[ettv]
[00:51:36] [INFO]::MAIN: Starting manual run for SickBeard:tv - Folder:/volume1/downloads/tv/Monkeys
[00:51:36] [INFO]::MAIN: Checking database for download info for Monkeys ...
[00:51:36] [DB]::DB: Getting download info for Monkeys from the DB
[00:51:36] [DB]::MAIN: nzbtomedia.db: SELECT * FROM downloads WHERE input_name=? AND status=? with args [u'Monkeys', 0]
[00:51:36] [INFO]::MAIN: Unable to locate download info for Monkeys, continuing to try and process this release ...
[00:51:36] [DEBUG]::MAIN: Received Directory: /volume1/downloads/tv/Monkeys | Name: Monkeys | Category: tv
[00:51:36] [DEBUG]::MAIN: SEARCH: Found the Category: tv in directory structure
[00:51:36] [INFO]::MAIN: SEARCH: Found a unique directory Monkeys in the category directory
[00:51:36] [DEBUG]::MAIN: Determined Directory: /volume1/downloads/tv/Monkeys | Name: Monkeys | Category: tv
[00:51:36] [INFO]::MAIN: Auto-detected SECTION:SickBeard
[00:51:37] [INFO]::MAIN: Output directory set to: /volume1/downloads/tv/Monkeys
[00:51:37] [DEBUG]::MAIN: Scanning files in directory: /volume1/downloads/tv/Monkeys
[00:51:37] [DEBUG]::MAIN: Found 1 files in /volume1/downloads/tv/Monkeys
[00:51:37] [INFO]::COPYLINK: MEDIAFILE: [12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4]
[00:51:37] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/downloads/tv/Monkeys]
[00:51:37] [INFO]::COPYLINK: TARGET FOLDER: [/volume1/downloads/tv/Monkeys]
[00:51:37] [INFO]::COPYLINK: SOURCE AND TARGET files are the same, skipping ...
[00:51:37] [DEBUG]::MAIN: Read only mode on file /volume1/downloads/tv/Monkeys/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4 Will try to make it writeable
[00:51:37] [DEBUG]::MAIN: Checking for archives to extract in directory: /volume1/downloads/tv/Monkeys
[00:51:37] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/downloads/tv/Monkeys
[00:51:37] [DEBUG]::MAIN: Checking for empty folders in:/volume1/downloads/tv/Monkeys
[00:51:37] [INFO]::MAIN: Found 1 media files in /volume1/downloads/tv/Monkeys
[00:51:37] [INFO]::MAIN: Calling SickBeard:tv to post-process:Monkeys
[00:51:37] [INFO]::MAIN: Changing file mode of /volume1/downloads/tv/Monkeys to 01
[00:51:37] [INFO]::MAIN: SickBeard:tv fork set to sickrage
[00:51:37] [DEBUG]::MAIN: calling command: /volume1/@appstore/VideoStation/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/tests/test.mp4
/volume1/@appstore/VideoStation/bin/ffprobe: /opt/lib/libz.so.1: no version information available (required by /var/packages/VideoStation/target/lib/ffmpeg/libavcodec.so.55)
[00:51:37] [INFO]::TRANSCODER: Checking [12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4] for corruption, please stand by ...
[00:51:37] [DEBUG]::MAIN: calling command: /volume1/@appstore/VideoStation/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /volume1/downloads/tv/Monkeys/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4
/volume1/@appstore/VideoStation/bin/ffprobe: /opt/lib/libz.so.1: no version information available (required by /var/packages/VideoStation/target/lib/ffmpeg/libavcodec.so.55)
[00:51:37] [INFO]::TRANSCODER: SUCCESS: [12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4] has no corruption.
[00:51:37] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request
[00:51:37] [DEBUG]::SICKBEARD: Opening URL: https://localhost:8899/home/postprocess/processEpisode with params: {'nzbName': 'Monkeys', 'force': 1, 'quiet': 1, 'failed': 0, 'dir': '/volume1/downloads/tv/Monkeys', 'process_method': 'move'}
[00:51:38] [POSTPROCESS]::SICKBEARD: Processing folder /volume1/downloads/tv/Monkeys
[00:51:38] [POSTPROCESS]::SICKBEARD: PostProcessing Path: /volume1/downloads/tv
[00:51:38] [POSTPROCESS]::SICKBEARD: PostProcessing Dirs: [u'Monkeys']
[00:51:38] [POSTPROCESS]::SICKBEARD: PostProcessing Files: []
[00:51:38] [POSTPROCESS]::SICKBEARD: PostProcessing VideoFiles: []
[00:51:38] [POSTPROCESS]::SICKBEARD: PostProcessing RarContent: []
[00:51:38] [POSTPROCESS]::SICKBEARD: PostProcessing VideoInRar: []
[00:51:38] [POSTPROCESS]::SICKBEARD: Processing folder Monkeys
[00:51:38] [POSTPROCESS]::SICKBEARD: Monkeys : No processable items found in folder
[00:51:38] [POSTPROCESS]::SICKBEARD: Successfully processed
[00:51:38] [DEBUG]::PLEX: Attempting to update Plex Library for category tv.
[00:51:38] [DEBUG]::PLEX: Plex Library has been refreshed.
[00:51:38] [INFO]::CLEANDIR: Doing Forceful Clean of /volume1/downloads/tv/Monkeys
[00:51:38] [INFO]::MAIN: Deleting /volume1/downloads/tv/Monkeys
[00:51:38] [INFO]::MAIN: The /nzbToMedia/TorrentToMedia.py script completed successfully.

@clinton-hall
Copy link
Owner

So it appears this has just re-processed the files that had already been processed?

As per your questions, this script does not get any information from SickRage settings... This script tells SickRage to process files according to the SickRage settings.

The main issue is that the script needs to be told what files to process.
When Transmission works correctly it tells this script which files to process. Otherwise this script, run manually, will try and process all files in the watch directory.

@MrCee
Copy link
Author

MrCee commented Jan 3, 2016

Thanks for getting back to me.

For now I'll focus on a manual run (while I wait for Synology to get back to me) Any chance you could please help with the following?...
What is happening at the moment is the files are not being renamed or moved as sickrage post-processing normally would. Furthermore after the TorrentToMedia script has run, the original folders which contain the downloaded torrents are stripped of all permissions... e.g.

d--------x 2 root sc-media 4096 2016-01-03 08:15 The.Expanse.S01E01.HDTV.x264-BATV[ettv]

I did have chmodDirectory = 1 set in autoprocess.config, now I have set this to chmodDirectory = 0 and now the renamer can be called, and the files can be moved to the intended final destination folder "TV Shows" as listed in sickrage.

Question: what is chmodDirectory = 1 for? Is it working correctly? Is it needed for the issue below?

Furthermore, if a torrent is downloaded without a folder, e.g.
/volume1/downloads/tv/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4
The script is creating it's own post processing folder /volume1/downloads/tv/Monkeys/ which may have something to do with the error "[/volume1/downloads/tv/Monkeys/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4 : Processing failed: File is locked for reading/writing]"

The folder is created with these permissions:
drwxr-xr-x 2 root root 4096 2016-01-04 09:24 Monkeys
The file is created with these permissions:
-rwxrwxrwx 2 root sc-media 267675043 2015-11-28 03:05 12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4

NOTE: all of my downloading apps and downloaded files are apart of the sc-media group which works really well in Synology.

TorrentToMedia.py LOG:

09:11:40] [INFO]::MAIN: Loading config from [/volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/autoProcessMedia.cfg]
[09:11:41] [INFO]::ENVIRONMENT: LANG: en_US.utf8
[09:11:41] [INFO]::ENVIRONMENT: TERM: xterm-256color
[09:11:41] [INFO]::ENVIRONMENT: SHELL: /bin/ash
[09:11:41] [INFO]::ENVIRONMENT: TZ: AEST-10AEDT,M10.1.0,M4.1.0/3
[09:11:41] [INFO]::ENVIRONMENT: LC_ALL: en_US.utf8
[09:11:41] [INFO]::ENVIRONMENT: SSH_TTY: /dev/pts/0
[09:11:41] [INFO]::ENVIRONMENT: OLDPWD: /volume1/downloads
[09:11:41] [INFO]::ENVIRONMENT: PWD: /volume1/downloads/tv
[09:11:41] [INFO]::ENVIRONMENT: PATH: /opt/bin:/opt/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin
[09:11:41] [INFO]::ENVIRONMENT: PGDATA: /var/services/pgsql
[09:11:41] [INFO]::ENVIRONMENT: SSH_CLIENT: xxxxxxx
[09:11:41] [INFO]::ENVIRONMENT: LOGNAME: root
[09:11:41] [INFO]::ENVIRONMENT: USER: root
[09:11:41] [INFO]::ENVIRONMENT: TERMINFO: /usr/share/terminfo
[09:11:41] [INFO]::ENVIRONMENT: HOME: /root
[09:11:41] [INFO]::ENVIRONMENT: MAIL: /var/mail/root
[09:11:41] [INFO]::ENVIRONMENT: SSH_CONNECTION: xxxxxxx
[09:11:41] [INFO]::ENVIRONMENT: PAGER: more
[09:11:41] [INFO]::ENVIRONMENT: LD_LIBRARY_PATH: /opt/lib:/opt/include
[09:11:41] [INFO]::MAIN: Checking database structure...
[09:11:41] [DEBUG]::MAIN: Checking Initial Schema database upgrade
[09:11:41] [DB]::MAIN: nzbtomedia.db: SELECT 1 FROM sqlite_master WHERE name = ?; with args ('db_version',)
[09:11:41] [DB]::MAIN: nzbtomedia.db: SELECT db_version FROM db_version
[09:11:41] [DEBUG]::MAIN: InitialSchema upgrade not required
[09:11:41] [DEBUG]::MAIN: Checking if we can use git commands: "/usr/local/bin/git" version
[09:11:41] [DEBUG]::MAIN: Executing "/usr/local/bin/git" version with your shell in /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia
[09:11:41] [DEBUG]::MAIN: git output: git version 2.6.3
[09:11:41] [DEBUG]::MAIN: "/usr/local/bin/git" version : returned successful
[09:11:41] [DEBUG]::MAIN: Using: "/usr/local/bin/git"
[09:11:41] [DEBUG]::MAIN: Executing "/usr/local/bin/git" symbolic-ref -q HEAD with your shell in /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia
[09:11:41] [DEBUG]::MAIN: git output: refs/heads/nightly
[09:11:41] [DEBUG]::MAIN: "/usr/local/bin/git" symbolic-ref -q HEAD : returned successful
[09:11:41] [INFO]::MAIN: Checking if git needs an update
[09:11:41] [DEBUG]::MAIN: Executing "/usr/local/bin/git" rev-parse HEAD with your shell in /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia
[09:11:41] [DEBUG]::MAIN: git output: 6552007fc95d841c95d65f7c9a553b593aed1f8c
[09:11:41] [DEBUG]::MAIN: "/usr/local/bin/git" rev-parse HEAD : returned successful
[09:11:41] [DEBUG]::MAIN: Executing "/usr/local/bin/git" fetch origin with your shell in /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia
[09:11:43] [DEBUG]::MAIN: git output: 
[09:11:43] [DEBUG]::MAIN: "/usr/local/bin/git" fetch origin : returned successful
[09:11:43] [DEBUG]::MAIN: Executing "/usr/local/bin/git" rev-parse --verify --quiet "@{upstream}" with your shell in /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia
[09:11:43] [DEBUG]::MAIN: git output: 6552007fc95d841c95d65f7c9a553b593aed1f8c
[09:11:43] [DEBUG]::MAIN: "/usr/local/bin/git" rev-parse --verify --quiet "@{upstream}" : returned successful
[09:11:43] [DEBUG]::MAIN: Executing "/usr/local/bin/git" rev-list --left-right "@{upstream}"...HEAD with your shell in /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia
[09:11:43] [DEBUG]::MAIN: git output: 
[09:11:43] [DEBUG]::MAIN: "/usr/local/bin/git" rev-list --left-right "@{upstream}"...HEAD : returned successful
[09:11:43] [DEBUG]::MAIN: cur_commit = 6552007fc95d841c95d65f7c9a553b593aed1f8c % (newest_commit)= 6552007fc95d841c95d65f7c9a553b593aed1f8c, num_commits_behind = 0, num_commits_ahead = 0
[09:11:43] [INFO]::MAIN: No update needed
[09:11:43] [INFO]::MAIN: nzbToMedia Version:6552007fc95d841c95d65f7c9a553b593aed1f8c Branch:nightly (Linux 3.2.40)
[09:11:43] [DEBUG]::MAIN: Connecting to transmission: http://localhost:9093
[09:11:43] [INFO]::MAIN: #########################################################
[09:11:43] [INFO]::MAIN: ## ..::[TorrentToMedia.py]::.. ##
[09:11:43] [INFO]::MAIN: #########################################################
[09:11:43] [DEBUG]::MAIN: Options passed into TorrentToMedia: ['/nzbToMedia/TorrentToMedia.py']
[09:11:43] [WARNING]::MAIN: Invalid number of arguments received from client, Switching to manual run mode ...
[09:11:43] [INFO]::MAIN: Searching /volume1/downloads/movie for mediafiles to post-process ...
[09:11:43] [INFO]::MAIN: Searching /volume1/downloads/movie for mediafiles to post-process ...
[09:11:43] [DEBUG]::MAIN: No directories identified in CouchPotato:movie for post-processing
[09:11:43] [INFO]::MAIN: Searching /volume1/downloads/tv for mediafiles to post-process ...
[09:11:43] [DEBUG]::MAIN: Found file 12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4 in root directory /volume1/downloads/tv.
[09:11:46] [INFO]::COPYLINK: MEDIAFILE: [12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4]
[09:11:46] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/downloads/tv]
[09:11:46] [INFO]::COPYLINK: TARGET FOLDER: [/volume1/downloads/tv/Monkeys]
[09:11:46] [INFO]::COPYLINK: Hard linking SOURCE MEDIAFILE -> TARGET FOLDER
[09:11:46] [INFO]::MAIN: Searching /volume1/downloads/tv for mediafiles to post-process ...
[09:11:46] [DEBUG]::MAIN: Found file 12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4 in root directory /volume1/downloads/tv.
[09:11:46] [INFO]::COPYLINK: MEDIAFILE: [12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4]
[09:11:46] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/downloads/tv]
[09:11:46] [INFO]::COPYLINK: TARGET FOLDER: [/volume1/downloads/tv/Monkeys]
[09:11:46] [INFO]::COPYLINK: MEDIAFILE already exists in the TARGET folder, skipping ...
[09:11:46] [INFO]::MAIN: Starting manual run for SickBeard:tv - Folder:/volume1/downloads/tv/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg]
[09:11:46] [INFO]::MAIN: Checking database for download info for The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg] ...
[09:11:46] [DB]::DB: Getting download info for The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg] from the DB
[09:11:46] [DB]::MAIN: nzbtomedia.db: SELECT * FROM downloads WHERE input_name=? AND status=? with args [u'The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg]', 0]
[09:11:46] [INFO]::MAIN: Unable to locate download info for The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg], continuing to try and process this release ...
[09:11:46] [DEBUG]::MAIN: Received Directory: /volume1/downloads/tv/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg] | Name: The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg] | Category: tv
[09:11:46] [DEBUG]::MAIN: SEARCH: Found the Category: tv in directory structure
[09:11:46] [INFO]::MAIN: SEARCH: Found a unique directory The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg] in the category directory
[09:11:46] [DEBUG]::MAIN: Determined Directory: /volume1/downloads/tv/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg] | Name: The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg] | Category: tv
[09:11:46] [INFO]::MAIN: Auto-detected SECTION:SickBeard
[09:11:46] [INFO]::MAIN: Output directory set to: /volume1/downloads/tv/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg]
[09:11:46] [DEBUG]::MAIN: Scanning files in directory: /volume1/downloads/tv/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg]
[09:11:46] [DEBUG]::MAIN: Found 1 files in /volume1/downloads/tv/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg]
[09:11:46] [DEBUG]::MAIN: Checking for archives to extract in directory: /volume1/downloads/tv/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg]
[09:11:46] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/downloads/tv/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg]
[09:11:46] [DEBUG]::MAIN: Checking for empty folders in:/volume1/downloads/tv/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg]
[09:11:46] [INFO]::MAIN: Found 1 media files in /volume1/downloads/tv/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg]
[09:11:46] [INFO]::MAIN: Calling SickBeard:tv to post-process:The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg]
[09:11:46] [INFO]::MAIN: SickBeard:tv fork set to sickrage
[09:11:46] [DEBUG]::MAIN: calling command: /volume1/@appstore/VideoStation/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/tests/test.mp4
/volume1/@appstore/VideoStation/bin/ffprobe: /opt/lib/libz.so.1: no version information available (required by /var/packages/VideoStation/target/lib/ffmpeg/libavcodec.so.55)
[09:11:47] [INFO]::TRANSCODER: Checking [The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS.mp4] for corruption, please stand by ...
[09:11:47] [DEBUG]::MAIN: calling command: /volume1/@appstore/VideoStation/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /volume1/downloads/tv/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg]/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS.mp4
/volume1/@appstore/VideoStation/bin/ffprobe: /opt/lib/libz.so.1: no version information available (required by /var/packages/VideoStation/target/lib/ffmpeg/libavcodec.so.55)
[09:11:47] [INFO]::TRANSCODER: SUCCESS: [The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS.mp4] has no corruption.
[09:11:47] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request
[09:11:47] [DEBUG]::SICKBEARD: Opening URL: https://localhost:8899/home/postprocess/processEpisode with params: {'nzbName': 'The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg]', 'force': 1, 'quiet': 1, 'failed': 0, 'dir': '/volume1/downloads/tv/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg]', 'process_method': 'move'}
[09:11:51] [POSTPROCESS]::SICKBEARD: Processing folder /volume1/downloads/tv/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg]
[09:11:51] [POSTPROCESS]::SICKBEARD: PostProcessing Path: /volume1/downloads/tv
[09:11:51] [POSTPROCESS]::SICKBEARD: PostProcessing Dirs: [u'The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg]']
[09:11:51] [POSTPROCESS]::SICKBEARD: PostProcessing Files: []
[09:11:51] [POSTPROCESS]::SICKBEARD: PostProcessing VideoFiles: []
[09:11:51] [POSTPROCESS]::SICKBEARD: PostProcessing RarContent: []
[09:11:51] [POSTPROCESS]::SICKBEARD: PostProcessing VideoInRar: []
[09:11:51] [POSTPROCESS]::SICKBEARD: Processing folder The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg]
[09:11:51] [POSTPROCESS]::SICKBEARD: Processing folder /volume1/downloads/tv/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg]
[09:11:51] [POSTPROCESS]::SICKBEARD: Found unwanted files: ['RARBG.com.txt']
[09:11:51] [POSTPROCESS]::SICKBEARD: Processing /volume1/downloads/tv/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg]/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS.mp4 (The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg])
[09:11:51] [POSTPROCESS]::SICKBEARD: Retrieving episode object for 1x3
[09:11:51] [POSTPROCESS]::SICKBEARD: Snatch history had a quality in it, using that: SDTV
[09:11:51] [POSTPROCESS]::SICKBEARD: SR snatched this episode and it is not processed before
[09:11:51] [POSTPROCESS]::SICKBEARD: Is ep a priority download: True
[09:11:51] [POSTPROCESS]::SICKBEARD: There is no existing file so there's no worries about replacing it
[09:11:51] [POSTPROCESS]::SICKBEARD: This download is marked a priority download so I'm going to replace an existing file if I find one
[09:11:51] [POSTPROCESS]::SICKBEARD: Found release name The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS
[09:11:51] [POSTPROCESS]::SICKBEARD: Destination folder for this episode: /volume1/video/TV Shows/The Expanse (2015)/Season 01
[09:11:51] [POSTPROCESS]::SICKBEARD: No associated files for /volume1/downloads/tv/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg]/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS.mp4 were found during this pass
[09:11:51] [POSTPROCESS]::SICKBEARD: Moving file from /volume1/downloads/tv/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg]/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS.mp4 to /volume1/video/TV Shows/The Expanse (2015)/Season 01/The.Expanse.S01E03.Remember.the.Cant.SDTV.mp4
[09:11:51] [POSTPROCESS]::SICKBEARD: Processing succeeded for /volume1/downloads/tv/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg]/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS.mp4
[09:11:51] [POSTPROCESS]::SICKBEARD: Deleting file: RARBG.com.txt
[09:11:51] [POSTPROCESS]::SICKBEARD: Deleted folder: /volume1/downloads/tv/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg]
[09:11:51] [POSTPROCESS]::SICKBEARD: Successfully processed
[09:11:51] [DEBUG]::PLEX: Attempting to update Plex Library for category tv.
[09:11:51] [DEBUG]::PLEX: Plex Library has been refreshed.
[09:11:51] [INFO]::CLEANDIR: Directory /volume1/downloads/tv/The.Expanse.S01E03.INTERNAL.HDTV.x264-KILLERS[rarbg] has been processed and removed ...
[09:11:51] [INFO]::MAIN: Starting manual run for SickBeard:tv - Folder:/volume1/downloads/tv/The.Expanse.S01E01.HDTV.x264-BATV[ettv]
[09:11:51] [INFO]::MAIN: Checking database for download info for The.Expanse.S01E01.HDTV.x264-BATV[ettv] ...
[09:11:51] [DB]::DB: Getting download info for The.Expanse.S01E01.HDTV.x264-BATV[ettv] from the DB
[09:11:51] [DB]::MAIN: nzbtomedia.db: SELECT * FROM downloads WHERE input_name=? AND status=? with args [u'The.Expanse.S01E01.HDTV.x264-BATV[ettv]', 0]
[09:11:51] [INFO]::MAIN: Unable to locate download info for The.Expanse.S01E01.HDTV.x264-BATV[ettv], continuing to try and process this release ...
[09:11:51] [DEBUG]::MAIN: Received Directory: /volume1/downloads/tv/The.Expanse.S01E01.HDTV.x264-BATV[ettv] | Name: The.Expanse.S01E01.HDTV.x264-BATV[ettv] | Category: tv
[09:11:51] [DEBUG]::MAIN: SEARCH: Found the Category: tv in directory structure
[09:11:51] [INFO]::MAIN: SEARCH: Found a unique directory The.Expanse.S01E01.HDTV.x264-BATV[ettv] in the category directory
[09:11:51] [DEBUG]::MAIN: Determined Directory: /volume1/downloads/tv/The.Expanse.S01E01.HDTV.x264-BATV[ettv] | Name: The.Expanse.S01E01.HDTV.x264-BATV[ettv] | Category: tv
[09:11:51] [INFO]::MAIN: Auto-detected SECTION:SickBeard
[09:11:51] [INFO]::MAIN: Output directory set to: /volume1/downloads/tv/The.Expanse.S01E01.HDTV.x264-BATV[ettv]
[09:11:51] [DEBUG]::MAIN: Scanning files in directory: /volume1/downloads/tv/The.Expanse.S01E01.HDTV.x264-BATV[ettv]
[09:11:51] [DEBUG]::MAIN: Found 1 files in /volume1/downloads/tv/The.Expanse.S01E01.HDTV.x264-BATV[ettv]
[09:11:51] [DEBUG]::MAIN: Checking for archives to extract in directory: /volume1/downloads/tv/The.Expanse.S01E01.HDTV.x264-BATV[ettv]
[09:11:51] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/downloads/tv/The.Expanse.S01E01.HDTV.x264-BATV[ettv]
[09:11:51] [DEBUG]::MAIN: Checking for empty folders in:/volume1/downloads/tv/The.Expanse.S01E01.HDTV.x264-BATV[ettv]
[09:11:51] [INFO]::MAIN: Found 1 media files in /volume1/downloads/tv/The.Expanse.S01E01.HDTV.x264-BATV[ettv]
[09:11:51] [INFO]::MAIN: Calling SickBeard:tv to post-process:The.Expanse.S01E01.HDTV.x264-BATV[ettv]
[09:11:51] [INFO]::MAIN: SickBeard:tv fork set to sickrage
[09:11:52] [DEBUG]::MAIN: calling command: /volume1/@appstore/VideoStation/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/tests/test.mp4
/volume1/@appstore/VideoStation/bin/ffprobe: /opt/lib/libz.so.1: no version information available (required by /var/packages/VideoStation/target/lib/ffmpeg/libavcodec.so.55)
[09:11:52] [INFO]::TRANSCODER: Checking [The.Expanse.S01E01.HDTV.x264-BATV[ettv].mp4] for corruption, please stand by ...
[09:11:52] [DEBUG]::MAIN: calling command: /volume1/@appstore/VideoStation/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /volume1/downloads/tv/The.Expanse.S01E01.HDTV.x264-BATV[ettv]/The.Expanse.S01E01.HDTV.x264-BATV[ettv].mp4
/volume1/@appstore/VideoStation/bin/ffprobe: /opt/lib/libz.so.1: no version information available (required by /var/packages/VideoStation/target/lib/ffmpeg/libavcodec.so.55)
[09:11:52] [INFO]::TRANSCODER: SUCCESS: [The.Expanse.S01E01.HDTV.x264-BATV[ettv].mp4] has no corruption.
[09:11:52] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request
[09:11:52] [DEBUG]::SICKBEARD: Opening URL: https://localhost:8899/home/postprocess/processEpisode with params: {'nzbName': 'The.Expanse.S01E01.HDTV.x264-BATV[ettv]', 'force': 1, 'quiet': 1, 'failed': 0, 'dir': '/volume1/downloads/tv/The.Expanse.S01E01.HDTV.x264-BATV[ettv]', 'process_method': 'move'}
[09:11:57] [POSTPROCESS]::SICKBEARD: Processing folder /volume1/downloads/tv/The.Expanse.S01E01.HDTV.x264-BATV[ettv]
[09:11:57] [POSTPROCESS]::SICKBEARD: PostProcessing Path: /volume1/downloads/tv
[09:11:57] [POSTPROCESS]::SICKBEARD: PostProcessing Dirs: [u'The.Expanse.S01E01.HDTV.x264-BATV[ettv]']
[09:11:57] [POSTPROCESS]::SICKBEARD: PostProcessing Files: []
[09:11:57] [POSTPROCESS]::SICKBEARD: PostProcessing VideoFiles: []
[09:11:57] [POSTPROCESS]::SICKBEARD: PostProcessing RarContent: []
[09:11:57] [POSTPROCESS]::SICKBEARD: PostProcessing VideoInRar: []
[09:11:57] [POSTPROCESS]::SICKBEARD: Processing folder The.Expanse.S01E01.HDTV.x264-BATV[ettv]
[09:11:57] [POSTPROCESS]::SICKBEARD: Processing folder /volume1/downloads/tv/The.Expanse.S01E01.HDTV.x264-BATV[ettv]
[09:11:57] [POSTPROCESS]::SICKBEARD: Found unwanted files: ['Torrent-Downloaded-from-ExtraTorrent.cc.txt']
[09:11:57] [POSTPROCESS]::SICKBEARD: Processing /volume1/downloads/tv/The.Expanse.S01E01.HDTV.x264-BATV[ettv]/The.Expanse.S01E01.HDTV.x264-BATV[ettv].mp4 (The.Expanse.S01E01.HDTV.x264-BATV[ettv])
[09:11:57] [POSTPROCESS]::SICKBEARD: Retrieving episode object for 1x1
[09:11:57] [POSTPROCESS]::SICKBEARD: Snatch history had a quality in it, using that: SDTV
[09:11:57] [POSTPROCESS]::SICKBEARD: SR snatched this episode and it is not processed before
[09:11:57] [POSTPROCESS]::SICKBEARD: Is ep a priority download: True
[09:11:57] [POSTPROCESS]::SICKBEARD: There is no existing file so there's no worries about replacing it
[09:11:57] [POSTPROCESS]::SICKBEARD: This download is marked a priority download so I'm going to replace an existing file if I find one
[09:11:57] [POSTPROCESS]::SICKBEARD: Found release name The.Expanse.S01E01.HDTV.x264-BATV
[09:11:57] [POSTPROCESS]::SICKBEARD: Destination folder for this episode: /volume1/video/TV Shows/The Expanse (2015)/Season 01
[09:11:57] [POSTPROCESS]::SICKBEARD: No associated files for /volume1/downloads/tv/The.Expanse.S01E01.HDTV.x264-BATV[ettv]/The.Expanse.S01E01.HDTV.x264-BATV[ettv].mp4 were found during this pass
[09:11:57] [POSTPROCESS]::SICKBEARD: Moving file from /volume1/downloads/tv/The.Expanse.S01E01.HDTV.x264-BATV[ettv]/The.Expanse.S01E01.HDTV.x264-BATV[ettv].mp4 to /volume1/video/TV Shows/The Expanse (2015)/Season 01/The.Expanse.S01E01.Dulcinea.SDTV.mp4
[09:11:57] [POSTPROCESS]::SICKBEARD: Processing succeeded for /volume1/downloads/tv/The.Expanse.S01E01.HDTV.x264-BATV[ettv]/The.Expanse.S01E01.HDTV.x264-BATV[ettv].mp4
[09:11:57] [POSTPROCESS]::SICKBEARD: Deleting file: Torrent-Downloaded-from-ExtraTorrent.cc.txt
[09:11:57] [POSTPROCESS]::SICKBEARD: Deleted folder: /volume1/downloads/tv/The.Expanse.S01E01.HDTV.x264-BATV[ettv]
[09:11:57] [POSTPROCESS]::SICKBEARD: Successfully processed
[09:11:57] [DEBUG]::PLEX: Attempting to update Plex Library for category tv.
[09:11:57] [DEBUG]::PLEX: Plex Library has been refreshed.
[09:11:57] [INFO]::CLEANDIR: Directory /volume1/downloads/tv/The.Expanse.S01E01.HDTV.x264-BATV[ettv] has been processed and removed ...
[09:11:57] [INFO]::MAIN: Starting manual run for SickBeard:tv - Folder:/volume1/downloads/tv/The.Expanse.S01E04.WEB-DL.x264-RARBG
[09:11:57] [INFO]::MAIN: Checking database for download info for The.Expanse.S01E04.WEB-DL.x264-RARBG ...
[09:11:57] [DB]::DB: Getting download info for The.Expanse.S01E04.WEB-DL.x264-RARBG from the DB
[09:11:57] [DB]::MAIN: nzbtomedia.db: SELECT * FROM downloads WHERE input_name=? AND status=? with args [u'The.Expanse.S01E04.WEB-DL.x264-RARBG', 0]
[09:11:57] [INFO]::MAIN: Unable to locate download info for The.Expanse.S01E04.WEB-DL.x264-RARBG, continuing to try and process this release ...
[09:11:57] [DEBUG]::MAIN: Received Directory: /volume1/downloads/tv/The.Expanse.S01E04.WEB-DL.x264-RARBG | Name: The.Expanse.S01E04.WEB-DL.x264-RARBG | Category: tv
[09:11:57] [DEBUG]::MAIN: SEARCH: Found the Category: tv in directory structure
[09:11:57] [INFO]::MAIN: SEARCH: Found a unique directory The.Expanse.S01E04.WEB-DL.x264-RARBG in the category directory
[09:11:57] [DEBUG]::MAIN: Determined Directory: /volume1/downloads/tv/The.Expanse.S01E04.WEB-DL.x264-RARBG | Name: The.Expanse.S01E04.WEB-DL.x264-RARBG | Category: tv
[09:11:57] [INFO]::MAIN: Auto-detected SECTION:SickBeard
[09:11:57] [INFO]::MAIN: Output directory set to: /volume1/downloads/tv/The.Expanse.S01E04.WEB-DL.x264-RARBG
[09:11:57] [DEBUG]::MAIN: Scanning files in directory: /volume1/downloads/tv/The.Expanse.S01E04.WEB-DL.x264-RARBG
[09:11:57] [DEBUG]::MAIN: Found 1 files in /volume1/downloads/tv/The.Expanse.S01E04.WEB-DL.x264-RARBG
[09:11:57] [DEBUG]::MAIN: Checking for archives to extract in directory: /volume1/downloads/tv/The.Expanse.S01E04.WEB-DL.x264-RARBG
[09:11:57] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/downloads/tv/The.Expanse.S01E04.WEB-DL.x264-RARBG
[09:11:57] [DEBUG]::MAIN: Checking for empty folders in:/volume1/downloads/tv/The.Expanse.S01E04.WEB-DL.x264-RARBG
[09:11:57] [INFO]::MAIN: Found 1 media files in /volume1/downloads/tv/The.Expanse.S01E04.WEB-DL.x264-RARBG
[09:11:57] [INFO]::MAIN: Calling SickBeard:tv to post-process:The.Expanse.S01E04.WEB-DL.x264-RARBG
[09:11:57] [INFO]::MAIN: SickBeard:tv fork set to sickrage
[09:11:57] [DEBUG]::MAIN: calling command: /volume1/@appstore/VideoStation/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/tests/test.mp4
/volume1/@appstore/VideoStation/bin/ffprobe: /opt/lib/libz.so.1: no version information available (required by /var/packages/VideoStation/target/lib/ffmpeg/libavcodec.so.55)
[09:11:59] [INFO]::TRANSCODER: Checking [The.Expanse.S01E04.WEB-DL.x264-RARBG.mp4] for corruption, please stand by ...
[09:11:59] [DEBUG]::MAIN: calling command: /volume1/@appstore/VideoStation/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /volume1/downloads/tv/The.Expanse.S01E04.WEB-DL.x264-RARBG/The.Expanse.S01E04.WEB-DL.x264-RARBG.mp4
/volume1/@appstore/VideoStation/bin/ffprobe: /opt/lib/libz.so.1: no version information available (required by /var/packages/VideoStation/target/lib/ffmpeg/libavcodec.so.55)
[09:12:00] [INFO]::TRANSCODER: SUCCESS: [The.Expanse.S01E04.WEB-DL.x264-RARBG.mp4] has no corruption.
[09:12:00] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request
[09:12:00] [DEBUG]::SICKBEARD: Opening URL: https://localhost:8899/home/postprocess/processEpisode with params: {'nzbName': 'The.Expanse.S01E04.WEB-DL.x264-RARBG', 'force': 1, 'quiet': 1, 'failed': 0, 'dir': '/volume1/downloads/tv/The.Expanse.S01E04.WEB-DL.x264-RARBG', 'process_method': 'move'}
[09:12:05] [POSTPROCESS]::SICKBEARD: Processing folder /volume1/downloads/tv/The.Expanse.S01E04.WEB-DL.x264-RARBG
[09:12:05] [POSTPROCESS]::SICKBEARD: PostProcessing Path: /volume1/downloads/tv
[09:12:05] [POSTPROCESS]::SICKBEARD: PostProcessing Dirs: [u'The.Expanse.S01E04.WEB-DL.x264-RARBG']
[09:12:05] [POSTPROCESS]::SICKBEARD: PostProcessing Files: []
[09:12:05] [POSTPROCESS]::SICKBEARD: PostProcessing VideoFiles: []
[09:12:05] [POSTPROCESS]::SICKBEARD: PostProcessing RarContent: []
[09:12:05] [POSTPROCESS]::SICKBEARD: PostProcessing VideoInRar: []
[09:12:05] [POSTPROCESS]::SICKBEARD: Processing folder The.Expanse.S01E04.WEB-DL.x264-RARBG
[09:12:05] [POSTPROCESS]::SICKBEARD: Processing folder /volume1/downloads/tv/The.Expanse.S01E04.WEB-DL.x264-RARBG
[09:12:05] [POSTPROCESS]::SICKBEARD: Found unwanted files: ['RARBG.COM.txt']
[09:12:05] [POSTPROCESS]::SICKBEARD: Processing /volume1/downloads/tv/The.Expanse.S01E04.WEB-DL.x264-RARBG/The.Expanse.S01E04.WEB-DL.x264-RARBG.mp4 (The.Expanse.S01E04.WEB-DL.x264-RARBG)
[09:12:05] [POSTPROCESS]::SICKBEARD: Retrieving episode object for 1x4
[09:12:05] [POSTPROCESS]::SICKBEARD: Snatch history had a quality in it, using that: SDTV
[09:12:05] [POSTPROCESS]::SICKBEARD: SR snatched this episode and it is not processed before
[09:12:05] [POSTPROCESS]::SICKBEARD: Is ep a priority download: True
[09:12:05] [POSTPROCESS]::SICKBEARD: There is no existing file so there's no worries about replacing it
[09:12:05] [POSTPROCESS]::SICKBEARD: This download is marked a priority download so I'm going to replace an existing file if I find one
[09:12:05] [POSTPROCESS]::SICKBEARD: Found release name The.Expanse.S01E04.WEB-DL.x264-RARBG
[09:12:05] [POSTPROCESS]::SICKBEARD: Destination folder for this episode: /volume1/video/TV Shows/The Expanse (2015)/Season 01
[09:12:05] [POSTPROCESS]::SICKBEARD: No associated files for /volume1/downloads/tv/The.Expanse.S01E04.WEB-DL.x264-RARBG/The.Expanse.S01E04.WEB-DL.x264-RARBG.mp4 were found during this pass
[09:12:05] [POSTPROCESS]::SICKBEARD: Moving file from /volume1/downloads/tv/The.Expanse.S01E04.WEB-DL.x264-RARBG/The.Expanse.S01E04.WEB-DL.x264-RARBG.mp4 to /volume1/video/TV Shows/The Expanse (2015)/Season 01/The.Expanse.S01E04.CQB.SDTV.mp4
[09:12:05] [POSTPROCESS]::SICKBEARD: Processing succeeded for /volume1/downloads/tv/The.Expanse.S01E04.WEB-DL.x264-RARBG/The.Expanse.S01E04.WEB-DL.x264-RARBG.mp4
[09:12:05] [POSTPROCESS]::SICKBEARD: Deleting file: RARBG.COM.txt
[09:12:05] [POSTPROCESS]::SICKBEARD: Deleted folder: /volume1/downloads/tv/The.Expanse.S01E04.WEB-DL.x264-RARBG
[09:12:05] [POSTPROCESS]::SICKBEARD: Successfully processed
[09:12:05] [DEBUG]::PLEX: Attempting to update Plex Library for category tv.
[09:12:05] [DEBUG]::PLEX: Plex Library has been refreshed.
[09:12:05] [INFO]::CLEANDIR: Directory /volume1/downloads/tv/The.Expanse.S01E04.WEB-DL.x264-RARBG has been processed and removed ...
[09:12:05] [INFO]::MAIN: Starting manual run for SickBeard:tv - Folder:/volume1/downloads/tv/Gotham.S02E11.HDTV.x264-LOL[ettv]
[09:12:05] [INFO]::MAIN: Checking database for download info for Gotham.S02E11.HDTV.x264-LOL[ettv] ...
[09:12:05] [DB]::DB: Getting download info for Gotham.S02E11.HDTV.x264-LOL[ettv] from the DB
[09:12:05] [DB]::MAIN: nzbtomedia.db: SELECT * FROM downloads WHERE input_name=? AND status=? with args [u'Gotham.S02E11.HDTV.x264-LOL[ettv]', 0]
[09:12:05] [INFO]::MAIN: Unable to locate download info for Gotham.S02E11.HDTV.x264-LOL[ettv], continuing to try and process this release ...
[09:12:05] [DEBUG]::MAIN: Received Directory: /volume1/downloads/tv/Gotham.S02E11.HDTV.x264-LOL[ettv] | Name: Gotham.S02E11.HDTV.x264-LOL[ettv] | Category: tv
[09:12:05] [DEBUG]::MAIN: SEARCH: Found the Category: tv in directory structure
[09:12:05] [INFO]::MAIN: SEARCH: Found a unique directory Gotham.S02E11.HDTV.x264-LOL[ettv] in the category directory
[09:12:05] [DEBUG]::MAIN: Determined Directory: /volume1/downloads/tv/Gotham.S02E11.HDTV.x264-LOL[ettv] | Name: Gotham.S02E11.HDTV.x264-LOL[ettv] | Category: tv
[09:12:06] [INFO]::MAIN: Auto-detected SECTION:SickBeard
[09:12:06] [INFO]::MAIN: Output directory set to: /volume1/downloads/tv/Gotham.S02E11.HDTV.x264-LOL[ettv]
[09:12:06] [DEBUG]::MAIN: Scanning files in directory: /volume1/downloads/tv/Gotham.S02E11.HDTV.x264-LOL[ettv]
[09:12:06] [DEBUG]::MAIN: Found 1 files in /volume1/downloads/tv/Gotham.S02E11.HDTV.x264-LOL[ettv]
[09:12:06] [DEBUG]::MAIN: Checking for archives to extract in directory: /volume1/downloads/tv/Gotham.S02E11.HDTV.x264-LOL[ettv]
[09:12:06] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/downloads/tv/Gotham.S02E11.HDTV.x264-LOL[ettv]
[09:12:06] [DEBUG]::MAIN: Checking for empty folders in:/volume1/downloads/tv/Gotham.S02E11.HDTV.x264-LOL[ettv]
[09:12:06] [INFO]::MAIN: Found 1 media files in /volume1/downloads/tv/Gotham.S02E11.HDTV.x264-LOL[ettv]
[09:12:06] [INFO]::MAIN: Calling SickBeard:tv to post-process:Gotham.S02E11.HDTV.x264-LOL[ettv]
[09:12:06] [INFO]::MAIN: SickBeard:tv fork set to sickrage
[09:12:06] [DEBUG]::MAIN: calling command: /volume1/@appstore/VideoStation/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/tests/test.mp4
/volume1/@appstore/VideoStation/bin/ffprobe: /opt/lib/libz.so.1: no version information available (required by /var/packages/VideoStation/target/lib/ffmpeg/libavcodec.so.55)
[09:12:09] [INFO]::TRANSCODER: Checking [gotham.211.hdtv-lol[ettv].mp4] for corruption, please stand by ...
[09:12:09] [DEBUG]::MAIN: calling command: /volume1/@appstore/VideoStation/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /volume1/downloads/tv/Gotham.S02E11.HDTV.x264-LOL[ettv]/gotham.211.hdtv-lol[ettv].mp4
/volume1/@appstore/VideoStation/bin/ffprobe: /opt/lib/libz.so.1: no version information available (required by /var/packages/VideoStation/target/lib/ffmpeg/libavcodec.so.55)
[09:12:11] [INFO]::TRANSCODER: SUCCESS: [gotham.211.hdtv-lol[ettv].mp4] has no corruption.
[09:12:11] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request
[09:12:11] [DEBUG]::SICKBEARD: Opening URL: https://localhost:8899/home/postprocess/processEpisode with params: {'nzbName': 'Gotham.S02E11.HDTV.x264-LOL[ettv]', 'force': 1, 'quiet': 1, 'failed': 0, 'dir': '/volume1/downloads/tv/Gotham.S02E11.HDTV.x264-LOL[ettv]', 'process_method': 'move'}
[09:12:18] [POSTPROCESS]::SICKBEARD: Processing folder /volume1/downloads/tv/Gotham.S02E11.HDTV.x264-LOL[ettv]
[09:12:18] [POSTPROCESS]::SICKBEARD: PostProcessing Path: /volume1/downloads/tv
[09:12:18] [POSTPROCESS]::SICKBEARD: PostProcessing Dirs: [u'Gotham.S02E11.HDTV.x264-LOL[ettv]']
[09:12:18] [POSTPROCESS]::SICKBEARD: PostProcessing Files: []
[09:12:18] [POSTPROCESS]::SICKBEARD: PostProcessing VideoFiles: []
[09:12:18] [POSTPROCESS]::SICKBEARD: PostProcessing RarContent: []
[09:12:18] [POSTPROCESS]::SICKBEARD: PostProcessing VideoInRar: []
[09:12:18] [POSTPROCESS]::SICKBEARD: Processing folder Gotham.S02E11.HDTV.x264-LOL[ettv]
[09:12:18] [POSTPROCESS]::SICKBEARD: Processing folder /volume1/downloads/tv/Gotham.S02E11.HDTV.x264-LOL[ettv]
[09:12:18] [POSTPROCESS]::SICKBEARD: Found unwanted files: ['Torrent-Downloaded-from-ExtraTorrent.cc.txt']
[09:12:18] [POSTPROCESS]::SICKBEARD: Processing /volume1/downloads/tv/Gotham.S02E11.HDTV.x264-LOL[ettv]/gotham.211.hdtv-lol[ettv].mp4 (Gotham.S02E11.HDTV.x264-LOL[ettv])
[09:12:18] [POSTPROCESS]::SICKBEARD: Retrieving episode object for 2x11
[09:12:18] [POSTPROCESS]::SICKBEARD: Snatch history had a quality in it, using that: SDTV
[09:12:18] [POSTPROCESS]::SICKBEARD: SR snatched this episode and it is not processed before
[09:12:18] [POSTPROCESS]::SICKBEARD: Is ep a priority download: True
[09:12:18] [POSTPROCESS]::SICKBEARD: There is no existing file so there's no worries about replacing it
[09:12:18] [POSTPROCESS]::SICKBEARD: This download is marked a priority download so I'm going to replace an existing file if I find one
[09:12:18] [POSTPROCESS]::SICKBEARD: Found release name Gotham.S02E11.HDTV.x264-LOL
[09:12:18] [POSTPROCESS]::SICKBEARD: Destination folder for this episode: /volume1/video/TV Shows/Gotham (2014)/Season 02
[09:12:18] [POSTPROCESS]::SICKBEARD: No associated files for /volume1/downloads/tv/Gotham.S02E11.HDTV.x264-LOL[ettv]/gotham.211.hdtv-lol[ettv].mp4 were found during this pass
[09:12:18] [POSTPROCESS]::SICKBEARD: Moving file from /volume1/downloads/tv/Gotham.S02E11.HDTV.x264-LOL[ettv]/gotham.211.hdtv-lol[ettv].mp4 to /volume1/video/TV Shows/Gotham (2014)/Season 02/Gotham.S02E11.Rise.of.the.Villains.Worse.Than.A.Crime.SDTV.mp4
[09:12:18] [POSTPROCESS]::SICKBEARD: Processing succeeded for /volume1/downloads/tv/Gotham.S02E11.HDTV.x264-LOL[ettv]/gotham.211.hdtv-lol[ettv].mp4
[09:12:18] [POSTPROCESS]::SICKBEARD: Deleting file: Torrent-Downloaded-from-ExtraTorrent.cc.txt
[09:12:18] [POSTPROCESS]::SICKBEARD: Deleted folder: /volume1/downloads/tv/Gotham.S02E11.HDTV.x264-LOL[ettv]
[09:12:18] [POSTPROCESS]::SICKBEARD: Successfully processed
[09:12:18] [DEBUG]::PLEX: Attempting to update Plex Library for category tv.
[09:12:19] [DEBUG]::PLEX: Plex Library has been refreshed.
[09:12:19] [INFO]::CLEANDIR: Directory /volume1/downloads/tv/Gotham.S02E11.HDTV.x264-LOL[ettv] has been processed and removed ...
[09:12:19] [INFO]::MAIN: Starting manual run for SickBeard:tv - Folder:/volume1/downloads/tv/Monkeys
[09:12:19] [INFO]::MAIN: Checking database for download info for Monkeys ...
[09:12:19] [DB]::DB: Getting download info for Monkeys from the DB
[09:12:19] [DB]::MAIN: nzbtomedia.db: SELECT * FROM downloads WHERE input_name=? AND status=? with args [u'Monkeys', 0]
[09:12:19] [INFO]::MAIN: Unable to locate download info for Monkeys, continuing to try and process this release ...
[09:12:19] [DEBUG]::MAIN: Received Directory: /volume1/downloads/tv/Monkeys | Name: Monkeys | Category: tv
[09:12:19] [DEBUG]::MAIN: SEARCH: Found the Category: tv in directory structure
[09:12:19] [INFO]::MAIN: SEARCH: Found a unique directory Monkeys in the category directory
[09:12:19] [DEBUG]::MAIN: Determined Directory: /volume1/downloads/tv/Monkeys | Name: Monkeys | Category: tv
[09:12:19] [INFO]::MAIN: Auto-detected SECTION:SickBeard
[09:12:19] [INFO]::MAIN: Output directory set to: /volume1/downloads/tv/Monkeys
[09:12:19] [DEBUG]::MAIN: Scanning files in directory: /volume1/downloads/tv/Monkeys
[09:12:19] [DEBUG]::MAIN: Found 1 files in /volume1/downloads/tv/Monkeys
[09:12:19] [DEBUG]::MAIN: Checking for archives to extract in directory: /volume1/downloads/tv/Monkeys
[09:12:19] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/downloads/tv/Monkeys
[09:12:19] [DEBUG]::MAIN: Checking for empty folders in:/volume1/downloads/tv/Monkeys
[09:12:19] [INFO]::MAIN: Found 1 media files in /volume1/downloads/tv/Monkeys
[09:12:19] [INFO]::MAIN: Calling SickBeard:tv to post-process:Monkeys
[09:12:19] [INFO]::MAIN: SickBeard:tv fork set to sickrage
[09:12:19] [DEBUG]::MAIN: calling command: /volume1/@appstore/VideoStation/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /volume1/@appstore/sickrage/var/SickRage/contrib/nzbToMedia/tests/test.mp4
/volume1/@appstore/VideoStation/bin/ffprobe: /opt/lib/libz.so.1: no version information available (required by /var/packages/VideoStation/target/lib/ffmpeg/libavcodec.so.55)
[09:12:25] [INFO]::TRANSCODER: Checking [12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4] for corruption, please stand by ...
[09:12:25] [DEBUG]::MAIN: calling command: /volume1/@appstore/VideoStation/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /volume1/downloads/tv/Monkeys/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4
/volume1/@appstore/VideoStation/bin/ffprobe: /opt/lib/libz.so.1: no version information available (required by /var/packages/VideoStation/target/lib/ffmpeg/libavcodec.so.55)
[09:12:30] [INFO]::TRANSCODER: SUCCESS: [12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4] has no corruption.
[09:12:30] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request
[09:12:30] [DEBUG]::SICKBEARD: Opening URL: https://localhost:8899/home/postprocess/processEpisode with params: {'nzbName': 'Monkeys', 'force': 1, 'quiet': 1, 'failed': 0, 'dir': '/volume1/downloads/tv/Monkeys', 'process_method': 'move'}
[09:12:49] [POSTPROCESS]::SICKBEARD: Processing folder /volume1/downloads/tv/Monkeys
[09:12:49] [POSTPROCESS]::SICKBEARD: PostProcessing Path: /volume1/downloads/tv
[09:12:49] [POSTPROCESS]::SICKBEARD: PostProcessing Dirs: [u'Monkeys']
[09:12:49] [POSTPROCESS]::SICKBEARD: PostProcessing Files: []
[09:12:49] [POSTPROCESS]::SICKBEARD: PostProcessing VideoFiles: []
[09:12:49] [POSTPROCESS]::SICKBEARD: PostProcessing RarContent: []
[09:12:49] [POSTPROCESS]::SICKBEARD: PostProcessing VideoInRar: []
[09:12:49] [POSTPROCESS]::SICKBEARD: Processing folder Monkeys
[09:12:49] [POSTPROCESS]::SICKBEARD: Processing folder /volume1/downloads/tv/Monkeys
[09:12:49] [POSTPROCESS]::SICKBEARD: Processing /volume1/downloads/tv/Monkeys/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4 (Monkeys)
[09:12:49] [POSTPROCESS]::SICKBEARD: Retrieving episode object for 1x13
[09:12:49] [POSTPROCESS]::SICKBEARD: Looking up quality for name Monkeys, got Unknown
[09:12:49] [POSTPROCESS]::SICKBEARD: Looking up quality for name Monkeys, got Unknown
[09:12:49] [POSTPROCESS]::SICKBEARD: Looking up quality for name 12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4, got Unknown
[09:12:49] [POSTPROCESS]::SICKBEARD: Guessing quality for name 12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4, got SDTV
[09:12:49] [POSTPROCESS]::SICKBEARD: Is ep a priority download: False
[09:12:49] [POSTPROCESS]::SICKBEARD: File /volume1/video/TV Shows/12 Monkeys (2015)/Season 01/12.Monkeys.S01E13.Arms.of.Mine.SD.DVD.mkv doesn't exist so there's no worries about replacing it
[09:12:49] [POSTPROCESS]::SICKBEARD: No associated files for /volume1/video/TV Shows/12 Monkeys (2015)/Season 01/12.Monkeys.S01E13.Arms.of.Mine.SD.DVD.mkv were found during this pass
[09:12:49] [POSTPROCESS]::SICKBEARD: Using original release name 12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4
[09:12:49] [POSTPROCESS]::SICKBEARD: Destination folder for this episode: /volume1/video/TV Shows/12 Monkeys (2015)/Season 01
[09:12:49] [POSTPROCESS]::SICKBEARD: Processing failed for /volume1/downloads/tv/Monkeys/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4: File is locked for reading/writing
[09:12:49] [POSTPROCESS]::SICKBEARD: Problem(s) during processing, failed the following files/folders:  
[09:12:49] [POSTPROCESS]::SICKBEARD: [/volume1/downloads/tv/Monkeys/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4 : Processing failed: File is locked for reading/writing]
[09:12:49] [DEBUG]::PLEX: Attempting to update Plex Library for category tv.
[09:12:49] [DEBUG]::PLEX: Plex Library has been refreshed.
[09:12:49] [ERROR]::MAIN: A problem was reported when trying to perform a manual run for SickBeard:tv.
[09:12:49] [ERROR]::MAIN: A problem was reported in the /nzbToMedia/TorrentToMedia.py script.

@MrCee
Copy link
Author

MrCee commented Jan 4, 2016

As per the above, in summary, this is what happens to permissions when TorrentToMedia.py chmodDirectory = 1

drwxrwsrwx  3 root sc-media      4096 2016-01-04 10:48 .
drwxrwsrwx 14 root sc-media      4096 2016-01-04 08:16 ..
---------x  2 root sc-media 267675043 2015-11-28 03:05 12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4
d--------x  2 root sc-media      4096 2016-01-04 10:48 Monkeys

This file is contained within the Monkeys directory...
---------x 2 root sc-media 267675043 2015-11-28 03:05 12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4

This is what happens to permissions when TorrentToMedia.py chmodDirectory = 0, after resetting everything back to chmod 777

drwxrwsrwx  3 root sc-media      4096 2016-01-04 10:52 .
drwxrwsrwx 14 root sc-media      4096 2016-01-04 08:16 ..
-rwxrwxrwx  2 root sc-media 267675043 2015-11-28 03:05 12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4
drwxr-sr-x  2 root sc-media      4096 2016-01-04 10:52 Monkeys

The file contained within the Monkeys directory...
-rwxrwxrwx 2 root sc-media 267675043 2015-11-28 03:05 12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4

Yet the file is locked.

Note: I did have an MKV version in the db earlier:
/volume1/video/TV Shows/12 Monkeys (2015)/Season 01/12.Monkeys.S01E13.Arms.of.Mine.SD.DVD.mkv which I have deleted from the final destination folder. I was hoping TorrentToMedia would force it to be replaced on a manual run as there are settings to do this in autoprocess.confg force = 1.

I was seeing this in the log when chmodDirectory = 1:

[10:24:18] [POSTPROCESS]::SICKBEARD: File /volume1/video/TV Shows/12 Monkeys (2015)/Season 01/12.Monkeys.S01E13.Arms.of.Mine.SD.DVD.mkv is larger than /volume1/downloads/tv/Monkeys/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4
[10:24:18] [POSTPROCESS]::SICKBEARD: File exists and new file quality is not in a preferred quality list, marking it unsafe to replace

When chmodDirectory = 0, I get the File is locked for reading/writing error.

Here's the last part of the TorrentToMedia.py log.....

[10:52:11] [POSTPROCESS]::SICKBEARD: Processing folder /volume1/downloads/tv/Monkeys
[10:52:11] [POSTPROCESS]::SICKBEARD: PostProcessing Path: /volume1/downloads/tv
[10:52:11] [POSTPROCESS]::SICKBEARD: PostProcessing Dirs: [u'Monkeys']
[10:52:11] [POSTPROCESS]::SICKBEARD: PostProcessing Files: []
[10:52:11] [POSTPROCESS]::SICKBEARD: PostProcessing VideoFiles: []
[10:52:11] [POSTPROCESS]::SICKBEARD: PostProcessing RarContent: []
[10:52:11] [POSTPROCESS]::SICKBEARD: PostProcessing VideoInRar: []
[10:52:11] [POSTPROCESS]::SICKBEARD: Processing folder Monkeys
[10:52:11] [POSTPROCESS]::SICKBEARD: Processing folder /volume1/downloads/tv/Monkeys
[10:52:11] [POSTPROCESS]::SICKBEARD: Processing /volume1/downloads/tv/Monkeys/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4 (Monkeys)
[10:52:11] [POSTPROCESS]::SICKBEARD: Retrieving episode object for 1x13
[10:52:11] [POSTPROCESS]::SICKBEARD: The old status had a quality in it, using that: SDTV
[10:52:11] [POSTPROCESS]::SICKBEARD: SR snatched this episode and it is not processed before
[10:52:11] [POSTPROCESS]::SICKBEARD: Is ep a priority download: True
[10:52:11] [POSTPROCESS]::SICKBEARD: File /volume1/video/TV Shows/12 Monkeys (2015)/Season 01/12.Monkeys.S01E13.Arms.of.Mine.SD.DVD.mkv doesn't exist so there's no worries about replacing it
[10:52:11] [POSTPROCESS]::SICKBEARD: This download is marked a priority download so I'm going to replace an existing file if I find one
[10:52:11] [POSTPROCESS]::SICKBEARD: No associated files for /volume1/video/TV Shows/12 Monkeys (2015)/Season 01/12.Monkeys.S01E13.Arms.of.Mine.SD.DVD.mkv were found during this pass
[10:52:11] [POSTPROCESS]::SICKBEARD: Using original release name 12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4
[10:52:11] [POSTPROCESS]::SICKBEARD: Destination folder for this episode: /volume1/video/TV Shows/12 Monkeys (2015)/Season 01
[10:52:11] [POSTPROCESS]::SICKBEARD: Processing failed for /volume1/downloads/tv/Monkeys/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4: File is locked for reading/writing
[10:52:11] [POSTPROCESS]::SICKBEARD: Problem(s) during processing, failed the following files/folders:  
[10:52:11] [POSTPROCESS]::SICKBEARD: [/volume1/downloads/tv/Monkeys/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4 : Processing failed: File is locked for reading/writing]
[10:52:11] [DEBUG]::PLEX: Attempting to update Plex Library for category tv.
[10:52:11] [DEBUG]::PLEX: Plex Library has been refreshed.
[10:52:11] [ERROR]::MAIN: A problem was reported when trying to perform a manual run for SickBeard:tv.
[10:52:11] [ERROR]::MAIN: A problem was reported in the /nzbToMedia/TorrentToMedia.py script.

@MrCee
Copy link
Author

MrCee commented Jan 4, 2016

If I chmod 777 the Monkeys directory manually (which the script created) and have autoprocess.confg set to chmodDirectory = 0 , everything works correctly....

drwxrwsrwx 2 root sc-media 4096 2016-01-04 10:52 Monkeys

[11:31:01] [POSTPROCESS]::SICKBEARD: Processing folder /volume1/downloads/tv/Monkeys
[11:31:01] [POSTPROCESS]::SICKBEARD: PostProcessing Path: /volume1/downloads/tv
[11:31:01] [POSTPROCESS]::SICKBEARD: PostProcessing Dirs: [u'Monkeys']
[11:31:01] [POSTPROCESS]::SICKBEARD: PostProcessing Files: []
[11:31:01] [POSTPROCESS]::SICKBEARD: PostProcessing VideoFiles: []
[11:31:01] [POSTPROCESS]::SICKBEARD: PostProcessing RarContent: []
[11:31:01] [POSTPROCESS]::SICKBEARD: PostProcessing VideoInRar: []
[11:31:01] [POSTPROCESS]::SICKBEARD: Processing folder Monkeys
[11:31:01] [POSTPROCESS]::SICKBEARD: Processing folder /volume1/downloads/tv/Monkeys
[11:31:01] [POSTPROCESS]::SICKBEARD: Processing /volume1/downloads/tv/Monkeys/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4 (Monkeys)
[11:31:01] [POSTPROCESS]::SICKBEARD: Retrieving episode object for 1x13
[11:31:01] [POSTPROCESS]::SICKBEARD: Looking up quality for name Monkeys, got Unknown
[11:31:01] [POSTPROCESS]::SICKBEARD: Looking up quality for name Monkeys, got Unknown
[11:31:01] [POSTPROCESS]::SICKBEARD: Looking up quality for name 12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4, got Unknown
[11:31:01] [POSTPROCESS]::SICKBEARD: Guessing quality for name 12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4, got SDTV
[11:31:01] [POSTPROCESS]::SICKBEARD: Is ep a priority download: False
[11:31:01] [POSTPROCESS]::SICKBEARD: File /volume1/video/TV Shows/12 Monkeys (2015)/Season 01/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mkv doesn't exist so there's no worries about replacing it
[11:31:01] [POSTPROCESS]::SICKBEARD: No associated files for /volume1/video/TV Shows/12 Monkeys (2015)/Season 01/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mkv were found during this pass
[11:31:01] [POSTPROCESS]::SICKBEARD: Using original release name 12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4
[11:31:01] [POSTPROCESS]::SICKBEARD: Destination folder for this episode: /volume1/video/TV Shows/12 Monkeys (2015)/Season 01
[11:31:01] [POSTPROCESS]::SICKBEARD: No associated files for /volume1/downloads/tv/Monkeys/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4 were found during this pass
[11:31:01] [POSTPROCESS]::SICKBEARD: Moving file from /volume1/downloads/tv/Monkeys/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4 to /volume1/video/TV Shows/12 Monkeys (2015)/Season 01/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4
[11:31:01] [POSTPROCESS]::SICKBEARD: Processing succeeded for /volume1/downloads/tv/Monkeys/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4
[11:31:01] [POSTPROCESS]::SICKBEARD: Deleted folder: /volume1/downloads/tv/Monkeys
[11:31:01] [POSTPROCESS]::SICKBEARD: Successfully processed
[11:31:01] [DEBUG]::PLEX: Attempting to update Plex Library for category tv.
[11:31:01] [DEBUG]::PLEX: Plex Library has been refreshed.
[11:31:01] [INFO]::CLEANDIR: Directory /volume1/downloads/tv/Monkeys has been processed and removed ...
[11:31:01] [INFO]::MAIN: The /nzbToMedia/TorrentToMedia.py script completed successfully.

@MrCee
Copy link
Author

MrCee commented Jan 4, 2016

I have found a part of the problem.....

If autoProcessMedia.cfg is set up with the following the script will fail because the Monkeys directory is not created with WRITE permissions on chmodDirectory = 0 (Note: chmodDirectory = 1 strips all permissions to nothing):

[SickBeard]
    [[tv]]
        process_method = move

If autoProcessMedia.cfg is set up with chmodDirectory = 0 and the following the script will go ahead:

[SickBeard]
    [[tv]]
        process_method = hardlink

The last problem that remains is that the script does not clean up/delete the original file which was picked up before the 'Monkeys' directory was created.

[12:03:33] [POSTPROCESS]::SICKBEARD: Destination folder for this episode: /volume1/video/TV Shows/12 Monkeys (2015)/Season 01
[12:03:33] [POSTPROCESS]::SICKBEARD: No associated files for /volume1/downloads/tv/Monkeys/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4 were found during this pass
[12:03:33] [POSTPROCESS]::SICKBEARD: Hard linking file from /volume1/downloads/tv/Monkeys/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4 to /volume1/video/TV Shows/12 Monkeys (2015)/Season 01/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4
[12:03:33] [POSTPROCESS]::SICKBEARD: Processing succeeded for /volume1/downloads/tv/Monkeys/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4

This leaves us with

/volume1/downloads/tv/12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4

All options to cleanup / delete original are set to 1

[General]
    # Enable/Disable forceful cleaning of leftover files following postprocess
    force_clean = 1
[SickBeard]
        # tell SickRage to delete all source files after processing.
        delete_on = 1
[Torrent]
    deleteOriginal = 1

@clinton-hall
Copy link
Owner

The reason it can't delete (move) the original files is that the files are still seeding. When called from Transmission/DS the script pauses the torrent (releases the file lock) and then does it's thing. At the end, it can resume seeding or delete the torrent (option deleteOriginal).
None of this happens when called manually since we don't have the torrent Hash passed in.

@MrCee
Copy link
Author

MrCee commented Jan 4, 2016

Thanks Clinton.
I've posted a few other issues prior to my latest post, apologies for the multiple posts/logs... I'm sure I'm on the right track as I believe there may be a bug. It isn't a seeding problem. Folders created by TorrentToMedia.py have incorrect permissions. Can I ask more about the above posts before each log....

I'm sure chmodDirectory = 1 is having undesired results and removing all permissions regardless of seeding. There is definitely a problem with chmodDirectory = 1 at my end. Permissions should not be stripped and affected this way. chmodDirectory = 1 is removing all permissions except for EXECUTE. It cannot be used at all on a manual run.

Q. What is the purpose of chmodDirectory = 1 if it removes all permissions from the folder (and original file) to be processed?

e.g.

drwxrwsrwx  3 root sc-media      4096 2016-01-04 10:48 .
drwxrwsrwx 14 root sc-media      4096 2016-01-04 08:16 ..
---------x  2 root sc-media 267675043 2015-11-28 03:05 12.Monkeys.S01E13.Arms.of.Mine.SDTV.mp4
d--------x  2 root sc-media      4096 2016-01-04 10:48 Monkeys

I'd really like to nut this one out and appreciate your input.
Cheers.

@clinton-hall
Copy link
Owner

Chmod needs to be set to a valid chmod

E.g.

 chmodDirectory = 755

@MrCee
Copy link
Author

MrCee commented Jan 7, 2016

AHA! Thank you! (embarrassed that I missed this as I thought it was a 0 or 1 toggle) Note: The default is chmodDirectory = 0 in autoProcessMedia.cfg.spec. I'll update further wiki(s) shortly.

P.S... Synology support have responded and are looking in to the DOWNLOAD_TR_TMP_DIR and I am hoping this can be adjusted on the next version update of Download Station.

@clinton-hall
Copy link
Owner

Good news...
Thanks for looking at wiki... Obviously when you write the code and know how something works, it is hard to gauge how the wiki will be interpreted...

So setting 0 does "toggle this feature off" but a non-zero setting needs to be a valid chmod.

Let me know what Syno does. I can browse another environment variable if there is one for the correct path etc...

@MrCee
Copy link
Author

MrCee commented Apr 10, 2016

@clinton-hall
Synology haven't done anything with the request to have the ENVIRONMENT VARIABLE: TR_TORRENT_DIR redefined before TorrentToMedia.py is called by Download Station. It still points to the old location and cannot be processed as it is not showing a tv or movie directory.

What do you think of including a work around something like the following.....

If TR_TORRENT_DIR contains DOWNLOAD_TR_TMP_DIR then match the download ID with the correct location which can be derived from this query.

psql -t -A -U postgres -d download -c 'SELECT task_id, filename, destination FROM Download_queue'

OUTPUT:
2313|Avengers.Age.of.Ultron.2015.DVDrip.Isl.Texti.avi|downloads/movie
2315|Thor The Dark World (2013) DVDRip XviD-MAXSPEED|downloads/movie

Note: /Volume1/ is missing from the above output destination in this PSQL query because I don't specify this in Sickrage or CouchPotato. The GUI appends its own volume which is not displayed for manual adds or editing final destination, although we can still pass absolute paths from SR or CP if required.

The other ENVIRONMENT VARIABLES are correct...

2016-04-10 03:23:17 INFO    ::ENVIRONMENT: TR_APP_VERSION: 2.84
2016-04-10 03:23:17 INFO    ::ENVIRONMENT: SHLVL: 1
2016-04-10 03:23:17 INFO    ::ENVIRONMENT: TR_TORRENT_HASH: eb1021314a61e64339c19c73ecba299ee3019807
2016-04-10 03:23:17 INFO    ::ENVIRONMENT: TR_TORRENT_NAME: The.Path.S01E01.WEBRip.x264-FUM[ettv]
2016-04-10 03:23:17 INFO    ::ENVIRONMENT: TR_TIME_LOCALTIME: Sun Apr 10 03:22:12 2016
2016-04-10 03:23:17 INFO    ::ENVIRONMENT: PWD: /
2016-04-10 03:23:17 INFO    ::ENVIRONMENT: TR_TORRENT_ID: 2326
2016-04-10 03:23:17 INFO    ::ENVIRONMENT: PATH: /sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin
2016-04-10 03:23:17 INFO    ::ENVIRONMENT: _: /bin/python
2016-04-10 03:23:17 INFO    ::ENVIRONMENT: TR_TORRENT_DIR: /var/services/download/2326/DOWNLOAD_TR_TMP_DIR

Cheers!

@MrCee
Copy link
Author

MrCee commented Aug 5, 2021

Fixed in #1671

@MrCee MrCee closed this as completed Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants