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

Errors when running TorrentToMedia.py manually #1358

Closed jonskoglund closed 6 months ago

jonskoglund commented 6 years ago

Inside the movie and tv folder I have a movie and tv show that I want to move to my collection. To test if I have nzbToMedia set up the right way I do a manual run with TorrentToMedia.py. python TorrentToMedia.py "16b2463c1f1dab2ecfb38ac481f044d752349218" "TVSHOWNAME.S04E14.720p" "/volume1/shared/downloads/transmission/tv But I can't seem to fix the errors below. The weird thing is that the script is "working" on the movie directory (files) instead of the tvshow files. In the end this script doesn't do/move anything :-(. Any ideas or tips on how to fix this?

[22:17:26] [INFO]::MAIN: Loading config from [/volume1/shared/scripts/nzbToMedia/autoProcessMedia.cfg]
[22:17:26] [INFO]::ENVIRONMENT: USERNAME: root
[22:17:26] [INFO]::ENVIRONMENT: LANG: en_US.utf8
[22:17:26] [INFO]::ENVIRONMENT: TERM: xterm-256color
[22:17:26] [INFO]::ENVIRONMENT: SHELL: /bin/ash
[22:17:26] [INFO]::ENVIRONMENT: SUDO_COMMAND: /bin/ash
[22:17:26] [INFO]::ENVIRONMENT: SHLVL: 1
[22:17:26] [INFO]::ENVIRONMENT: HOME: /root
[22:17:26] [INFO]::ENVIRONMENT: SUDO_UID: 1024
[22:17:26] [INFO]::ENVIRONMENT: SUDO_GID: 100
[22:17:26] [INFO]::ENVIRONMENT: PATH: /sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin
[22:17:26] [INFO]::ENVIRONMENT: PGDATA: /var/services/pgsql
[22:17:26] [INFO]::ENVIRONMENT: PWD: /volume1/shared/scripts/nzbToMedia
[22:17:26] [INFO]::ENVIRONMENT: LOGNAME: root
[22:17:26] [INFO]::ENVIRONMENT: USER: root
[22:17:26] [INFO]::ENVIRONMENT: TERMINFO: /usr/share/terminfo
[22:17:26] [INFO]::ENVIRONMENT: MAIL: /var/mail/root
[22:17:26] [INFO]::ENVIRONMENT: LC_ALL: en_US.utf8
[22:17:26] [INFO]::ENVIRONMENT: SUDO_USER: admin
[22:17:26] [INFO]::ENVIRONMENT: PAGER: more
[22:17:26] [INFO]::ENVIRONMENT: OLDPWD: /volume1/shared/scripts
[22:17:26] [INFO]::ENVIRONMENT: _: /bin/python
[22:17:26] [INFO]::MAIN: Checking database structure...
[22:17:26] [DEBUG]::MAIN: Checking Initial Schema database upgrade
[22:17:26] [DEBUG]::MAIN: InitialSchema upgrade not required
[22:17:26] [INFO]::MAIN: Checking if source needs an update
[22:17:27] [DEBUG]::MAIN: cur_commit = 5d5d69ecdd5fe043be8a915ffa26e8427c9641c4 % (newest_commit)= 5d5d69ecdd5fe043be8a915ffa26e8427c9641c4, num_commits_behind = 0
[22:17:28] [INFO]::MAIN: No update needed
[22:17:28] [INFO]::MAIN: nzbToMedia Version:5d5d69ecdd5fe043be8a915ffa26e8427c9641c4 Branch:master (Linux 3.2.40)
[22:17:29] [WARNING]::MAIN: Failed to locate par2. Repair and rename using par files will not be possible!
[22:17:29] [WARNING]::MAIN: Failed to locate ffprobe. Video corruption detection disabled!
[22:17:29] [WARNING]::MAIN: Install ffmpeg with x264 support to enable this feature  ...
[22:17:30] [DEBUG]::MAIN: Connecting to transmission: http://localhost:9091
[22:17:31] [INFO]::MAIN: #########################################################
[22:17:31] [INFO]::MAIN: ## ..::[TorrentToMedia.py]::.. ##
[22:17:31] [INFO]::MAIN: #########################################################
[22:17:31] [DEBUG]::MAIN: Options passed into TorrentToMedia: ['TorrentToMedia.py', '16b2463c1f1dab2ecfb38ac481f044d752349218', 'TVSHOWNAME.S04E14.720p', '/volume1/shared/downloads/transmission/tv']
[22:17:31] [WARNING]::MAIN: Invalid number of arguments received from client, Switching to manual run mode ...
[22:17:31] [INFO]::MAIN: Searching /volume1/shared/downloads/transmission/movie for mediafiles to post-process ...
[22:17:31] [INFO]::MAIN: Starting manual run for CouchPotato:movie - Folder:/volume1/shared/downloads/transmission/movie/MOVIETITLE.2017.720p/
[22:17:31] [INFO]::MAIN: Checking database for download info for MOVIETITLE.2017.720p ...
[22:17:31] [INFO]::MAIN: Unable to locate download info for MOVIETITLE.2017.720p, continuing to try and process this release ...
[22:17:31] [DEBUG]::MAIN: Received Directory: /volume1/shared/downloads/transmission/movie/MOVIETITLE.2017.720p | Name: MOVIETITLE.2017.720p | Category: movie
[22:17:31] [DEBUG]::MAIN: SEARCH: Found the Category: movie in directory structure
[22:17:31] [INFO]::MAIN: SEARCH: Found a unique directory MOVIETITLE.2017.720p in the category directory
[22:17:31] [DEBUG]::MAIN: Determined Directory: /volume1/shared/downloads/transmission/movie/MOVIETITLE.2017.720p | Name: MOVIETITLE.2017.720p | Category: movie
[22:17:32] [INFO]::MAIN: Auto-detected SECTION:CouchPotato
[22:17:32] [INFO]::MAIN: Output directory set to: /volume1/shared/downloads/transmission/movie/MOVIETITLE.2017.720p
[22:17:32] [DEBUG]::MAIN: Scanning files in directory: /volume1/shared/downloads/transmission/movie/MOVIETITLE.2017.720p
[22:17:32] [DEBUG]::MAIN: Found 0 files in /volume1/shared/downloads/transmission/movie/MOVIETITLE.2017.720p
[22:17:32] [DEBUG]::MAIN: Checking for archives to extract in directory: /volume1/shared/downloads/transmission/movie/MOVIETITLE.2017.720p
[22:17:32] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/shared/downloads/transmission/movie/MOVIETITLE.2017.720p
[22:17:32] [DEBUG]::MAIN: Checking for empty folders in:/volume1/shared/downloads/transmission/movie/MOVIETITLE.2017.720p
[22:17:32] [DEBUG]::MAIN: Checking for empty folders in:/volume1/shared/downloads/transmission/movie/MOVIETITLE.2017.720p/Proof
[22:17:32] [DEBUG]::MAIN: Checking for empty folders in:/volume1/shared/downloads/transmission/movie/MOVIETITLE.2017.720p/Sample
[22:17:32] [DEBUG]::MAIN: Checking for empty folders in:/volume1/shared/downloads/transmission/movie/MOVIETITLE.2017.720p/Subs
[22:17:32] [WARNING]::MAIN: Found no media files in /volume1/shared/downloads/transmission/movie/MOVIETITLE.2017.720p
[22:17:32] [INFO]::MAIN: Calling CouchPotato:movie to post-process:MOVIETITLE.2017.720p
[22:17:32] [INFO]::MAIN: Attemping imdbID lookup for MOVIETITLE.2017.720p
[22:17:32] [INFO]::MAIN: Searching folder and file names for imdbID ...
[22:17:32] [INFO]::MAIN: Searching IMDB for imdbID ...
[22:17:33] [DEBUG]::MAIN: Opening URL: http://www.omdbapi.com
[22:17:33] [DEBUG]::SERVER: Attempting to connect to server at http://192.168.178.116:5050/api/143f4a70165042fbb98d0119fc2549dd/
[22:17:37] [DEBUG]::SERVER: Server responded at http://192.168.178.116:5050/api/143f4a70165042fbb98d0119fc2549dd/
[22:17:37] [DEBUG]::MAIN: Opening URL: http://192.168.178.116:5050/api/143f4a70165042fbb98d0119fc2549dd/media.list with PARAMS: {}
Traceback (most recent call last):
  File "TorrentToMedia.py", line 368, in <module>
    exit(main(sys.argv))
  File "TorrentToMedia.py", line 353, in main
    clientAgent)
  File "TorrentToMedia.py", line 236, in processTorrent
    status, clientAgent, inputHash, inputCategory)
  File "/volume1/shared/scripts/nzbToMedia/core/autoProcess/autoProcessMovie.py", line 176, in process
    release = self.get_release(baseURL, imdbid, download_id)
  File "/volume1/shared/scripts/nzbToMedia/core/autoProcess/autoProcessMovie.py", line 34, in get_release
    r = requests.get(url, params=params, verify=False, timeout=(30, 60))
  File "/volume1/shared/scripts/nzbToMedia/libs/requests/api.py", line 69, in get
    return request('get', url, params=params, **kwargs)
  File "/volume1/shared/scripts/nzbToMedia/libs/requests/api.py", line 50, in request
    response = session.request(method=method, url=url, **kwargs)
  File "/volume1/shared/scripts/nzbToMedia/libs/requests/sessions.py", line 469, in request
    resp = self.send(prep, **send_kwargs)
  File "/volume1/shared/scripts/nzbToMedia/libs/requests/sessions.py", line 577, in send
    r = adapter.send(request, **kwargs)
  File "/volume1/shared/scripts/nzbToMedia/libs/requests/adapters.py", line 431, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPConnectionPool(host='192.168.178.116', port=5050): Read timed out. (read timeout=60)
