clinton-hall / nzbToMedia

Provides NZB and Torrent postprocessing To CouchPotatoServer, SickBeard/SickRage, HeadPhones, Mylar and Gamez
GNU General Public License v3.0
672 stars 176 forks source link

TorrentToMedia is not moving files #1723

Closed MrCee closed 4 years ago

MrCee commented 4 years ago

Describe the bug On Nightly, TorrentToMedia is not moving files on completion of the download, whether it be triggered by Synology download station or during a manual run, the logs appear all okay. This does not occur on the master branch.

Technical Specs

  1. Running on (Windows, Linux, NAS Model etc) 'SYNOLOGY.'
  2. Python version '3.5'
  3. Download Client (NZBget, SABnbzd, Transmission) 'DOWNLOAD STATION/SABNZB'
  4. Intended Media Management (SickChill, CouchPotoato, Radarr, Sonarr) 'SICKCHILL'

Expected behavior Usually, the file is moved from /volume1/downloads/tv to a more permanent location at the end of the process.

If the script is set to clean-up, and if the torrent media was downloaded with a containing folder, then the media file and folder are deleted from /volume1/downloads/tv once moved to the permanent location. If a media file alone is downloaded with no folder, the process creates a temp folder and only cleans up the temp folder and the original media file is sometimes left behind, sometimes not. I can't work it out when this is expected.

Lately, the media file downloaded alone has been left behind by the clean-up process, but in both scenarios above, nothing is being moved when passed to Sickchill post-processing. I think this has been occurring since I had to stash everything and pull down nightly again just yesterday.

I am not experiencing any issues using SickChill manual post-processing. I have included the log from master below also. The log for nighly was a fresh download from this morning....

NIGHLY Log

[07:37:21] [INFO]::MAIN: Loading config from [/volume1/@appstore/nzbToMedia/autoProcessMedia.cfg]
[07:37:21] [INFO]::ENVIRONMENT: PGDATA: /var/services/pgsql
[07:37:21] [INFO]::ENVIRONMENT: LOGNAME: root
[07:37:21] [INFO]::ENVIRONMENT: LANG: en_US.utf8
[07:37:21] [INFO]::ENVIRONMENT: MAIL: /var/mail/root
[07:37:21] [INFO]::ENVIRONMENT: PAGER: more
[07:37:21] [INFO]::ENVIRONMENT: USER: root
[07:37:21] [INFO]::ENVIRONMENT: PWD: /nzbToMedia
[07:37:21] [INFO]::ENVIRONMENT: SHLVL: 1
[07:37:21] [INFO]::ENVIRONMENT: TERMINFO: /usr/share/terminfo
[07:37:21] [INFO]::ENVIRONMENT: LC_ALL: en_US.utf8
[07:37:21] [INFO]::ENVIRONMENT: SSH_CONNECTION: XXXXXXXXXXXXXXXXXXX
[07:37:21] [INFO]::ENVIRONMENT: SHELL: /bin/ash
[07:37:21] [INFO]::ENVIRONMENT: HOME: /root
[07:37:21] [INFO]::ENVIRONMENT: TERM: xterm-256color
[07:37:21] [INFO]::ENVIRONMENT: SSH_TTY: /dev/pts/2
[07:37:21] [INFO]::ENVIRONMENT: PATH: /sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin:/opt/bin:/opt/sbin
[07:37:21] [INFO]::ENVIRONMENT: SSH_CLIENT: XXXXXXXXXXXXXXXXXXX
[07:37:21] [INFO]::ENVIRONMENT: _: ./TorrentToMedia.py
[07:37:21] [INFO]::ENVIRONMENT: OLDPWD: /root
/volume1/@appstore/nzbToMedia/eol.py:147: LifetimeWarning: Python 3.5 is no longer supported.
  warnings.warn(msg, LifetimeWarning)
