Closed saltfax closed 4 months ago
was this from a manual run? When run as a triggered event from The Torrent Client, this should pause the seeding which removes a file lock. If you pause all seeding downloads in the torrent client, then run the script, do these errors disappear?
It happends both from manual and on torrent completion. No difference with all torrents paused or manual run from a watchdir totally unrelated to transmission. User running transmission and the TorrentToMedia.py script has the appropriate permissions too. Even tried with 777. No difference.
Also I cant get the script to accept my arguments when doing a manual run. Instead it does ahead to process the whole watchdir all over again. Extracting everything all over. It does however ignore to copy files that is existing in the output directory.
[11:11:46] [WARNING]::MAIN: Invalid number of arguments received from client, Switching to manual run mode ...
The command looks like this: python2 TorrentToMedia.py '/media/packed/auto' 'The.Walking.Dead.S03E12.HDTV.x264-EVOLVE' '5382d2e71a6eb59e4e16a9530c2f38f6e22771f0'
Also tried to mimic the arguments that transmissions sends when it triggers automatically. Same result.
Transmission doesn't pass the arguments by command line. It exports the arguments as Environment variables.
export TR_TORRENT_DIR="/media/packed/auto"
export TR_TORRENT_NAME="The.Walking.Dead.S03E12.HDTV.x264-EVOLVE"
export TR_TORRENT_HASH="5382d2e71a6eb59e4e16a9530c2f38f6e22771f0'"
export TR_TORRENT_ID="<enter torrent ID here>"
python2 TorrentToMedia.py
just make sure you enter the correct torrent dir, name, hash, and ID from Transmission in the export fields.
Ah! That makes sense. Thanks for clearing that up.
Hey!
I got a problem with the TorrentToMedia.py that it spits out an error:
[23:45:35] [ERROR]::MAIN: Failed to link: /media/packed/auto/Homeland.S07E07.WEB.H264-DEFLATE/homeland.s07e07.web.h264-deflate.nfo to /media/unpacked/auto/Homeland.S07E07.WEB.H264-DEFLATE/homeland.s07e07.web.h264-deflate.nfo
This happends when `[Torrent] useLink =' either no, move or move-sym. My guess would be its related to the core.rmReadonly function. Not sure if that as something to do with the fact I'm running this on Freenas and ZFS.
Here comes a longer log and my config:
Log
[23:53:21] [INFO]::MAIN: Found 1 media files in /media/unpacked/auto/Homeland.S07E12.WEB.H264-DEFLATE [23:53:21] [INFO]::MAIN: Calling SickBeard:auto to post-process:Homeland.S07E12.WEB.H264-DEFLATE [23:53:21] [DEBUG]::SERVER: Attempting to connect to server at http://192.168.0.10:8081 [23:53:21] [DEBUG]::SERVER: Server responded at http://192.168.0.10:8081 [23:53:21] [INFO]::MAIN: SickBeard:auto fork set to Medusa [23:53:21] [INFO]::MAIN: FLATTEN: Flattening directory: /media/unpacked/auto/Homeland.S07E12.WEB.H264-DEFLATE [23:53:21] [DEBUG]::MAIN: Checking for empty folders in:/media/unpacked/auto/Homeland.S07E12.WEB.H264-DEFLATE [23:53:21] [DEBUG]::MAIN: calling command: /usr/local/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /usr/local/nzbToMedia/tests/test.mp4 [23:53:21] [INFO]::TRANSCODER: Checking [Homeland.S07E12.WEB.H264-DEFLATE.mkv] for corruption, please stand by ... [23:53:21] [DEBUG]::MAIN: calling command: /usr/local/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /media/unpacked/auto/Homeland.S07E12.WEB.H264-DEFLATE/Homeland.S07E12.WEB.H264-DEFLATE.mkv [23:53:21] [INFO]::TRANSCODER: SUCCESS: [Homeland.S07E12.WEB.H264-DEFLATE.mkv] has no corruption. [23:53:21] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request [23:53:21] [DEBUG]::SICKBEARD: Opening URL: http://192.168.0.10:8081/api/fab75eaad838228a5ace4d708ae581fc/?cmd=postprocess with params: {'nzbName': 'Homeland.S07E12.WEB.H264-DEFLATE', 'quiet': 1, 'failed': 0, 'proc_dir': '/media/unpacked/auto/Homeland.S07E12.WEB.H264-DEFLATE'} [23:53:22] [INFO]::CLEANDIRS: Directory /media/unpacked/auto/Homeland.S07E12.WEB.H264-DEFLATE still contains 2 unprocessed file(s), skipping ... [23:53:22] [INFO]::MAIN: Starting manual run for SickBeard:auto - Folder:/media/packed/auto/Homeland.S06E01.HDTV.x264-BATV [23:53:22] [INFO]::MAIN: Checking database for download info for Homeland.S06E01.HDTV.x264-BATV ... [23:53:22] [DB]::DB: Getting download info for Homeland.S06E01.HDTV.x264-BATV from the DB [23:53:22] [DB]::MAIN: nzbtomedia.db: SELECT * FROM downloads WHERE input_name=? AND status=? with args [u'Homeland.S06E01.HDTV.x264-BATV', 0] [23:53:22] [INFO]::MAIN: Unable to locate download info for Homeland.S06E01.HDTV.x264-BATV, continuing to try and process this release ... [23:53:22] [DEBUG]::MAIN: Received Directory: /media/packed/auto/Homeland.S06E01.HDTV.x264-BATV | Name: Homeland.S06E01.HDTV.x264-BATV | Category: auto [23:53:22] [DEBUG]::MAIN: SEARCH: Found the Category: auto in directory structure [23:53:22] [INFO]::MAIN: SEARCH: Found a unique directory Homeland.S06E01.HDTV.x264-BATV in the category directory [23:53:22] [DEBUG]::MAIN: Determined Directory: /media/packed/auto/Homeland.S06E01.HDTV.x264-BATV | Name: Homeland.S06E01.HDTV.x264-BATV | Category: auto [23:53:22] [INFO]::MAIN: Auto-detected SECTION:SickBeard [23:53:22] [INFO]::MAIN: Output directory set to: /media/unpacked/auto/Homeland.S06E01.HDTV.x264-BATV [23:53:22] [DEBUG]::MAIN: Scanning files in directory: /media/packed/auto/Homeland.S06E01.HDTV.x264-BATV [23:53:22] [DEBUG]::MAIN: Found 1 files in /media/packed/auto/Homeland.S06E01.HDTV.x264-BATV [23:53:22] [INFO]::COPYLINK: MEDIAFILE: [homeland.s06e01.hdtv.x264-batv.nfo] [23:53:22] [INFO]::COPYLINK: SOURCE FOLDER: [/media/packed/auto/Homeland.S06E01.HDTV.x264-BATV] [23:53:22] [INFO]::COPYLINK: TARGET FOLDER: [/media/unpacked/auto/Homeland.S06E01.HDTV.x264-BATV] [23:53:22] [INFO]::COPYLINK: Copying SOURCE MEDIAFILE -> TARGET FOLDER [23:53:22] [ERROR]::MAIN: Failed to link: /media/packed/auto/Homeland.S06E01.HDTV.x264-BATV/homeland.s06e01.hdtv.x264-batv.nfo to /media/unpacked/auto/Homeland.S06E01.HDTV.x264-BATV/homeland.s06e01.hdtv.x264-batv.nfo [23:53:22] [DEBUG]::MAIN: Checking for archives to extract in directory: /media/packed/auto/Homeland.S06E01.HDTV.x264-BATV [23:53:22] [DEBUG]::MAIN: EXTRACTOR: Unknown file type: .r05 [23:53:22] [DEBUG]::MAIN: EXTRACTOR: Unknown file type: .r16 [23:53:22] [DEBUG]::MAIN: EXTRACTOR: Unknown file type: .r11 [23:53:22] [DEBUG]::MAIN: EXTRACTOR: Unknown file type: .r08 [23:53:22] [DEBUG]::MAIN: EXTRACTOR: Unknown file type: .r02 [23:53:22] [DEBUG]::MAIN: EXTRACTOR: Unknown file type: .r06 [23:53:23] [DEBUG]::MAIN: EXTRACTOR: Unknown file type: .r15 [23:53:23] [DEBUG]::MAIN: EXTRACTOR: Unknown file type: .r20 [23:53:23] [DEBUG]::MAIN: EXTRACTOR: Unknown file type: .r18 [23:53:23] [DEBUG]::MAIN: EXTRACTOR: Unknown file type: .r12 [23:53:23] [DEBUG]::MAIN: EXTRACTOR: Unknown file type: .r01 [23:53:23] [DEBUG]::MAIN: EXTRACTOR: Unknown file type: .r03 [23:53:23] [DEBUG]::MAIN: EXTRACTOR: Unknown file type: .r09 [23:53:23] [DEBUG]::MAIN: EXTRACTOR: Unknown file type: .r10 [23:53:23] [DEBUG]::MAIN: EXTRACTOR: Unknown file type: .r17 [23:53:23] [INFO]::MAIN: Extracting /media/packed/auto/Homeland.S06E01.HDTV.x264-BATV/homeland.s06e01.hdtv.x264-batv.rar to /media/unpacked/auto/Homeland.S06E01.HDTV.x264-BATV [23:53:23] [DEBUG]::MAIN: Extracting ['unrar', 'x', '-o+', '-y'] /media/packed/auto/Homeland.S06E01.HDTV.x264-BATV/homeland.s06e01.hdtv.x264-batv.rar /media/unpacked/auto/Homeland.S06E01.HDTV.x264-BATV [23:53:34] [INFO]::MAIN: EXTRACTOR: Extraction was successful for /media/packed/auto/Homeland.S06E01.HDTV.x264-BATV/homeland.s06e01.hdtv.x264-batv.rar to /media/unpacked/auto/Homeland.S06E01.HDTV.x264-BATV [23:53:37] [INFO]::MAIN: FLATTEN: Flattening directory: /media/unpacked/auto/Homeland.S06E01.HDTV.x264-BATV [23:53:37] [DEBUG]::MAIN: Checking for empty folders in:/media/unpacked/auto/Homeland.S06E01.HDTV.x264-BATV [23:53:37] [INFO]::MAIN: Found 1 media files in /media/unpacked/auto/Homeland.S06E01.HDTV.x264-BATV [23:53:37] [INFO]::MAIN: Calling SickBeard:auto to post-process:Homeland.S06E01.HDTV.x264-BATV [23:53:37] [DEBUG]::SERVER: Attempting to connect to server at http://192.168.0.10:8081 [23:53:37] [DEBUG]::SERVER: Server responded at http://192.168.0.10:8081 [23:53:37] [INFO]::MAIN: SickBeard:auto fork set to Medusa [23:53:37] [INFO]::MAIN: FLATTEN: Flattening directory: /media/unpacked/auto/Homeland.S06E01.HDTV.x264-BATV [23:53:37] [DEBUG]::MAIN: Checking for empty folders in:/media/unpacked/auto/Homeland.S06E01.HDTV.x264-BATV [23:53:37] [DEBUG]::MAIN: calling command: /usr/local/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /usr/local/nzbToMedia/tests/test.mp4 [23:53:37] [INFO]::TRANSCODER: Checking [Homeland.S06E01.HDTV.x264-BATV.mkv] for corruption, please stand by ... [23:53:37] [DEBUG]::MAIN: calling command: /usr/local/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /media/unpacked/auto/Homeland.S06E01.HDTV.x264-BATV/Homeland.S06E01.HDTV.x264-BATV.mkv [23:53:37] [INFO]::TRANSCODER: SUCCESS: [Homeland.S06E01.HDTV.x264-BATV.mkv] has no corruption. [23:53:37] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request [23:53:37] [DEBUG]::SICKBEARD: Opening URL: http://192.168.0.10:8081/api/fab75eaad838228a5ace4d708ae581fc/?cmd=postprocess with params: {'nzbName': 'Homeland.S06E01.HDTV.x264-BATV', 'quiet': 1, 'failed': 0, 'proc_dir': '/media/unpacked/auto/Homeland.S06E01.HDTV.x264-BATV'} [23:53:39] [INFO]::CLEANDIRS: Directory /media/unpacked/auto/Homeland.S06E01.HDTV.x264-BATV still contains 2 unprocessed file(s), skipping ...
Config
` nzbToMedia Configuration For more information, visit https://github.com/clinton-hall/nzbToMedia/wiki
[General]
Enable/Disable update notifications
[Posix]
Process priority setting for External commands (Extractor and Transcoder) on Posix (Unix/Linux/OSX) systems.
[CouchPotato]
autoProcessing for Movies
[Radarr]
autoProcessing for Movies
[SickBeard]
autoProcessing for TV Series
[NzbDrone]
Formerly known as NzbDrone this is now Sonarr
[HeadPhones]
autoProcessing for Music
[Lidarr]
autoProcessing for Movies
[Mylar]
autoProcessing for Comics
[Gamez]
autoProcessing for Games
[Network]
Enter Mount points as LocalPath,RemotePath and separate each pair with '|'
[Nzb]
clientAgent - Supported clients: sabnzbd, nzbget
[Torrent]
clientAgent - Supported clients: utorrent, transmission, deluge, rtorrent, vuze, qbittorrent, other
[Extensions] compressedExtensions = .zip, .rar, .7z, .gz, .bz, .tar, .arj, .1, .01, .001 mediaExtensions = .mkv, .avi, .divx, .xvid, .mov, .wmv, .mp4, .mpg, .mpeg, .vob, .iso, .m4v, .ts audioExtensions = .mp3, .aac, .ogg, .ape, .m4a, .asf, .wma, .flac metaExtensions = .nfo, .sub, .srt, .jpg, .gif
[Plex]
Only enter these details if you want to update plex library after processing.
[Transcoder]
getsubs. enable to download subtitles.
[WakeOnLan]
set wake = 1 to send WOL broadcast to the mac and test the server (e.g. xbmc) the host and port specified.
[UserScript]
Use user_script for uncategorized downloads
[ASCII]
Set convert =1 if you want to convert any "foreign" characters to ASCII (UTF8) before passing to SB/CP etc. Default is disabled (0).
[passwords]
enter the full path to a text file containing passwords to be used for extraction attempts.
[Custom]
enter a list (comma separated) of Group Tags you want removed from filenames to help with subtitle matching.
`