Exception TypeError: "'NoneType' object is not callable" in <bound method PosixProcess.__del__ of <core.nzbToMediaUtil.PosixProcess object at 0x2c153d90>> ignored

I have my directories set up like this:

+--downloads
   +--sabnzbd/
   |  +--incomplete/
   |  +--movie/
   |  +--tv/
   +--transmission/
      +--movie/
      |  +--MOVIETITLE.2017.720p/
      +--tv/
      |  +--TVSHOWNAME.S04E14.720p/
      +--incomplete/

This is my autoProcessMedia.cfg:

# nzbToMedia Configuration
# For more information, visit https://github.com/clinton-hall/nzbToMedia/wiki

[General]
    # Enable/Disable update notifications
    version_notify = 1
    # Enable/Disable automatic updates
    auto_update = 1
    # Set to the full path to the git executable
    git_path = /usr/local/git/bin/git
    # GitHUB user for repo
    git_user = ""
    # GitHUB branch for repo
    git_branch = master
    # Enable/Disable forceful cleaning of leftover files following postprocess
    force_clean = 1
    # Enable/Disable logging debug messages to nzbtomedia.log
    log_debug = 1
    # Enable/Disable logging database messages to nzbtomedia.log
    log_db = 0
    # Enable/Disable logging environment variables to debug nzbtomedia.log (helpful to track down errors calling external tools.)
    log_env = 1
    # Enable/Disable logging git output to debug nzbtomedia.log (helpful to track down update failures.)
    log_git = 1
    # Set to the directory where your ffmpeg/ffprobe executables are located
    ffmpeg_path = ""
    # Enable/Disable media file checking using ffprobe.
    check_media = 1
    # Enable/Disable a safety check to ensure we don't process all downloads in the default_downloadDirectories by mistake.
    safe_mode = 1
    # Turn this on to disable additional extraction attempts for failed downloads. Default = 0 will attempt to extract and verify if media is present.
    no_extract_failed = 0

[Posix]
    ### Process priority setting for External commands (Extractor and Transcoder) on Posix (Unix/Linux/OSX) systems.
    # Set the Niceness value for the nice command. These range from -20 (most favorable to the process) to 19 (least favorable to the process).
    niceness = 0
    # Set the ionice scheduling class. 0 for none, 1 for real time, 2 for best-effort, 3 for idle.
    ionice_class = 0
    # Set the ionice scheduling class data. This defines the class data, if the class accepts an argument. For real time and best-effort, 0-7 is valid data.
    ionice_classdata = 0

[CouchPotato]
    #### autoProcessing for Movies
    #### movie - category that gets called for post-processing with CPS
    [[movie]]
        enabled = 1
        apikey = 143f4a70165042fbb98d0119fc2549dd
        host = 192.168.178.116
        port = 5050
        ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
        ssl = 0
        web_root = ""
        # api key for www.omdbapi.com (used as alternative to imdb)
        omdbapikey = ""
        # Enable/Disable linking for Torrents
        Torrent_NoLink = 0
        keep_archive = 1
        method = renamer
        delete_failed = 1
        wait_for = 2
        extract = 1
        # Set this to minimum required size to consider a media file valid (in MB)
        minSize = 0
        # Enable/Disable deleting ignored files (samples and invalid media files)
        delete_ignored = 1
        ##### Enable if Couchpotato is on a remote server for this category
        remote_path = 0
        ##### Set to path where download client places completed downloads locally for this category
        watch_dir = ""
        ##### Set the recursive directory permissions to the following (0 to disable)
        chmodDirectory = 0