[07:37:21] [INFO]::MAIN: Python v3.5 will reach end of life in 194 days.
[07:37:21] [WARNING]::MAIN: Please upgrade to a more recent Python version.
[07:37:21] [INFO]::MAIN: Checking database structure...
[07:37:21] [DEBUG]::MAIN: Checking Initial Schema database upgrade
[07:37:21] [DB]::MAIN: nzbtomedia.db: SELECT 1 FROM sqlite_master WHERE name = ?; with args ('db_version',)
[07:37:21] [DB]::MAIN: nzbtomedia.db: SELECT db_version FROM db_version
[07:37:21] [DEBUG]::MAIN: InitialSchema upgrade not required
[07:37:21] [DEBUG]::MAIN: Checking if we can use git commands: "/volume1/@appstore/git/bin/git" version
[07:37:21] [DEBUG]::MAIN: Executing "/volume1/@appstore/git/bin/git" version with your shell in /volume1/@appstore/nzbToMedia
[07:37:21] [DEBUG]::MAIN: git output: git version 2.24.1
[07:37:21] [DEBUG]::MAIN: "/volume1/@appstore/git/bin/git" version : returned successful
[07:37:21] [DEBUG]::MAIN: Using: "/volume1/@appstore/git/bin/git"
[07:37:21] [DEBUG]::MAIN: Executing "/volume1/@appstore/git/bin/git" symbolic-ref -q HEAD with your shell in /volume1/@appstore/nzbToMedia
[07:37:21] [DEBUG]::MAIN: git output: refs/heads/nightly
[07:37:21] [DEBUG]::MAIN: "/volume1/@appstore/git/bin/git" symbolic-ref -q HEAD : returned successful
[07:37:21] [INFO]::MAIN: Checking if git needs an update
[07:37:21] [DEBUG]::MAIN: Executing "/volume1/@appstore/git/bin/git" rev-parse HEAD with your shell in /volume1/@appstore/nzbToMedia
[07:37:21] [DEBUG]::MAIN: git output: f8de0c1ccfb2d4fe2a40539cc807d5340cc0ec04
[07:37:21] [DEBUG]::MAIN: "/volume1/@appstore/git/bin/git" rev-parse HEAD : returned successful
[07:37:21] [DEBUG]::MAIN: Executing "/volume1/@appstore/git/bin/git" fetch origin with your shell in /volume1/@appstore/nzbToMedia
[07:37:24] [DEBUG]::MAIN: git output: 
[07:37:24] [DEBUG]::MAIN: "/volume1/@appstore/git/bin/git" fetch origin : returned successful
[07:37:24] [DEBUG]::MAIN: Executing "/volume1/@appstore/git/bin/git" rev-parse --verify --quiet '@{upstream}' with your shell in /volume1/@appstore/nzbToMedia
[07:37:24] [DEBUG]::MAIN: git output: f8de0c1ccfb2d4fe2a40539cc807d5340cc0ec04
[07:37:24] [DEBUG]::MAIN: "/volume1/@appstore/git/bin/git" rev-parse --verify --quiet '@{upstream}' : returned successful
[07:37:24] [DEBUG]::MAIN: Executing "/volume1/@appstore/git/bin/git" rev-list --left-right '@{upstream}'...HEAD with your shell in /volume1/@appstore/nzbToMedia
[07:37:24] [DEBUG]::MAIN: git output: 
[07:37:24] [DEBUG]::MAIN: "/volume1/@appstore/git/bin/git" rev-list --left-right '@{upstream}'...HEAD : returned successful
[07:37:24] [DEBUG]::MAIN: cur_commit = f8de0c1ccfb2d4fe2a40539cc807d5340cc0ec04 % (newest_commit)= f8de0c1ccfb2d4fe2a40539cc807d5340cc0ec04, num_commits_behind = 0, num_commits_ahead = 0
[07:37:24] [INFO]::MAIN: No update needed
[07:37:24] [INFO]::MAIN: nzbToMedia Version:f8de0c1ccfb2d4fe2a40539cc807d5340cc0ec04 Branch:nightly (Linux 3.2.40)
[07:37:25] [DEBUG]::MAIN: Connecting to synology: http://localhost:5000
You are now logged in!
[07:37:28] [INFO]::MAIN: #########################################################
[07:37:28] [INFO]::MAIN: ## ..::[TorrentToMedia.py]::.. ##
[07:37:28] [INFO]::MAIN: #########################################################
[07:37:28] [DEBUG]::MAIN: Options passed into TorrentToMedia: ['./TorrentToMedia.py']
[07:37:28] [WARNING]::MAIN: Invalid number of arguments received from client, Switching to manual run mode ...
[07:37:28] [INFO]::MAIN: Searching /volume1/downloads/movie for mediafiles to post-process ...
[07:37:28] [INFO]::MAIN: Searching /volume1/downloads/movie for mediafiles to post-process ...
[07:37:28] [DEBUG]::MAIN: No directories identified in Radarr:movie for post-processing
[07:37:28] [INFO]::MAIN: Searching /volume1/downloads/tv for mediafiles to post-process ...
[07:37:28] [DEBUG]::MAIN: Found file Vikings.S06E01.New.Beginnings.HDTV.x264.mkv in root directory /volume1/downloads/tv.
[07:37:30] [INFO]::COPYLINK: MEDIAFILE: [b'Vikings.S06E01.New.Beginnings.HDTV.x264.mkv']
[07:37:30] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/downloads/tv]
[07:37:30] [INFO]::COPYLINK: TARGET FOLDER: [b'/volume1/downloads/tv/Vikings']
[07:37:30] [INFO]::COPYLINK: Hard linking SOURCE MEDIAFILE -> TARGET FOLDER
[07:37:30] [DEBUG]::MAIN: Found file .DS_Store in root directory /volume1/downloads/tv.
[07:37:30] [INFO]::COPYLINK: MEDIAFILE: [b'DS_Store']
[07:37:30] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/downloads/tv]
[07:37:30] [INFO]::COPYLINK: TARGET FOLDER: [b'/volume1/downloads/tv/DS_Store']
[07:37:30] [INFO]::COPYLINK: Hard linking SOURCE MEDIAFILE -> TARGET FOLDER
[07:37:30] [INFO]::MAIN: Searching /volume1/downloads/tv for mediafiles to post-process ...
[07:37:30] [DEBUG]::MAIN: Found file Vikings.S06E01.New.Beginnings.HDTV.x264.mkv in root directory /volume1/downloads/tv.
[07:37:30] [INFO]::COPYLINK: MEDIAFILE: [b'Vikings.S06E01.New.Beginnings.HDTV.x264.mkv']
[07:37:30] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/downloads/tv]
[07:37:30] [INFO]::COPYLINK: TARGET FOLDER: [b'/volume1/downloads/tv/Vikings']
[07:37:30] [INFO]::COPYLINK: MEDIAFILE already exists in the TARGET folder, skipping ...
[07:37:30] [DEBUG]::MAIN: Found file .DS_Store in root directory /volume1/downloads/tv.
[07:37:30] [INFO]::COPYLINK: MEDIAFILE: [b'DS_Store']
[07:37:30] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/downloads/tv]
[07:37:30] [INFO]::COPYLINK: TARGET FOLDER: [b'/volume1/downloads/tv/DS_Store']
[07:37:30] [INFO]::COPYLINK: MEDIAFILE already exists in the TARGET folder, skipping ...
[07:37:30] [INFO]::MAIN: Starting manual run for SickBeard:tv - Folder:/volume1/downloads/tv/Vikings
[07:37:30] [INFO]::MAIN: Checking database for download info for Vikings ...
[07:37:30] [DB]::DB: Getting download info for Vikings from the DB
[07:37:30] [DB]::MAIN: nzbtomedia.db: SELECT * FROM downloads WHERE input_name=? AND status=? with args ['Vikings', 0]
[07:37:30] [INFO]::MAIN: Unable to locate download info for Vikings, continuing to try and process this release ...
[07:37:30] [DEBUG]::MAIN: Received Directory: /volume1/downloads/tv/Vikings | Name: Vikings | Category: tv
[07:37:30] [DEBUG]::MAIN: SEARCH: Found the Category: tv in directory structure
[07:37:30] [INFO]::MAIN: SEARCH: Found a unique directory Vikings in the category directory
[07:37:30] [DEBUG]::MAIN: Determined Directory: /volume1/downloads/tv/Vikings | Name: Vikings | Category: tv
[07:37:30] [INFO]::MAIN: Auto-detected SECTION:SickBeard
[07:37:30] [INFO]::MAIN: Output directory set to: /volume1/downloads/tv/Vikings
[07:37:30] [DEBUG]::MAIN: Scanning files in directory: /volume1/downloads/tv/Vikings
[07:37:30] [DEBUG]::MAIN: Found 1 files in /volume1/downloads/tv/Vikings
[07:37:30] [INFO]::COPYLINK: MEDIAFILE: [Vikings.S06E01.New.Beginnings.HDTV.x264.mkv]
[07:37:30] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/downloads/tv/Vikings]
[07:37:30] [INFO]::COPYLINK: TARGET FOLDER: [/volume1/downloads/tv/Vikings]
[07:37:30] [INFO]::COPYLINK: SOURCE AND TARGET files are the same, skipping ...
[07:37:30] [DEBUG]::MAIN: Checking for archives to extract in directory: /volume1/downloads/tv/Vikings
[07:37:30] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/downloads/tv/Vikings
[07:37:30] [DEBUG]::MAIN: Checking for empty folders in:/volume1/downloads/tv/Vikings
[07:37:30] [INFO]::MAIN: Found 1 media files in /volume1/downloads/tv/Vikings
[07:37:30] [INFO]::MAIN: Calling SickBeard:tv to post-process:Vikings
[07:37:30] [INFO]::MAIN: Changing file mode of /volume1/downloads/tv/Vikings to 0o777
[07:37:30] [DEBUG]::SERVER: Attempting to connect to server at http://localhost:8083
[07:37:37] [DEBUG]::SERVER: Server responded at http://localhost:8083
[07:37:37] [INFO]::MAIN: SickBeard:tv fork set to SickChill
[07:37:37] [DEBUG]::MAIN: calling command: /usr/local/ffmpeg/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /volume1/@appstore/nzbToMedia/tests/test.mp4
[07:37:39] [DEBUG]::MAIN: calling command: /usr/local/ffmpeg/bin/ffprobe -v quiet -print_format json -show_format -show_streams /volume1/@appstore/nzbToMedia/tests/test.mp4
[07:37:39] [ERROR]::TRANSCODER: Checking [/volume1/@appstore/nzbToMedia/tests/test.mp4] has failed
[07:37:39] [INFO]::TRANSCODER: DISABLED: ffprobe failed to analyse test file. Stopping corruption check.
[07:37:39] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request
[07:37:39] [DEBUG]::SICKBEARD: Opening URL: http://localhost:8083/api/ef667d1f180e5156340322b412173381/ with params: {'quiet': 1, 'failed': 0, 'force': 1, 'process_method': 'move', 'nzbName': 'Vikings', 'delete_on': 1, 'proc_dir': '/volume1/downloads/tv/Vikings', 'force_next': 1}
[07:37:39] [DEBUG]::PLEX: Attempting to update Plex Library for category tv.
[07:37:40] [DEBUG]::PLEX: Plex Library has been refreshed.
[07:37:40] [INFO]::CLEANDIR: Doing Forceful Clean of /volume1/downloads/tv/Vikings
[07:37:40] [INFO]::MAIN: Deleting /volume1/downloads/tv/Vikings
[07:37:40] [INFO]::MAIN: Starting manual run for SickBeard:tv - Folder:/volume1/downloads/tv/DS_Store
[07:37:40] [INFO]::MAIN: Checking database for download info for DS_Store ...
[07:37:40] [DB]::DB: Getting download info for DS_Store from the DB
[07:37:40] [DB]::MAIN: nzbtomedia.db: SELECT * FROM downloads WHERE input_name=? AND status=? with args ['DS_Store', 0]
[07:37:40] [INFO]::MAIN: Unable to locate download info for DS_Store, continuing to try and process this release ...
[07:37:40] [DEBUG]::MAIN: Received Directory: /volume1/downloads/tv/DS_Store | Name: DS_Store | Category: tv
[07:37:40] [DEBUG]::MAIN: SEARCH: Found the Category: tv in directory structure
[07:37:40] [INFO]::MAIN: SEARCH: Found torrent file DS_Store in input directory directory /volume1/downloads/tv/DS_Store
[07:37:40] [INFO]::MAIN: SEARCH: Setting input_directory to /volume1/downloads/tv/DS_Store/DS_Store
[07:37:40] [DEBUG]::MAIN: Determined Directory: /volume1/downloads/tv/DS_Store/DS_Store | Name: DS_Store | Category: tv
[07:37:40] [INFO]::MAIN: Auto-detected SECTION:SickBeard
[07:37:40] [INFO]::MAIN: Output directory set to: /volume1/downloads/tv/DS_Store/DS_Store
[07:37:40] [DEBUG]::MAIN: Scanning files in directory: /volume1/downloads/tv/DS_Store/DS_Store
[07:37:40] [DEBUG]::MAIN: Found 1 files in /volume1/downloads/tv/DS_Store/DS_Store
[07:37:40] [INFO]::COPYLINK: MEDIAFILE: [DS_Store]
[07:37:40] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/downloads/tv/DS_Store]
[07:37:40] [INFO]::COPYLINK: TARGET FOLDER: [/volume1/downloads/tv/DS_Store/DS_Store]
[07:37:40] [INFO]::COPYLINK: SOURCE AND TARGET folders are the same, skipping ...
[07:37:40] [DEBUG]::MAIN: Checking for archives to extract in directory: /volume1/downloads/tv/DS_Store/DS_Store
[07:37:40] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/downloads/tv/DS_Store/DS_Store
[07:37:40] [WARNING]::MAIN: Found no media files in /volume1/downloads/tv/DS_Store/DS_Store
[07:37:40] [INFO]::MAIN: Calling SickBeard:tv to post-process:DS_Store
[07:37:40] [INFO]::MAIN: Changing file mode of /volume1/downloads/tv/DS_Store/DS_Store to 0o777
[07:37:40] [DEBUG]::SERVER: Attempting to connect to server at http://localhost:8083
[07:37:52] [DEBUG]::SERVER: Server responded at http://localhost:8083
[07:37:52] [INFO]::MAIN: SickBeard:tv fork already set to SickChill
[07:37:52] [WARNING]::SICKBEARD: No media files found in directory /volume1/downloads/tv/DS_Store to manually process.
[07:37:52] [DEBUG]::PLEX: Attempting to update Plex Library for category tv.
[07:37:52] [DEBUG]::PLEX: Plex Library has been refreshed.
[07:37:52] [INFO]::CLEANDIR: Doing Forceful Clean of /volume1/downloads/tv/DS_Store/DS_Store
[07:37:52] [INFO]::MAIN: Deleting /volume1/downloads/tv/DS_Store/DS_Store
[07:37:52] [ERROR]::MAIN: Unable to delete folder /volume1/downloads/tv/DS_Store/DS_Store
[07:37:52] [INFO]::MAIN: The ./TorrentToMedia.py script completed successfully.
root@dawnstealer:/nzbToMedia# 

MASTER Log

[06:55:20] [INFO]::MAIN: Loading config from [/volume1/@appstore/nzbToMedia/autoProcessMedia.cfg]
[06:55:20] [INFO]::ENVIRONMENT: SSH_TTY: /dev/pts/2
[06:55:20] [INFO]::ENVIRONMENT: TERM: xterm-256color
[06:55:20] [INFO]::ENVIRONMENT: PATH: /sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin:/opt/bin:/opt/sbin
[06:55:20] [INFO]::ENVIRONMENT: LANG: en_US.utf8
[06:55:20] [INFO]::ENVIRONMENT: HOME: /root
[06:55:20] [INFO]::ENVIRONMENT: SHELL: /bin/ash
[06:55:20] [INFO]::ENVIRONMENT: PWD: /nzbToMedia
[06:55:20] [INFO]::ENVIRONMENT: TERMINFO: /usr/share/terminfo
[06:55:20] [INFO]::ENVIRONMENT: SHLVL: 1
[06:55:20] [INFO]::ENVIRONMENT: PGDATA: /var/services/pgsql
[06:55:20] [INFO]::ENVIRONMENT: SSH_CONNECTION: XXXXXXXXXXXXXXXXXXXXXX
[06:55:20] [INFO]::ENVIRONMENT: OLDPWD: /root
[06:55:20] [INFO]::ENVIRONMENT: _: ./TorrentToMedia.py
[06:55:20] [INFO]::ENVIRONMENT: MAIL: /var/mail/root
[06:55:20] [INFO]::ENVIRONMENT: LC_ALL: en_US.utf8
[06:55:20] [INFO]::ENVIRONMENT: SSH_CLIENT: XXXXXXXXXXXXXXXXXXXXXX
[06:55:20] [INFO]::ENVIRONMENT: LOGNAME: root
[06:55:20] [INFO]::ENVIRONMENT: PAGER: more
[06:55:20] [INFO]::ENVIRONMENT: USER: root
/volume1/@appstore/nzbToMedia/eol.py:147: LifetimeWarning: Python 3.5 is no longer supported.
  warnings.warn(msg, LifetimeWarning)