[Radarr]
    #### autoProcessing for Movies
    #### raCategory - category that gets called for post-processing with Radarr
    [[movie]]
        enabled = 0
        apikey = 0392ff2bfb8443ae8f28afd22e2a1eb5
        host = localhost
        port = 8310
        ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
        web_root = ""
        ssl = 0
        # api key for www.omdbapi.com (used as alternative to imdb)
        omdbapikey = ""
        delete_failed = 0
        # Enable/Disable linking for Torrents
        Torrent_NoLink = 0
        keep_archive = 1
        extract = 1
        nzbExtractionBy = Downloader
        wait_for = 6
        # Set this to minimum required size to consider a media file valid (in MB)
        minSize = 0
        # Enable/Disable deleting ignored files (samples and invalid media files)
        delete_ignored = 0
        ##### Enable if NzbDrone is on a remote server for this category
        remote_path = 0
        ##### Set to path where download client places completed downloads locally for this category
        watch_dir = ""

[SickBeard]
    #### autoProcessing for TV Series
    #### tv - category that gets called for post-processing with SB
    [[tv]]
        enabled = 0
        host = 192.168.178.116
        port = 8899
        apikey = ""
        username = ""
        password = ""
        ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
        web_root = ""
        ssl = 0
        fork = auto
        delete_failed = 0
        # Enable/Disable linking for Torrents
        Torrent_NoLink = 0
        keep_archive = 1
        process_method = move
        # force processing of already processed content when running a manual scan.
        force = 0
        # tell SickRage/Medusa to delete all source files after processing.
        delete_on = 0
        # tell Medusa to ignore check for associated subtitle check when postponing release
        ignore_subs = 0
        extract = 1
        nzbExtractionBy = Downloader
        # Set this to minimum required size to consider a media file valid (in MB)
        minSize = 0
        # Enable/Disable deleting ignored files (samples and invalid media files)
        delete_ignored = 1
        ##### Enable if SickBeard is on a remote server for this category
        remote_path = 0
        ##### Set to path where download client places completed downloads locally for this category
        watch_dir = ""
        ##### Set the recursive directory permissions to the following (0 to disable)
        chmodDirectory = 0

[NzbDrone]
    #### Formerly known as NzbDrone this is now Sonarr
    #### autoProcessing for TV Series
    #### ndCategory - category that gets called for post-processing with NzbDrone/Sonarr
    [[tv]]
        enabled = 1
        apikey = 12616bae0ae2427c8195f3f68da0e0a3
        host = 192.168.178.116
        port = 8989
        username = ""
        password = ""
        ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
        web_root = ""
        ssl = 0
        delete_failed = 0
        # Enable/Disable linking for Torrents
        Torrent_NoLink = 0
        keep_archive = 1
        extract = 1
        nzbExtractionBy = Downloader
        wait_for = 6
        # Set this to minimum required size to consider a media file valid (in MB)
        minSize = 0
        # Enable/Disable deleting ignored files (samples and invalid media files)
        delete_ignored = 1
        ##### Enable if NzbDrone is on a remote server for this category
        remote_path = 0
        ##### Set to path where download client places completed downloads locally for this category
        watch_dir = ""

[HeadPhones]
    #### autoProcessing for Music
    #### music - category that gets called for post-processing with HP
    [[music]]
        enabled = 0
        apikey = ""
        host = localhost
        port = 8181
        ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
        ssl = 0
        web_root = ""
        delete_failed = 0
        wait_for = 2
        # Enable/Disable linking for Torrents
        Torrent_NoLink = 0
        keep_archive = 1
        extract = 1
        # Set this to minimum required size to consider a media file valid (in MB)
        minSize = 0
        # Enable/Disable deleting ignored files (samples and invalid media files)
        delete_ignored = 0
        ##### Enable if HeadPhones is on a remote server for this category
        remote_path = 0
        ##### Set to path where download client places completed downloads locally for this category
        watch_dir = ""

[Lidarr]
    #### autoProcessing for Movies
    #### raCategory - category that gets called for post-processing with Radarr
    [[music]]
        enabled = 0
        apikey = ""
        host = localhost
        port = 8686
        ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
        web_root = ""
        ssl = 0
        delete_failed = 0
        # Enable/Disable linking for Torrents
        Torrent_NoLink = 0
        keep_archive = 1
        extract = 1
        nzbExtractionBy = Downloader
        wait_for = 6
        # Set this to minimum required size to consider a media file valid (in MB)
        minSize = 0
        # Enable/Disable deleting ignored files (samples and invalid media files)
        delete_ignored = 0
        ##### Enable if NzbDrone is on a remote server for this category
        remote_path = 0
        ##### Set to path where download client places completed downloads locally for this category
        watch_dir = ""

[Mylar]
    #### autoProcessing for Comics
    #### comics - category that gets called for post-processing with Mylar
    [[comics]]
        enabled = 0
        host = localhost
        port = 8090
        username = ""
        password = ""
        ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
        web_root = ""
        ssl = 0
        # Enable/Disable linking for Torrents
        Torrent_NoLink = 0
        keep_archive = 1
        extract = 1
        # Set this to minimum required size to consider a media file valid (in MB)
        minSize = 0
        # Enable/Disable deleting ignored files (samples and invalid media files)
        delete_ignored = 0
        ##### Enable if Mylar is on a remote server for this category
        remote_path = 0
        ##### Set to path where download client places completed downloads locally for this category
        watch_dir = ""

[Gamez]
    #### autoProcessing for Games
    #### games - category that gets called for post-processing with Gamez
    [[games]]
        enabled = 0
        apikey = ""
        host = localhost
        port = 8085
        ######
        library = Set to path where you want the processed games to be moved to.
        ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
        ssl = 0
        web_root = ""
        # Enable/Disable linking for Torrents
        Torrent_NoLink = 0
        keep_archive = 1
        extract = 1
        # Set this to minimum required size to consider a media file valid (in MB)
        minSize = 0
        # Enable/Disable deleting ignored files (samples and invalid media files)
        delete_ignored = 0
        ##### Enable if Gamez is on a remote server for this category
        remote_path = 0
        ##### Set to path where download client places completed downloads locally for this category
        watch_dir = ""

[Network]
    # Enter Mount points as LocalPath,RemotePath and separate each pair with '|'
    # e.g. MountPoints = /volume1/Public/,E:\|/volume2/share/,\\NAS\
    mount_points = ""

[Nzb]
    ###### clientAgent - Supported clients: sabnzbd, nzbget
    clientAgent = sabnzbd
    ###### SabNZBD (You must edit this if you're using nzbToMedia.py with SabNZBD)
    sabnzbd_host = 192.168.178.116
    sabnzbd_port = 8080
    sabnzbd_apikey = 72d0917d9c0f6947cdd4d0806793ddf9
    ###### Enter the default path to your default download directory (non-category downloads). this directory is protected by safe_mode.
    default_downloadDirectory = /volume1/shared/downloads/complete/sabnzbd