[06:55:20] [INFO]::MAIN: Python v3.5 will reach end of life in 194 days.
[06:55:20] [WARNING]::MAIN: Please upgrade to a more recent Python version.
[06:55:20] [INFO]::MAIN: Checking database structure...
[06:55:20] [DEBUG]::MAIN: Checking Initial Schema database upgrade
[06:55:20] [DB]::MAIN: nzbtomedia.db: SELECT 1 FROM sqlite_master WHERE name = ?; with args ('db_version',)
[06:55:20] [DB]::MAIN: nzbtomedia.db: SELECT db_version FROM db_version
[06:55:20] [DEBUG]::MAIN: InitialSchema upgrade not required
[06:55:20] [DEBUG]::MAIN: Checking if we can use git commands: "/volume1/@appstore/git/bin/git" version
[06:55:20] [DEBUG]::MAIN: Executing "/volume1/@appstore/git/bin/git" version with your shell in /volume1/@appstore/nzbToMedia
[06:55:20] [DEBUG]::MAIN: git output: git version 2.24.1
[06:55:20] [DEBUG]::MAIN: "/volume1/@appstore/git/bin/git" version : returned successful
[06:55:20] [DEBUG]::MAIN: Using: "/volume1/@appstore/git/bin/git"
[06:55:20] [DEBUG]::MAIN: Executing "/volume1/@appstore/git/bin/git" symbolic-ref -q HEAD with your shell in /volume1/@appstore/nzbToMedia
[06:55:20] [DEBUG]::MAIN: git output: refs/heads/master
[06:55:20] [DEBUG]::MAIN: "/volume1/@appstore/git/bin/git" symbolic-ref -q HEAD : returned successful
[06:55:20] [INFO]::MAIN: Checking if git needs an update
[06:55:20] [DEBUG]::MAIN: Executing "/volume1/@appstore/git/bin/git" rev-parse HEAD with your shell in /volume1/@appstore/nzbToMedia
[06:55:20] [DEBUG]::MAIN: git output: 5a6837759d90285664b3cb596662adb5bfbcb2a2
[06:55:20] [DEBUG]::MAIN: "/volume1/@appstore/git/bin/git" rev-parse HEAD : returned successful
[06:55:20] [DEBUG]::MAIN: Executing "/volume1/@appstore/git/bin/git" fetch origin with your shell in /volume1/@appstore/nzbToMedia
[06:55:23] [DEBUG]::MAIN: git output: 
[06:55:23] [DEBUG]::MAIN: "/volume1/@appstore/git/bin/git" fetch origin : returned successful
[06:55:23] [DEBUG]::MAIN: Executing "/volume1/@appstore/git/bin/git" rev-parse --verify --quiet '@{upstream}' with your shell in /volume1/@appstore/nzbToMedia
[06:55:23] [DEBUG]::MAIN: git output: 5a6837759d90285664b3cb596662adb5bfbcb2a2
[06:55:23] [DEBUG]::MAIN: "/volume1/@appstore/git/bin/git" rev-parse --verify --quiet '@{upstream}' : returned successful
[06:55:23] [DEBUG]::MAIN: Executing "/volume1/@appstore/git/bin/git" rev-list --left-right '@{upstream}'...HEAD with your shell in /volume1/@appstore/nzbToMedia
[06:55:23] [DEBUG]::MAIN: git output: 
[06:55:23] [DEBUG]::MAIN: "/volume1/@appstore/git/bin/git" rev-list --left-right '@{upstream}'...HEAD : returned successful
[06:55:23] [DEBUG]::MAIN: cur_commit = 5a6837759d90285664b3cb596662adb5bfbcb2a2 % (newest_commit)= 5a6837759d90285664b3cb596662adb5bfbcb2a2, num_commits_behind = 0, num_commits_ahead = 0
[06:55:23] [INFO]::MAIN: No update needed
[06:55:23] [INFO]::MAIN: nzbToMedia Version:5a6837759d90285664b3cb596662adb5bfbcb2a2 Branch:master (Linux 3.2.40)
[06:55:24] [INFO]::MAIN: #########################################################
[06:55:24] [INFO]::MAIN: ## ..::[TorrentToMedia.py]::.. ##
[06:55:24] [INFO]::MAIN: #########################################################
[06:55:24] [DEBUG]::MAIN: Options passed into TorrentToMedia: ['./TorrentToMedia.py']
[06:55:24] [WARNING]::MAIN: Invalid number of arguments received from client, Switching to manual run mode ...
[06:55:24] [INFO]::MAIN: Searching /volume1/downloads/movie for mediafiles to post-process ...
[06:55:24] [INFO]::MAIN: Searching /volume1/downloads/movie for mediafiles to post-process ...
[06:55:24] [DEBUG]::MAIN: No directories identified in Radarr:movie for post-processing
[06:55:24] [INFO]::MAIN: Searching /volume1/downloads/tv for mediafiles to post-process ...
[06:55:24] [DEBUG]::MAIN: Found file Vikings.S06E01.HDTV.x264-SVA[eztv].mkv in root directory /volume1/downloads/tv.
[06:55:26] [INFO]::COPYLINK: MEDIAFILE: [b'Vikings.S06E01.HDTV.x264-SVA[eztv].mkv']
[06:55:26] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/downloads/tv]
[06:55:26] [INFO]::COPYLINK: TARGET FOLDER: [b'/volume1/downloads/tv/Vikings']
[06:55:26] [INFO]::COPYLINK: Hard linking SOURCE MEDIAFILE -> TARGET FOLDER
[06:55:26] [DEBUG]::MAIN: Found file .DS_Store in root directory /volume1/downloads/tv.
[06:55:26] [INFO]::COPYLINK: MEDIAFILE: [b'DS_Store']
[06:55:26] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/downloads/tv]
[06:55:26] [INFO]::COPYLINK: TARGET FOLDER: [b'/volume1/downloads/tv/DS_Store']
[06:55:26] [INFO]::COPYLINK: MEDIAFILE already exists in the TARGET folder, skipping ...
[06:55:26] [INFO]::MAIN: Searching /volume1/downloads/tv for mediafiles to post-process ...
[06:55:26] [DEBUG]::MAIN: Found file Vikings.S06E01.HDTV.x264-SVA[eztv].mkv in root directory /volume1/downloads/tv.
[06:55:26] [INFO]::COPYLINK: MEDIAFILE: [b'Vikings.S06E01.HDTV.x264-SVA[eztv].mkv']
[06:55:26] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/downloads/tv]
[06:55:26] [INFO]::COPYLINK: TARGET FOLDER: [b'/volume1/downloads/tv/Vikings']
[06:55:26] [INFO]::COPYLINK: MEDIAFILE already exists in the TARGET folder, skipping ...
[06:55:26] [DEBUG]::MAIN: Found file .DS_Store in root directory /volume1/downloads/tv.
[06:55:26] [INFO]::COPYLINK: MEDIAFILE: [b'DS_Store']
[06:55:26] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/downloads/tv]
[06:55:26] [INFO]::COPYLINK: TARGET FOLDER: [b'/volume1/downloads/tv/DS_Store']
[06:55:26] [INFO]::COPYLINK: MEDIAFILE already exists in the TARGET folder, skipping ...
[06:55:26] [INFO]::MAIN: Starting manual run for SickBeard:tv - Folder:/volume1/downloads/tv/Vikings
[06:55:26] [INFO]::MAIN: Checking database for download info for Vikings ...
[06:55:26] [DB]::DB: Getting download info for Vikings from the DB
[06:55:26] [DB]::MAIN: nzbtomedia.db: SELECT * FROM downloads WHERE input_name=? AND status=? with args ['Vikings', 0]
[06:55:26] [INFO]::MAIN: Unable to locate download info for Vikings, continuing to try and process this release ...
[06:55:26] [DEBUG]::MAIN: Received Directory: /volume1/downloads/tv/Vikings | Name: Vikings | Category: tv
[06:55:26] [DEBUG]::MAIN: SEARCH: Found the Category: tv in directory structure
[06:55:26] [INFO]::MAIN: SEARCH: Found a unique directory Vikings in the category directory
[06:55:26] [DEBUG]::MAIN: Determined Directory: /volume1/downloads/tv/Vikings | Name: Vikings | Category: tv
[06:55:26] [INFO]::MAIN: Auto-detected SECTION:SickBeard
[06:55:26] [INFO]::MAIN: Output directory set to: /volume1/downloads/tv/Vikings
[06:55:26] [DEBUG]::MAIN: Scanning files in directory: /volume1/downloads/tv/Vikings
[06:55:26] [DEBUG]::MAIN: Found 1 files in /volume1/downloads/tv/Vikings
[06:55:26] [INFO]::COPYLINK: MEDIAFILE: [Vikings.S06E01.HDTV.x264-SVA[eztv].mkv]
[06:55:26] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/downloads/tv/Vikings]
[06:55:26] [INFO]::COPYLINK: TARGET FOLDER: [/volume1/downloads/tv/Vikings]
[06:55:26] [INFO]::COPYLINK: SOURCE AND TARGET files are the same, skipping ...
[06:55:26] [DEBUG]::MAIN: Checking for archives to extract in directory: /volume1/downloads/tv/Vikings
[06:55:26] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/downloads/tv/Vikings
[06:55:26] [DEBUG]::MAIN: Checking for empty folders in:/volume1/downloads/tv/Vikings
[06:55:26] [INFO]::MAIN: Found 1 media files in /volume1/downloads/tv/Vikings
[06:55:26] [INFO]::MAIN: Calling SickBeard:tv to post-process:Vikings
[06:55:26] [INFO]::MAIN: Changing file mode of /volume1/downloads/tv/Vikings to 0o777
[06:55:26] [DEBUG]::SERVER: Attempting to connect to server at http://localhost:8083
[06:55:33] [DEBUG]::SERVER: Server responded at http://localhost:8083
[06:55:33] [INFO]::MAIN: SickBeard:tv fork set to SickChill
[06:55:33] [DEBUG]::MAIN: calling command: /usr/local/ffmpeg/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /volume1/@appstore/nzbToMedia/tests/test.mp4
[06:55:34] [DEBUG]::MAIN: calling command: /usr/local/ffmpeg/bin/ffprobe -v quiet -print_format json -show_format -show_streams /volume1/@appstore/nzbToMedia/tests/test.mp4
[06:55:34] [ERROR]::TRANSCODER: Checking [/volume1/@appstore/nzbToMedia/tests/test.mp4] has failed
[06:55:34] [INFO]::TRANSCODER: DISABLED: ffprobe failed to analyse test file. Stopping corruption check.
[06:55:34] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request
[06:55:34] [DEBUG]::SICKBEARD: Opening URL: http://localhost:8083/api/ef667d1f180e5156340322b412173381/?cmd=postprocess with params: {'force': 1, 'failed': 0, 'quiet': 1, 'delete_on': 1, 'nzbName': 'Vikings', 'force_next': 1, 'proc_dir': '/volume1/downloads/tv/Vikings', 'process_method': 'move'}
[06:56:02] [DEBUG]::PLEX: Attempting to update Plex Library for category tv.
[06:56:02] [DEBUG]::PLEX: Plex Library has been refreshed.
[06:56:02] [INFO]::CLEANDIR: Directory /volume1/downloads/tv/Vikings has been processed and removed ...
[06:56:02] [INFO]::MAIN: Starting manual run for SickBeard:tv - Folder:/volume1/downloads/tv/DS_Store
[06:56:02] [INFO]::MAIN: Checking database for download info for DS_Store ...
[06:56:02] [DB]::DB: Getting download info for DS_Store from the DB
[06:56:02] [DB]::MAIN: nzbtomedia.db: SELECT * FROM downloads WHERE input_name=? AND status=? with args ['DS_Store', 0]
[06:56:02] [INFO]::MAIN: Unable to locate download info for DS_Store, continuing to try and process this release ...
[06:56:02] [DEBUG]::MAIN: Received Directory: /volume1/downloads/tv/DS_Store | Name: DS_Store | Category: tv
[06:56:02] [DEBUG]::MAIN: SEARCH: Found the Category: tv in directory structure
[06:56:02] [INFO]::MAIN: SEARCH: Found torrent file DS_Store in input directory directory /volume1/downloads/tv/DS_Store
[06:56:02] [INFO]::MAIN: SEARCH: Setting input_directory to /volume1/downloads/tv/DS_Store/DS_Store
[06:56:02] [DEBUG]::MAIN: Determined Directory: /volume1/downloads/tv/DS_Store/DS_Store | Name: DS_Store | Category: tv
[06:56:02] [INFO]::MAIN: Auto-detected SECTION:SickBeard
[06:56:02] [INFO]::MAIN: Output directory set to: /volume1/downloads/tv/DS_Store/DS_Store
[06:56:02] [DEBUG]::MAIN: Scanning files in directory: /volume1/downloads/tv/DS_Store/DS_Store
[06:56:02] [DEBUG]::MAIN: Found 1 files in /volume1/downloads/tv/DS_Store/DS_Store
[06:56:02] [INFO]::COPYLINK: MEDIAFILE: [DS_Store]
[06:56:02] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/downloads/tv/DS_Store]
[06:56:02] [INFO]::COPYLINK: TARGET FOLDER: [/volume1/downloads/tv/DS_Store/DS_Store]
[06:56:02] [INFO]::COPYLINK: SOURCE AND TARGET folders are the same, skipping ...
[06:56:02] [DEBUG]::MAIN: Checking for archives to extract in directory: /volume1/downloads/tv/DS_Store/DS_Store
[06:56:02] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/downloads/tv/DS_Store/DS_Store
[06:56:02] [WARNING]::MAIN: Found no media files in /volume1/downloads/tv/DS_Store/DS_Store
[06:56:02] [INFO]::MAIN: Calling SickBeard:tv to post-process:DS_Store
[06:56:02] [INFO]::MAIN: Changing file mode of /volume1/downloads/tv/DS_Store/DS_Store to 0o777
[06:56:02] [DEBUG]::SERVER: Attempting to connect to server at http://localhost:8083
[06:56:05] [DEBUG]::SERVER: Server responded at http://localhost:8083
[06:56:05] [INFO]::MAIN: SickBeard:tv fork already set to SickChill
[06:56:05] [WARNING]::SICKBEARD: No media files found in directory /volume1/downloads/tv/DS_Store to manually process.
[06:56:05] [DEBUG]::PLEX: Attempting to update Plex Library for category tv.
[06:56:05] [DEBUG]::PLEX: Plex Library has been refreshed.
[06:56:05] [INFO]::CLEANDIR: Doing Forceful Clean of /volume1/downloads/tv/DS_Store/DS_Store
[06:56:05] [INFO]::MAIN: Deleting /volume1/downloads/tv/DS_Store/DS_Store
[06:56:05] [ERROR]::MAIN: Unable to delete folder /volume1/downloads/tv/DS_Store/DS_Store
[06:56:05] [INFO]::MAIN: The ./TorrentToMedia.py script completed successfully.
clinton-hall commented 4 years ago

ok, can you try updating to latest nightly again and test? This should be fixed. Was always working with auto-fork, but not when using a defined fork with api.

As a note, when using api, you would ideally want to set the fork as SickChill-api and not SickChill as it does use some different parameters via api.... or again, using auto-form should be the safest.

MrCee commented 4 years ago

@clinton-hall thanks very much, this has fixed the issue.

I was looking at updating the wiki but might wait till this is in Master. Probably not a big deal but thought it was worth mentioning for the wiki later.....the fork specified seems to be case sensitive.

I have tested setting the fork in lower casefork = sickchill-api & fork = auto The log for both shows as SickBeard:tv fork set to custom and falls back to auto if you dont specify the fork in the exact case, but if you use case sensitive fork = SickChill-api , you see different results in the log.

fork = sickchill-api

[16:53:02] [INFO]::MAIN: Attempting to auto-detect tv fork
[16:53:03] [DEBUG]::MAIN: Removing excess parameters: ['delete_files', 'delete_on', 'dir', 'dirName', 'force', 'ignore_subs', 'is priority', 'proc_dir']
[16:53:03] [INFO]::MAIN: SickBeard:tv fork auto-detection found custom params {'is_priority': None, 'type': None, 'force_next': None, 'failed': None, 'path': None, 'process_method': None, 'cmd': 'postprocess', 'force_replace': None, 'return_data': None, 'delete': None}
[16:53:03] [INFO]::MAIN: SickBeard:tv fork set to custom

fork = SickChill-api

[16:59:27] [DEBUG]::SERVER: Server responded at http://localhost:8083
[16:59:27] [INFO]::MAIN: SickBeard:tv fork set to SickChill-api
[16:59:27] [WARNING]::SICKBEARD: No media files found in directory /volume1/downloads/tv/DS_Store to manually process.
[16:59:27] [DEBUG]::PLEX: Attempting to update Plex Library for category tv.
[16:59:27] [DEBUG]::PLEX: Plex Library has been refreshed.
clinton-hall commented 4 years ago

Merged to master, and wiki updated