[Torrent]
    ###### clientAgent - Supported clients: utorrent, transmission, deluge, rtorrent, vuze, qbittorrent, other
    clientAgent = transmission
    ###### useLink - Set to hard for physical links, sym for symbolic links, move to move, move-sym to move and link back, and no to not use links (copy)
    useLink = move
    ###### outputDirectory - Default output directory (categories will be appended as sub directory to outputDirectory)
    outputDirectory = /volume1/shared/downloads/transmission/
    ###### Enter the default path to your default download directory (non-category downloads). this directory is protected by safe_mode.
    default_downloadDirectory = /volume1/shared/downloads/transmission/
    ###### Other categories/labels defined for your downloader. Does not include CouchPotato, SickBeard, HeadPhones, Mylar categories.
    categories = music_videos, pictures, software, manual
    ###### A list of categories that you don't want to be flattened (i.e preserve the directory structure when copying/linking.
    noFlatten = pictures, manual
    ###### uTorrent Hardlink solution (You must edit this if you're using TorrentToMedia.py with uTorrent)
    uTorrentWEBui = http://localhost:8090/gui/
    uTorrentUSR = your username
    uTorrentPWD = your password
    ###### Transmission (You must edit this if you're using TorrentToMedia.py with Transmission)
    TransmissionHost = localhost
    TransmissionPort = 9091
    TransmissionUSR = ""
    TransmissionPWD = ""
    #### Deluge (You must edit this if you're using TorrentToMedia.py with deluge. Note that the host/port is for the deluge daemon, not the webui)
    DelugeHost = 192.168.178.116
    DelugePort = 58846
    DelugeUSR = Delugebt01
    DelugePWD = 7slr4wmj92
    ###### qBittorrent (You must edit this if you're using TorrentToMedia.py with qBittorrent)
    qBittorrenHost = localhost
    qBittorrentPort = 8080
    qBittorrentUSR = your username
    qBittorrentPWD = your password
    ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
    deleteOriginal = 1
    chmodDirectory = 0
    resume = 1
    resumeOnFailure = 1

[Extensions]
    compressedExtensions = .zip, .rar, .7z, .gz, .bz, .tar, .arj, .1, .01, .001
    mediaExtensions = .mkv, .divx, .xvid, .mov, .wmv, .mp4, .mpg, .mpeg, .vob, .iso, .m4v, .ts
    audioExtensions = ""
    metaExtensions = .sub, .srt

[Plex]
    # Only enter these details if you want to update plex library after processing.
    # Do not enter these details if you send the plex notifications from Sickbeard/CouchPotato.
    plex_host = localhost
    plex_port = 32400
    plex_token = ""
    plex_ssl = 0
    # Enter Plex category to section mapping as Category,section and separate each pair with '|'
    # e.g. plex_sections = movie,3|tv,4
    plex_sections = ""

[Transcoder]
    # getsubs. enable to download subtitles.
    getSubs = 0
    # subLanguages. create a list of languages in the order you want them in your subtitles.
    subLanguages = eng, spa, fra
    # transcode. enable to use transcoder
    transcode = 0
    ###### duplicate =1 will create a new file. =0 will replace the original
    duplicate = 1
    # concat. joins cd1 cd2 etc into a single video.
    concat = 1
    # IgnoreExtensions is a comma-separated list of extensions that will not be transcoded.
    ignoreExtensions = .avi, .mkv, .mp4
    # outputFastStart. 1 will use -movflags + faststart. 0 will disable this from being used.
    outputFastStart = 0
    # outputQualityPercent. used as -q:a value. 0 will disable this from being used.
    outputQualityPercent = 0
    # outputVideoPath. Set path you want transcoded videos moved to. Leave blank to disable.
    outputVideoPath = ""
    # processOutput. 1 will send the outputVideoPath to SickBeard/CouchPotato. 0 will send original files.
    processOutput = 0
    # audioLanguage. set the 3 letter language code you want as your primary audio track.
    audioLanguage = eng
    # allAudioLanguages. 1 will keep all audio tracks (uses AudioCodec3) where available.
    allAudioLanguages = 0
    # allSubLanguages. 1 will keep all existing sub languages. 0 will discard those not in your list above.
    allSubLanguages = 0
    # embedSubs. 1 will embed external sub/srt subs into your video if this is supported.
    embedSubs = 1
    # burnInSubtitle. burns the default sub language into your video (needed for players that don't support subs)
    burnInSubtitle = 0
    # extractSubs. 1 will extract subs from the video file and save these as external srt files.
    extractSubs = 0
    # externalSubDir. set the directory where subs should be saved (if not the same directory as the video)
    externalSubDir = ""
    # hwAccel. 1 will set ffmpeg to enable hardware acceleration (this requires a recent ffmpeg)
    hwAccel = 0
    # generalOptions. Enter your additional ffmpeg options here with commas to separate each option/value (i.e replace spaces with commas).
    generalOptions = ""
    # outputDefault. Loads default configs for the selected device. The remaining options below are ignored.
    # If you want to use your own profile, leave this blank and set the remaining options below.
    # outputDefault profiles allowed: iPad, iPad-1080p, iPad-720p, Apple-TV2, iPod, iPhone, PS3, xbox, Roku-1080p, Roku-720p, Roku-480p, mkv, mp4-scene-release
    outputDefault = ""
    #### Define custom settings below.
    outputVideoExtension = .mp4
    outputVideoCodec = libx264
    VideoCodecAllow = ""
    outputVideoPreset = medium
    outputVideoResolution = 1920:1080
    outputVideoFramerate = 24
    outputVideoBitrate = 800000
    outputVideoCRF = 19
    outputVideoLevel = 3.1
    outputAudioCodec = ac3
    AudioCodecAllow = ""
    outputAudioChannels = 6
    outputAudioBitrate = 640k
    outputAudioTrack2Codec = libfaac
    AudioCodec2Allow = ""
    outputAudioTrack2Channels = 2
    outputAudioTrack2Bitrate = 128000
    outputAudioOtherCodec = libmp3lame
    AudioOtherCodecAllow = ""
    outputAudioOtherChannels = ""
    outputAudioOtherBitrate = 128000
    outputSubtitleCodec = ""

[WakeOnLan]
    ###### set wake = 1 to send WOL broadcast to the mac and test the server (e.g. xbmc) the host and port specified.
    wake = 0
    host = 192.168.1.37
    port = 80
    mac = 00:01:2e:2D:64:e1

[UserScript]
    #Use user_script for uncategorized downloads
    #Set the categories to use external script.
    #Use "UNCAT" to process non-category downloads, and "ALL" for all defined categories.
    [[UNCAT]]
        #Enable/Disable this subsection category
        enabled = 0
        Torrent_NoLink = 0
        keep_archive = 1
        extract = 1
        #Enable if you are sending commands to a remote server for this category
        remote_path = 0
        #What extension do you want to process? Specify all the extension, or use "ALL" to process all files.
        user_script_mediaExtensions = .mkv, .avi, .divx, .xvid, .mov, .wmv, .mp4, .mpg, .mpeg
        #Specify the path to your custom script. Use "None" if you wish to link this category, but NOT run any external script.
        user_script_path = /nzbToMedia/userscripts/script.sh
        #Specify the argument(s) passed to script, comma separated in order.
        #for example FP,FN,DN, TN, TL for file path (absolute file name with path), file name, absolute directory name (with path), Torrent Name, Torrent Label/Category.
        #So the result is /media/test/script/script.sh FP FN DN TN TL. Add other arguments as needed eg -f, -r
        user_script_param = FN
        #Set user_script_runOnce = 0 to run for each file, or 1 to only run once (presumably on the entire directory).
        user_script_runOnce = 0
        #Specify the successcodes returned by the user script as a comma separated list. Linux default is 0
        user_script_successCodes = 0
        #Clean after? Note that delay function is used to prevent possible mistake :) Delay is intended as seconds
        user_script_clean = 1
        delay = 120
        #Unique path (directory) created for every download. set 0 to disable.
        unique_path = 1
        ##### Set to path where download client places completed downloads locally for this category
        watch_dir = ""

[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).
    convert = 0

[passwords]
    # enter the full path to a text file containing passwords to be used for extraction attempts.
    # In the passwords file, every password should be on a new line
    PassWordFile = ""

[Custom]
    # enter a list (comma separated) of Group Tags you want removed from filenames to help with subtitle matching.
    # e.g remove_group = [rarbag],-NZBgeek
    # be careful if your "group" is a common "real" word. Please report if you have any group replacements that would fall in this category.
    remove_group = ""
clinton-hall commented 6 years ago

So it looks like it is failing with an error as it can't get the media list from CouchPotato. I'm not sure why this api request doesn't respond in time....

You can by-pass this to have it process the TV shows only by disabling CP in autoProcessMedia.cfg

[CouchPotato]
    #### autoProcessing for Movies
    #### movie - category that gets called for post-processing with CPS
    [[movie]]
        enabled = 0

Generally, to do a manual run, just execute python TorrentToMedia.py To pass in the variables as you have, this will only work by either exporting the variables as environment variables (for Transmission), or change the Torrent downloader to utorrent

[Torrent]
    ###### clientAgent - Supported clients: utorrent, transmission, deluge, rtorrent, vuze, qbittorrent, other
    clientAgent = utorrent

To be able to run this manually as per python TorrentToMedia.py "16b2463c1f1dab2ecfb38ac481f044d752349218" "TVSHOWNAME.S04E14.720p" "/volume1/shared/downloads/transmission/tv I guess that manual run Wiki page has not been updated for a LONG time.

jonskoglund commented 6 years ago

Ok. thank you for your feedback. I did disable couchpotato in autoProcessMedia.cfg and run manually with python TorrentToMedia.py. Now I get some Errors in the end. See below. There's only one file in the directory /volume1/shared/downloads/transmission/tv TVSHOWTITLE.S02E12.mkv. This file is duplicated and stored in a folder the name 'TVSHOW TITLE'. I'm not sure how to fix this. I did play with the output and watch directories in autoProcessMedia.cfg but to no avail.

[03:11:03] [INFO]::MAIN: Loading config from [/volume1/shared/scripts/nzbToMedia/autoProcessMedia.cfg]
[03:11:03] [INFO]::ENVIRONMENT: USERNAME: root
[03:11:03] [INFO]::ENVIRONMENT: LANG: en_US.utf8
[03:11:03] [INFO]::ENVIRONMENT: TERM: xterm-256color
[03:11:03] [INFO]::ENVIRONMENT: SHELL: /bin/ash
[03:11:03] [INFO]::ENVIRONMENT: SUDO_COMMAND: /bin/ash
[03:11:03] [INFO]::ENVIRONMENT: SHLVL: 1
[03:11:03] [INFO]::ENVIRONMENT: HOME: /root
[03:11:03] [INFO]::ENVIRONMENT: SUDO_UID: 1024
[03:11:03] [INFO]::ENVIRONMENT: SUDO_GID: 100
[03:11:03] [INFO]::ENVIRONMENT: PATH: /sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin
[03:11:03] [INFO]::ENVIRONMENT: PGDATA: /var/services/pgsql
[03:11:03] [INFO]::ENVIRONMENT: PWD: /volume1/shared/scripts/nzbToMedia
[03:11:03] [INFO]::ENVIRONMENT: LOGNAME: root
[03:11:03] [INFO]::ENVIRONMENT: USER: root
[03:11:03] [INFO]::ENVIRONMENT: TERMINFO: /usr/share/terminfo
[03:11:03] [INFO]::ENVIRONMENT: MAIL: /var/mail/root
[03:11:03] [INFO]::ENVIRONMENT: LC_ALL: en_US.utf8
[03:11:03] [INFO]::ENVIRONMENT: SUDO_USER: admin
[03:11:03] [INFO]::ENVIRONMENT: PAGER: more
[03:11:03] [INFO]::ENVIRONMENT: OLDPWD: /volume1/shared/scripts
[03:11:03] [INFO]::ENVIRONMENT: _: /bin/python
[03:11:03] [INFO]::MAIN: Checking database structure...
[03:11:03] [DEBUG]::MAIN: Checking Initial Schema database upgrade
[03:11:03] [DEBUG]::MAIN: InitialSchema upgrade not required
[03:11:03] [INFO]::MAIN: Checking if source needs an update
[03:11:06] [DEBUG]::MAIN: cur_commit = 5d5d69ecdd5fe043be8a915ffa26e8427c9641c4 % (newest_commit)= 5d5d69ecdd5fe043be8a915ffa26e8427c9641c4, num_commits_behind = 0
[03:11:06] [INFO]::MAIN: No update needed
[03:11:12] [INFO]::MAIN: nzbToMedia Version:5d5d69ecdd5fe043be8a915ffa26e8427c9641c4 Branch:master (Linux 3.2.40)
[03:11:14] [WARNING]::MAIN: Failed to locate par2. Repair and rename using par files will not be possible!
[03:11:18] [WARNING]::MAIN: Failed to locate ffprobe. Video corruption detection disabled!
[03:11:18] [WARNING]::MAIN: Install ffmpeg with x264 support to enable this feature  ...
[03:11:21] [DEBUG]::MAIN: Connecting to transmission: http://localhost:9091
[03:11:21] [INFO]::MAIN: #########################################################
[03:11:21] [INFO]::MAIN: ## ..::[TorrentToMedia.py]::.. ##
[03:11:21] [INFO]::MAIN: #########################################################
[03:11:21] [DEBUG]::MAIN: Options passed into TorrentToMedia: ['TorrentToMedia.py']
[03:11:21] [WARNING]::MAIN: Invalid number of arguments received from client, Switching to manual run mode ...
[03:11:22] [INFO]::MAIN: Searching /volume1/shared/downloads/transmission/tv for mediafiles to post-process ...
[03:11:22] [DEBUG]::MAIN: Found file TVSHOWTITLE.S02E12.mkv in root directory /volume1/shared/downloads/transmission/tv.
[03:11:30] [INFO]::COPYLINK: MEDIAFILE: [TVSHOWTITLE.S02E12.mkv]
[03:11:30] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/shared/downloads/transmission/tv]
[03:11:30] [INFO]::COPYLINK: TARGET FOLDER: [/volume1/shared/downloads/transmission/tv/The TVShow Title]
[03:11:30] [INFO]::COPYLINK: Hard linking SOURCE MEDIAFILE -> TARGET FOLDER
[03:11:30] [INFO]::MAIN: Starting manual run for NzbDrone:tv - Folder:/volume1/shared/downloads/transmission/tv/The TVShow Title
[03:11:30] [INFO]::MAIN: Checking database for download info for The TVShow Title ...
[03:11:31] [INFO]::MAIN: Unable to locate download info for The TVShow Title, continuing to try and process this release ...
[03:11:31] [DEBUG]::MAIN: Received Directory: /volume1/shared/downloads/transmission/tv/The TVShow Title | Name: The TVShow Title | Category: tv
[03:11:31] [DEBUG]::MAIN: SEARCH: Found the Category: tv in directory structure
[03:11:31] [INFO]::MAIN: SEARCH: Found a unique directory The TVShow Title in the category directory
[03:11:31] [DEBUG]::MAIN: Determined Directory: /volume1/shared/downloads/transmission/tv/The TVShow Title | Name: The TVShow Title | Category: tv
[03:11:31] [INFO]::MAIN: Auto-detected SECTION:NzbDrone
[03:11:31] [INFO]::MAIN: Output directory set to: /volume1/shared/downloads/transmission/tv/The TVShow Title
[03:11:31] [DEBUG]::MAIN: Scanning files in directory: /volume1/shared/downloads/transmission/tv/The TVShow Title
[03:11:31] [DEBUG]::MAIN: Found 1 files in /volume1/shared/downloads/transmission/tv/The TVShow Title
[03:11:31] [INFO]::COPYLINK: MEDIAFILE: [TVSHOWTITLE.S02E12.mkv]
[03:11:31] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/shared/downloads/transmission/tv/The TVShow Title]
[03:11:31] [INFO]::COPYLINK: TARGET FOLDER: [/volume1/shared/downloads/transmission/tv/The TVShow Title]
[03:11:31] [INFO]::COPYLINK: SOURCE AND TARGET files are the same, skipping ...
[03:11:31] [DEBUG]::MAIN: Checking for archives to extract in directory: /volume1/shared/downloads/transmission/tv/The TVShow Title
[03:11:31] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/shared/downloads/transmission/tv/The TVShow Title
[03:11:31] [DEBUG]::MAIN: Checking for empty folders in:/volume1/shared/downloads/transmission/tv/The TVShow Title
[03:11:31] [INFO]::MAIN: Found 1 media files in /volume1/shared/downloads/transmission/tv/The TVShow Title
[03:11:31] [INFO]::MAIN: Calling NzbDrone:tv to post-process:The TVShow Title
[03:11:31] [DEBUG]::SERVER: Attempting to connect to server at http://192.168.178.116:8989
[03:11:31] [ERROR]::SERVER: Server failed to respond at http://192.168.178.116:8989
[03:11:31] [ERROR]::NZBDRONE: Server did not respond. Exiting
[03:11:31] [ERROR]::MAIN: A problem was reported when trying to perform a manual run for NzbDrone:tv.
[03:11:31] [ERROR]::MAIN: A problem was reported in the TorrentToMedia.py script.
clinton-hall commented 6 years ago
[03:11:31] [DEBUG]::SERVER: Attempting to connect to server at http://192.168.178.116:8989
[03:11:31] [ERROR]::SERVER: Server failed to respond at http://192.168.178.116:8989
[03:11:31] [ERROR]::NZBDRONE: Server did not respond. Exiting

This indicates that NZBDrone does not respond to the API call. Was it running at the time of the manual run?

jonskoglund commented 6 years ago

Sorry to bother you again. I really appreciate your help on this. Can't seem to wrap my head around this script. It's not that hard to configure this wonderful (and did I already say smart and amazing?) piece of software. Almost there.... Somehow Sonarr stopped running. Restarting the package did remove the last 4 errors mentioned in the previous post. But it doesn't move anything. Just for your information. I still have the same directory as before:

+--volume1/
   +--shared/
   |  +--downloads/
   |     +--transmission/
   |        +--tv/
   |           +--TVTITLE1.S02E12.mkv
   |           +--TVTITLE2.S06E10/
   |           +--TVTITLE2.S06E10/TVTITLE2.S06E10.mkv
   +--tv/
      +--TVTITLE1/
      |  +--season 1/
      |  +--season etc./
      +--TVTITLE2/
         +--season 1/
         +--season etc./

The location where all tv files should go is: /volume1/shared/tv/Every tv show has its own folder.

#########################################################
[11:28:05] [INFO]::MAIN: ## ..::[TorrentToMedia.py]::.. ##
[11:28:05] [INFO]::MAIN: #########################################################
[11:28:05] [DEBUG]::MAIN: Options passed into TorrentToMedia: ['TorrentToMedia.py']
[11:28:05] [WARNING]::MAIN: Invalid number of arguments received from client, Switching to manual run mode ...
[11:28:05] [INFO]::MAIN: Searching /volume1/shared/downloads/transmission/tv for mediafiles to post-process ...
[11:28:05] [DEBUG]::MAIN: Found file TVTITLE1.S02E12.mkv in root directory /volume1/shared/downloads/transmission/tv.
[11:28:06] [INFO]::COPYLINK: MEDIAFILE: [TVTITLE1.S02E12.mkv]
[11:28:06] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/shared/downloads/transmission/tv]
[11:28:06] [INFO]::COPYLINK: TARGET FOLDER: [/volume1/shared/downloads/transmission/tv/Tv Title 1]
[11:28:06] [INFO]::COPYLINK: MEDIAFILE already exists in the TARGET folder, skipping ...
[11:28:06] [INFO]::MAIN: Starting manual run for NzbDrone:tv - Folder:/volume1/shared/downloads/transmission/tv/TVTITLE2.S06E10
[11:28:06] [INFO]::MAIN: Checking database for download info for TVTITLE2.S06E10 ...
[11:28:06] [INFO]::MAIN: Unable to locate download info for TVTITLE2.S06E10, continuing to try and process this release ...
[11:28:06] [DEBUG]::MAIN: Received Directory: /volume1/shared/downloads/transmission/tv/TVTITLE2.S06E10 | Name: TVTITLE2.S06E10 | Category: tv
[11:28:06] [DEBUG]::MAIN: SEARCH: Found the Category: tv in directory structure
[11:28:06] [INFO]::MAIN: SEARCH: Found a unique directory TVTITLE2.S06E10 in the category directory
[11:28:06] [DEBUG]::MAIN: Determined Directory: /volume1/shared/downloads/transmission/tv/TVTITLE2.S06E10 | Name: TVTITLE2.S06E10 | Category: tv
[11:28:06] [INFO]::MAIN: Auto-detected SECTION:NzbDrone
[11:28:06] [INFO]::MAIN: Output directory set to: /volume1/shared/downloads/transmission/tv/TVTITLE2.S06E10
[11:28:06] [DEBUG]::MAIN: Scanning files in directory: /volume1/shared/downloads/transmission/tv/TVTITLE2.S06E10
[11:28:06] [DEBUG]::MAIN: Found 1 files in /volume1/shared/downloads/transmission/tv/TVTITLE2.S06E10
[11:28:06] [INFO]::COPYLINK: MEDIAFILE: [TVTITLE2.S06E10.mkv]
[11:28:06] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/shared/downloads/transmission/tv/TVTITLE2.S06E10]
[11:28:06] [INFO]::COPYLINK: TARGET FOLDER: [/volume1/shared/downloads/transmission/tv/TVTITLE2.S06E10]
[11:28:06] [INFO]::COPYLINK: SOURCE AND TARGET files are the same, skipping ...
[11:28:06] [DEBUG]::MAIN: Checking for archives to extract in directory: /volume1/shared/downloads/transmission/tv/TVTITLE2.S06E10
[11:28:06] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/shared/downloads/transmission/tv/TVTITLE2.S06E10
[11:28:06] [DEBUG]::MAIN: Checking for empty folders in:/volume1/shared/downloads/transmission/tv/TVTITLE2.S06E10
[11:28:06] [INFO]::MAIN: Found 1 media files in /volume1/shared/downloads/transmission/tv/TVTITLE2.S06E10
[11:28:06] [INFO]::MAIN: Calling NzbDrone:tv to post-process:TVTITLE2.S06E10
[11:28:06] [DEBUG]::SERVER: Attempting to connect to server at http://192.168.178.116:8989
[11:28:07] [DEBUG]::SERVER: Server responded at http://192.168.178.116:8989
[11:28:07] [INFO]::MAIN: Attempting to verify tv fork
[11:28:09] [INFO]::MAIN: NzbDrone:tv fork set to default
[11:28:09] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/shared/downloads/transmission/tv/TVTITLE2.S06E10
[11:28:09] [DEBUG]::MAIN: Checking for empty folders in:/volume1/shared/downloads/transmission/tv/TVTITLE2.S06E10
[11:28:09] [POSTPROCESS]::NZBDRONE: SUCCESS: The download succeeded, sending a post-process request
[11:28:09] [DEBUG]::NZBDRONE: path: /volume1/shared/downloads/transmission/tv/TVTITLE2.S06E10
[11:28:09] [DEBUG]::NZBDRONE: Opening URL: http://192.168.178.116:8989/api/command with data: {"path": "/volume1/shared/downloads/transmission/tv/TVTITLE2.S06E10", "importMode": "Move", "name": "DownloadedEpisodesScan"}
[11:28:10] [DEBUG]::NZBDRONE: Scan started with id: 148755
[11:29:10] [DEBUG]::NZBDRONE: The Scan command return status: completed
[11:29:10] [DEBUG]::NZBDRONE: The Scan command has completed successfully. Renaming was successful.
[11:29:10] [INFO]::CLEANDIR: Doing Forceful Clean of /volume1/shared/downloads/transmission/tv/TVTITLE2.S06E10
[11:29:10] [INFO]::MAIN: Deleting /volume1/shared/downloads/transmission/tv/TVTITLE2.S06E10
[11:29:11] [INFO]::MAIN: Starting manual run for NzbDrone:tv - Folder:/volume1/shared/downloads/transmission/tv/Tv Title 1
[11:29:11] [INFO]::MAIN: Checking database for download info for Tv Title 1 ...
[11:29:11] [INFO]::MAIN: Unable to locate download info for Tv Title 1, continuing to try and process this release ...
[11:29:11] [DEBUG]::MAIN: Received Directory: /volume1/shared/downloads/transmission/tv/Tv Title 1 | Name: Tv Title 1 | Category: tv
[11:29:11] [DEBUG]::MAIN: SEARCH: Found the Category: tv in directory structure
[11:29:11] [INFO]::MAIN: SEARCH: Found a unique directory Tv Title 1 in the category directory
[11:29:11] [DEBUG]::MAIN: Determined Directory: /volume1/shared/downloads/transmission/tv/Tv Title 1 | Name: Tv Title 1 | Category: tv
[11:29:11] [INFO]::MAIN: Auto-detected SECTION:NzbDrone
[11:29:11] [INFO]::MAIN: Output directory set to: /volume1/shared/downloads/transmission/tv/Tv Title 1
[11:29:11] [DEBUG]::MAIN: Scanning files in directory: /volume1/shared/downloads/transmission/tv/Tv Title 1
[11:29:11] [DEBUG]::MAIN: Found 1 files in /volume1/shared/downloads/transmission/tv/Tv Title 1
[11:29:11] [INFO]::COPYLINK: MEDIAFILE: [TVTITLE1.S02E12.mkv]
[11:29:11] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/shared/downloads/transmission/tv/Tv Title 1]
[11:29:11] [INFO]::COPYLINK: TARGET FOLDER: [/volume1/shared/downloads/transmission/tv/Tv Title 1]
[11:29:11] [INFO]::COPYLINK: SOURCE AND TARGET files are the same, skipping ...
[11:29:11] [DEBUG]::MAIN: Checking for archives to extract in directory: /volume1/shared/downloads/transmission/tv/Tv Title 1
[11:29:11] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/shared/downloads/transmission/tv/Tv Title 1
[11:29:11] [DEBUG]::MAIN: Checking for empty folders in:/volume1/shared/downloads/transmission/tv/Tv Title 1
[11:29:11] [INFO]::MAIN: Found 1 media files in /volume1/shared/downloads/transmission/tv/Tv Title 1
[11:29:11] [INFO]::MAIN: Calling NzbDrone:tv to post-process:Tv Title 1
[11:29:11] [DEBUG]::SERVER: Attempting to connect to server at http://192.168.178.116:8989
[11:29:11] [DEBUG]::SERVER: Server responded at http://192.168.178.116:8989
[11:29:11] [INFO]::MAIN: Attempting to verify tv fork
[11:29:12] [INFO]::MAIN: NzbDrone:tv fork set to default
[11:29:12] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/shared/downloads/transmission/tv/Tv Title 1
[11:29:12] [DEBUG]::MAIN: Checking for empty folders in:/volume1/shared/downloads/transmission/tv/Tv Title 1
[11:29:12] [POSTPROCESS]::NZBDRONE: SUCCESS: The download succeeded, sending a post-process request
[11:29:12] [DEBUG]::NZBDRONE: path: /volume1/shared/downloads/transmission/tv/Tv Title 1
[11:29:12] [DEBUG]::NZBDRONE: Opening URL: http://192.168.178.116:8989/api/command with data: {"path": "/volume1/shared/downloads/transmission/tv/Tv Title 1", "importMode": "Move", "name": "DownloadedEpisodesScan"}
[11:29:12] [DEBUG]::NZBDRONE: Scan started with id: 148758
[11:30:13] [DEBUG]::NZBDRONE: The Scan command return status: completed
[11:30:13] [DEBUG]::NZBDRONE: The Scan command has completed successfully. Renaming was successful.
[11:30:13] [INFO]::CLEANDIR: Doing Forceful Clean of /volume1/shared/downloads/transmission/tv/Tv Title 1
[11:30:13] [INFO]::MAIN: Deleting /volume1/shared/downloads/transmission/tv/Tv Title 1
[11:30:13] [INFO]::MAIN: Starting manual run for NzbDrone:tv - Folder:/volume1/shared/downloads/transmission/tv/TVTITLE1.S02E12
[11:30:13] [INFO]::MAIN: Checking database for download info for TVTITLE1.S02E12 ...
[11:30:13] [INFO]::MAIN: Unable to locate download info for TVTITLE1.S02E12, continuing to try and process this release ...
[11:30:13] [DEBUG]::MAIN: Received Directory: /volume1/shared/downloads/transmission/tv/TVTITLE1.S02E12 | Name: TVTITLE1.S02E12 | Category: tv
[11:30:13] [DEBUG]::MAIN: SEARCH: Found the Category: tv in directory structure
[11:30:13] [INFO]::MAIN: SEARCH: Found a unique directory TVTITLE1.S02E12 in the category directory
[11:30:13] [DEBUG]::MAIN: Determined Directory: /volume1/shared/downloads/transmission/tv/TVTITLE1.S02E12 | Name: TVTITLE1.S02E12 | Category: tv
[11:30:13] [INFO]::MAIN: Auto-detected SECTION:NzbDrone
[11:30:13] [INFO]::MAIN: Output directory set to: /volume1/shared/downloads/transmission/tv/TVTITLE1.S02E12
[11:30:13] [DEBUG]::MAIN: Scanning files in directory: /volume1/shared/downloads/transmission/tv/TVTITLE1.S02E12
[11:30:13] [DEBUG]::MAIN: Found 1 files in /volume1/shared/downloads/transmission/tv/TVTITLE1.S02E12
[11:30:13] [INFO]::COPYLINK: MEDIAFILE: [TVTITLE1.S02E12.mkv]
[11:30:13] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/shared/downloads/transmission/tv/TVTITLE1.S02E12]
[11:30:13] [INFO]::COPYLINK: TARGET FOLDER: [/volume1/shared/downloads/transmission/tv/TVTITLE1.S02E12]
[11:30:13] [INFO]::COPYLINK: SOURCE AND TARGET files are the same, skipping ...
[11:30:13] [DEBUG]::MAIN: Checking for archives to extract in directory: /volume1/shared/downloads/transmission/tv/TVTITLE1.S02E12
[11:30:13] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/shared/downloads/transmission/tv/TVTITLE1.S02E12
[11:30:13] [DEBUG]::MAIN: Checking for empty folders in:/volume1/shared/downloads/transmission/tv/TVTITLE1.S02E12
[11:30:13] [INFO]::MAIN: Found 1 media files in /volume1/shared/downloads/transmission/tv/TVTITLE1.S02E12
[11:30:13] [INFO]::MAIN: Calling NzbDrone:tv to post-process:TVTITLE1.S02E12
[11:30:13] [DEBUG]::SERVER: Attempting to connect to server at http://192.168.178.116:8989
[11:30:13] [DEBUG]::SERVER: Server responded at http://192.168.178.116:8989
[11:30:13] [INFO]::MAIN: Attempting to verify tv fork
[11:30:13] [INFO]::MAIN: NzbDrone:tv fork set to default
[11:30:14] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/shared/downloads/transmission/tv/TVTITLE1.S02E12
[11:30:14] [DEBUG]::MAIN: Checking for empty folders in:/volume1/shared/downloads/transmission/tv/TVTITLE1.S02E12
[11:30:14] [POSTPROCESS]::NZBDRONE: SUCCESS: The download succeeded, sending a post-process request
[11:30:14] [DEBUG]::NZBDRONE: path: /volume1/shared/downloads/transmission/tv/TVTITLE1.S02E12
[11:30:14] [DEBUG]::NZBDRONE: Opening URL: http://192.168.178.116:8989/api/command with data: {"path": "/volume1/shared/downloads/transmission/tv/TVTITLE1.S02E12", "importMode": "Move", "name": "DownloadedEpisodesScan"}
[11:30:14] [DEBUG]::NZBDRONE: Scan started with id: 148760
[11:31:15] [DEBUG]::NZBDRONE: The Scan command return status: completed
[11:31:15] [DEBUG]::NZBDRONE: The Scan command has completed successfully. Renaming was successful.
[11:31:15] [INFO]::CLEANDIR: Doing Forceful Clean of /volume1/shared/downloads/transmission/tv/TVTITLE1.S02E12
[11:31:15] [INFO]::MAIN: Deleting /volume1/shared/downloads/transmission/tv/TVTITLE1.S02E12
[11:31:15] [INFO]::MAIN: The TorrentToMedia.py script completed successfully.

Does it have something to do with the source and target folder?:

[11:28:06] [INFO]::COPYLINK: SOURCE FOLDER: [/volume1/shared/downloads/transmission/tv/TVTITLE2.S06E10]
[11:28:06] [INFO]::COPYLINK: TARGET FOLDER: [/volume1/shared/downloads/transmission/tv/TVTITLE2.S06E10]
[11:28:06] [INFO]::COPYLINK: SOURCE AND TARGET files are the same, skipping ...
clinton-hall commented 6 years ago

So as far as the script goes, it appears to have processed everything. The final move from /volume1/shared/downloads/transmission/tv/TVTITLE1.S02E12 to /volume1/tv/TVTITLE1/ should be done by Sonarr. Look at the Sonarr logs at 11:31:14 to see why this didn't move the files.

The SOURCE AND TARGET files are the same, skipping .. is a result of having the sameoutputDirectory as your input. i.e. /volume1/shared/downloads/transmission

The only reason to change this is if you want to have an interim directory to link/extract to. e.g. Transmission would download to /volume1/shared/downloads/transmission outputDirectory = /volume1/shared/downloads/processed would see the files hard-linked to /volume1/shared/downloads/processed/tv/TVTITLE2/ Then these would be passed to Sonarr to then move the files to /volume1/tv/TVTITLE2/

The whole idea here is to have Sonarr only see the processed directory and therefore not interfere with the Torrent files and allow Transmission to continue seeding etc. If you are not worried about continued seeding, this is not an issue.

jonskoglund commented 6 years ago

It looks like I have it up and running now. Sonarr gave me this error. Import failed, path does not exist or is not accessible by Sonarr After changing folder permissions and reinstalling Sonarr it looks like it's working now. I will keep an eye on the download folders this week to see if it's doing ok. I will report back if I encounter any problems. Thank you so far for all the support. 👍