clinton-hall / nzbToMedia

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

Transcode iso and Video_TS #545

Closed thesatman closed 9 years ago

thesatman commented 10 years ago

Sickbeard found a download. SABnzbd completed the download. The files were moved to the final folder for TV shows. All well,... except for this error:

name-tv-show S03 BDRip XviD-SAiNTS

       02:35:26|INFO    ====================

02:35:26|INFO nzbToMedia V9.2 02:35:26|INFO MAIN: Loading config from C:\Users\thesatman\nzbToMedia-win-v9.2\autoProcessMedia.cfg 02:35:26|INFO MAIN: Script triggered from SABnzbd 02:35:26|INFO MAIN: Calling Sick-Beard to post-process: name-tv-show.S03.BDRip.XviD-SAiNTS.nzb 02:35:26|INFO Loading config from C:\Users\thesatman\nzbToMedia-win-v9.2\autoProcessMedia.cfg 02:35:26|INFO FLATTEN: Flattening directory: W:\sabnzbd_complete\tv\name-tv-show S03 BDRip XviD-SAiNTS 02:35:26|INFO REMOVER: Removing empty folders in: W:\sabnzbd_complete\tv\name-tv-show S03 BDRip XviD-SAiNTS 02:35:26|INFO The download succeeded. Sending process request to SickBeard's default branch 02:35:26|INFO Waiting for 0.0 seconds to allow SB to process newly extracted files 02:40:28|ERROR Unable to open URL Traceback (most recent call last): File "c:\build\pyi.win32\nzbToMedia\out00-PYZ.pyz\autoProcess.autoProcessTV", line 208, in processEpisode File "c:\build\pyi.win32\nzbToMedia\out00-PYZ.pyz\autoProcess.autoProcessTV", line 33, in openit File "c:\build\pyi.win32\nzbToMedia\out00-PYZ.pyz\urllib", line 207, in open File "c:\build\pyi.win32\nzbToMedia\out00-PYZ.pyz\urllib", line 345, in open_http File "c:\build\pyi.win32\nzbToMedia\out00-PYZ.pyz\httplib", line 1102, in getreply File "c:\build\pyi.win32\nzbToMedia\out00-PYZ.pyz\httplib", line 1030, in getresponse File "c:\build\pyi.win32\nzbToMedia\out00-PYZ.pyz\httplib", line 407, in begin File "c:\build\pyi.win32\nzbToMedia\out00-PYZ.pyz\httplib", line 365, in _read_status File "c:\build\pyi.win32\nzbToMedia\out00-PYZ.pyz\socket", line 430, in readline IOError: [Errno socket error] timed out 02:40:28|INFO MAIN: A problem was reported in the autoProcess* script.

Any idea what is causing this?

thesatman commented 10 years ago

From my autoprocessmedia.cfg

[SickBeard] sbCategory = tv host = localhost port = 8081 username = password = web_root = ssl = 0 delay = 0 wait_for = 5 watch_dir = fork = default delete_failed = 0 nzbExtractionBy = Downloader Torrent_ForceLink = 1

thesatman commented 10 years ago

And this is the result when engaging a download with CouchPotato:

       13:48:19|INFO    ====================

13:48:19|INFO nzbToMedia V9.2 13:48:19|INFO MAIN: Loading config from C:\Users\thesatman\nzbToMedia-win-v9.2\autoProcessMedia.cfg 13:48:19|INFO MAIN: Script triggered from SABnzbd 13:48:19|INFO MAIN: Calling CouchPotatoServer to post-process: name-movie.2006.720p.EXTENDED.x264.cp(tt0382625).nzb 13:48:19|INFO Loading config from C:\Users\thesatman\nzbToMedia-win-v9.2\autoProcessMedia.cfg 13:48:19|INFO Found movie id tt0382625 in name 13:48:21|ERROR Unable to parse json data for movies Traceback (most recent call last): File "c:\build\pyi.win32\nzbToMedia\out00-PYZ.pyz\autoProcess.autoProcessMovie", line 71, in get_movie_info KeyError: 'id' 13:48:21|ERROR Could not parse database results to determine imdbid or movie id Traceback (most recent call last): File "c:\build\pyi.win32\nzbToMedia\out00-PYZ.pyz\autoProcess.autoProcessMovie", line 71, in get_movie_info KeyError: 'id' 13:48:21|INFO Waiting for 65.0 seconds to allow CPS to process newly extracted files 13:50:10|INFO CouchPotatoServer returned {u'success': True} 13:50:10|INFO renamer scan started on CouchPotatoServer for name-movie.2006.720p.EXTENDED.x264.cp(tt0382625).nzb 13:50:10|INFO MAIN: The autoProcess* script completed successfully.

From my autoprocessmedia.cfg

[CouchPotato] cpsCategory = film apikey = 123...my...key...456 host = localhost port = 5050 ssl = 0 web_root = delay = 65 method = renamer delete_failed = 0 wait_for = 5 remoteCPS = 0

CP log file:

08-28 13:50:06INFO[tato.core.plugins.renamer] Deleting folder: W:\sabnzbd_complete\film\movie-name 2006 720p EXTENDED x264 cp(tt0382625) 08-28 13:50:10INFO[hpotato.core.plugins.base] Opening url: get https://api.couchpota.to/search/movie+name+2006/?limit=1, data: [] 08-28 13:50:10INFO[hpotato.core.plugins.base] Opening url: get http://www.omdbapi.com/?y=2006&t=movie+name, data: [] 08-28 13:50:10INFO[ie.providers.info.omdbapi] Found: movie-name (2006) 08-28 13:50:10INFO[tato.core.plugins.scanner] Found 1 movies in the folder W:\Media Server content 3\movies\movie-name (2006) 08-28 13:50:10ERROR[31mException in callback None UNKNOWNUNKNOWNTraceback (most recent call last): File "C:\Users\Harry\AppData\Roaming\CouchPotato\application\appdata\CouchPotato-2.5.2.win32\libs\tornado\ioloop.py", line 758, in start KeyError: 1460

Result: SABnzbd OK, history updated, CP OK: moved from sab_complet/movie/ to Mediaserver3/movies/movie-name (2006)/

So all in all it looks like the job gets done, but with a few errors in the log files. I wonder what these errors mean.

clinton-hall commented 10 years ago

V9.2 is obsolete. Please update to the current version.

I'm not sure exactly what the issues are, but the Api calls have changed for CouchPotato and the way the URL calls and timeouts have changed in my current scripts.

thesatman commented 10 years ago

hmm... no exe files anymore? Does this mean that in SABnzbd I just can point to the .py files? I see there are different nzbto__files (nzbtoCouchpotato, nzbtomedia, nzbtoSickbeard). What is it I need to use now, in my current windows setup I always run nzbtoMedia.exe for both CP and SB.

I will need to do some reading I think. I can't remember how I actually did my fresh install a year a go, must assume I installed python etc. I guess best way to test this is to extract the master side.by-side with the old v9.2 win folder. I see the config file is more detailed.

git_path ?? do I need this, where to get it? ffmpeg_path = ehhh ... was it installed automatically, or do I need to download this? where can I find a download link?

Sorry for all the questions. Spend a lot of time setting up a stable working system. Hate it when things change ... afraid I will break things.

clinton-hall commented 10 years ago

Yes, you can call the .py files directly from SABnzbd. You need to ensure you have python and pywin installed.

https://github.com/clinton-hall/nzbToMedia/wiki/installation

You can run nzbToMedia.py or you can set Movie category to call nzbToCouchPotato and set TV category to call nzbToSickBeard etc

Git is not needed, but if you install git and clone the repository from git, then the script can support automatic updating.

ffmpeg is not needed, but there is a major benefit to installing it as it uses this to verify that files are playable, and automatically reject corrupt videos (asks SickRage and CouchPotato to download another). You can very easily download ffmpeg from the link above.

All other settings can be imported. Just copy your old autoProcessMedia.cfg into the new nzbToMedia directory (keep the existing autoProcessMedia.cfg.spec as it is). Then run the script and all old settings should be imported. You will then need to adjust the new settings only.

I understand what you mean about change, but unfortunately all the other packages have changed over time (e.g. SickBeard, CouchPotato and SABnzbd). In addition I have added a lot of features that have been requested, so when fully configured, this is a step up from what you previously had. The only real issue is that I can't support the .exe anymore.

thesatman commented 10 years ago

Forgive me my ignorance. Need a hand with this new setup. I installed the new NzbToMedia master source files to c:/NzbToMedia-master/. I also unzipped ffmpeg to c:/ ffmpeg/. In SabNzbd I changed the script folder to c:/NzbToMedia-master and in directories I changed accordingly. Copied over the autoProcess file to c:/NzbToMedia-master. Git I will try later. Python and pywin are installed, as I am running CP and SickRage now from source. Sabnzbd is binary cause I had issues with yENC and some other modules.

Now, you wrote "Then run the script and all old settings should be imported". What do you mean? What script, located in which folder?


edit:

I double clicked the NzbToCouchPotato.py file and then the magic happened... I guess. I see that in the new created autoProcessMedia.cfg my utorrent credentials are there, but f.ex the SABnzbd API was not entered... So I edited it manually. I then checked the logfile and found 2 errors. One was about the path for ffmpeg, and that is fixed now. The other error: 2014-09-02 10:55:14 INFO ::MAIN: Checking if source needs an update 2014-09-02 10:55:16 ERROR ::MAIN: Unknown current version number, don't know if we should update or not 2014-09-02 10:55:16 INFO ::MAIN: nzbToMedia Version:10.5 Branch:master (Windows 7)

I entered the path to the already installed GIT path. Tried both C:\Program Files (x86)\Git ...... and C:\Program Files (x86)\Git\bin

What am I forgetting here?

end-edit

Another question is about the TorrentToMedia.py file. Where do I use this, where do I need to tell the system that I want to use the script (if needed at all) ? CP is configured to use Usenet at first, and secondly uTorrent. In SickRage I have the same setup. It queries my usenet account, if not it looks for torrents. I guess I am not seing the big picture ...

clinton-hall commented 10 years ago

Ok... For the git path, try

C:\Program Files (x86)\Git\bin\git.exe

For TorrentToMedia, set this as the Run Program option.. Look here https://github.com/clinton-hall/nzbToMedia/wiki/utorrent

Then you may want to look at the autoProcessMedia.cfg options for [Torrent], particularly the outputDirectory and useLink options. https://github.com/clinton-hall/nzbToMedia/wiki/autoProcessMedia.cfg

thesatman commented 10 years ago
Hi clinton-hall,

 

Looks like something got broken so I will need to take small steps now to see what is happening. For starters, the git path in the autoProcessMedia.cfg. I have tried with

C:\Program Files (x86)\Git\bin\git.exe

C:\Program Files (x86)\Git\bin\

C:\Program Files (x86)\Git\

"C:\Program Files (x86)\Git\bin\git.exe"

"C:\Program Files (x86)\Git\bin\"

"C:\Program Files (x86)\Git\"

This is what the log file looks like:

2014-09-02 16:09:03 INFO    ::MAIN: Loading config from [C:\nzbToMedia-master\autoProcessMedia.cfg]

2014-09-02 16:09:03 INFO    ::MAIN: Checking database structure...

2014-09-02 16:09:04 INFO    ::MAIN: Checking if source needs an update

2014-09-02 16:09:10 ERROR   ::MAIN: Unknown current version number, don't know if we should update or not

2014-09-02 16:09:10 INFO    ::MAIN: nzbToMedia Version:10.5 Branch:master (Windows 7)

2014-09-02 16:09:10 INFO    ::MAIN: #########################################################

2014-09-02 16:09:10 INFO    ::MAIN: ## ..::[nzbToMedia.pyc]::.. ##

2014-09-02 16:09:10 INFO    ::MAIN: #########################################################

2014-09-02 16:09:10 WARNING ::MAIN: Invalid number of arguments received from client, Switching to manual run mode ...

2014-09-02 16:09:10 INFO    ::MAIN: The C:\nzbToMedia-master\nzbToCouchPotato.py script completed successfully.

 

My cfg file :

 

[General]

    # Enable/Disable update notifications

    version_notify = 1

    # Enable/Disable automatic updates

    auto_update = 0

    # Set to where your git executable is located              ######## my changes #############

    git_path = "C:\Program Files (x86)\Git\bin\git.exe"

    # GitHUB user for repo

    git_user = ""

    # GitHUB branch for repo

    git_branch = ""

    # Enable/Disable forceful cleaning of leftover files following postprocess

    force_clean = 0

    # Enable/Disable logging debug messages to nzbtomedia.log

    log_debug = 0

    # Enable/Disable logging database messages to nzbtomedia.log

    log_db = 0

    # Enable/Disable logging environment variables to nzbtomedia.log (helpful to track down errors calling external tools.)

    log_env = 0

    # Set to where your ffmpeg/ffprobe executables are located          ######## my changes#############

   ffmpeg_path = "C:\ffmpeg-20140901-git-97b8809-win64-static\bin"

    # 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

 

 

 

[CouchPotato]

    #### autoProcessing for Movies

    #### movie - category that gets called for post-processing with CPS

    [[movie]]

        enabled = 0

        apikey = ######## my changes #############

       host = localhost

        port = 5050

        ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######

        ssl = 0

        web_root = ""

        # Enable/Disable linking for Torrents

        Torrent_NoLink = 1

        method = renamer

        delete_failed = 0

        wait_for = 2

        extract = 1

        # Set this to minimum required size to consider a media file valid (in MB)

        minSize = 0

        # Enable/Disable deleteing ignored files (samples and invalid media files)

        delete_ignored = 0

        ##### 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 = ""

 

[SickBeard]

    #### autoProcessing for TV Series

    #### tv - category that gets called for post-processing with SB

    [[tv]]

        enabled = 0

        host = localhost

        port = 8083

        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 = 1

        process_method = ""

        # force processing of already processed content when running a manual scan.

        force = 0

        extract = 1

        nzbExtractionBy = Downloader

        # Set this to minimum required size to consider a media file valid (in MB)

        minSize = 0

        # Enable/Disable deleteing ignored files (samples and invalid media files)

        delete_ignored = 0

        ##### 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 = ""

 

 

 

[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 your using nzbToMedia.py with SabNZBD)

    sabnzbd_host = localhost

    sabnzbd_port = 8080

    sabnzbd_apikey = ######## my changes #############

   ###### Enter the default path to your default download directory (non-category downloads). this directory is protected by safe_mode.

    default_downloadDirectory = "W:\sabnzbd_complete" ######## my changes #############

 

 

[Torrent]

    ###### clientAgent - Supported clients: utorrent, transmission, deluge, rtorrent, other

    clientAgent = other

    ###### useLink - Set to hard for physical links, sym for symbolic links, move to move, and no to not use links (copy)

    useLink = hard

    ###### outputDirectory - Default output directory (categories will be appended as sub directory to outputDirectory)

    outputDirectory = /abs/path/to/complete/

    ###### Enter the default path to your default download directory (non-category downloads). this directory is protected by safe_mode. 

    default_downloadDirectory = ""

    ###### 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 your using TorrentToMedia.py with uTorrent)

    uTorrentWEBui = http://localhost:8082/gui/

    uTorrentUSR = ######## my changes #############

   uTorrentPWD = ######## my changes #############

   ###### Transmission (You must edit this if your using TorrentToMedia.py with uTorrent)

    TransmissionHost = localhost

    TransmissionPort = 8084

    TransmissionUSR = your username

    TransmissionPWD = your password

    #### Deluge (You must edit this if your using TorrentToMedia.py with deluge. Note that the host/port is for the deluge daemon, not the webui)

    DelugeHost = localhost

    DelugePort = 58846

    DelugeUSR = your username

    DelugePWD = your password

    ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######

    deleteOriginal = 0

 

[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

    audioExtensions = .mp3, .aac, .ogg, .ape, .m4a, .asf, .wma, .flac

    metaExtensions = .nfo, .sub, .srt, .jpg, .gif

 

[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 cretae a new file. =0 will replace the original

    duplicate = 1

    ignoreExtensions = .avi, .mkv

    # 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 exisiting sub languages. 0 will discare those not in your list above.

    allSubLanguages = 0

    # embedSubs. 1 will embded 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 = ""

    # 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

    outputDefault = ""

    # hwAccel. 1 will set ffmpeg to enable hardware acceleration (this requires a recent ffmpeg)

    hwAccel = 0

    #### Define custom settings below.

    outputVideoExtension = .mp4

    outputVideoCodec = libx264

    VideoCodecAllow = ""

    outputVideoPreset = medium

    outputVideoResolution = 1920:1080

    outputVideoFramerate = 24

    outputVideoBitrate = 800k

    outputAudioCodec = libmp3lame

    AudioCodecAllow = ""

    outputAudioChannels = 6

    outputAudioBitrate = 128k

    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

        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 teh 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 = ""

[loggers]

[handlers]

[formatters]

[logger_root]

    handlers = console

[handler_console]

[formatter_generic]

 

Thank you in advance for your assistance.
 

On Tuesday, September 2, 2014 12:07 PM CEST, Clinton Hall <notifications@github.com> wrote:
 

Ok... For the git path, try
C:\Program Files (x86)\Git\bin\git.exe
For TorrentToMedia, set this as the Run Program option..
Look here https://github.com/clinton-hall/nzbToMedia/wiki/utorrent
Then you may want to look at the autoProcessMedia.cfg options for [Torrent], particularly the outputDirectory and useLink options.
https://github.com/clinton-hall/nzbToMedia/wiki/autoProcessMedia.cfg
---
Reply to this email directly or view it on GitHub:
https://github.com/clinton-hall/nzbToMedia/issues/545#issuecomment-54132021
clinton-hall commented 10 years ago

For git, did you originally clone this repository using git? The git updater only works if you first cloned with git.

thesatman commented 10 years ago
Ah-HA! That explains it (maybe ...). Did a new install via the GIT command. Manually created C:\nzbToMedia-GIT, then ran the git command as explained in the WIKI. I still see something in the test log:

 

2014-09-03 08:48:54 INFO    ::MAIN: Loading config from [C:\nzbToMedia-GIT\nzbToMedia\autoProcessMedia.cfg]

2014-09-03 08:48:54 INFO    ::MAIN: Checking database structure...

2014-09-03 08:48:54 INFO    ::MAIN: Checking if git needs an update

2014-09-03 08:48:54 ERROR   ::MAIN: Unable to determine installed version via git, please check your logs!

2014-09-03 08:48:54 INFO    ::MAIN: No update needed

2014-09-03 08:48:54 INFO    ::MAIN: nzbToMedia Version:10.6 Branch:master (Windows 7)

2014-09-03 08:48:54 INFO    ::MAIN: #########################################################

2014-09-03 08:48:54 INFO    ::MAIN: ## ..::[nzbToMedia.pyc]::.. ##

2014-09-03 08:48:54 INFO    ::MAIN: #########################################################

2014-09-03 08:48:54 WARNING ::MAIN: Invalid number of arguments received from client, Switching to manual run mode ...

2014-09-03 08:48:54 INFO    ::MAIN: The C:\nzbToMedia-GIT\nzbToMedia\nzbToCouchPotato.py script completed successfully.

 

What is the ERROR line about ?

 

On Tuesday, September 2, 2014 10:30 PM CEST, Clinton Hall <notifications@github.com> wrote:
 

For git, did you originally clone this repository using git?
The git updater only works if you first cloned with git.
---
Reply to this email directly or view it on GitHub:
https://github.com/clinton-hall/nzbToMedia/issues/545#issuecomment-54212848
clinton-hall commented 10 years ago

Ok... git on Windows can be a bit funny.

In autoProcessMedia.cfg, set

[General]
    log_debug = 1

This will add more logging, so if you run again we should see at what point it fails.

Also, you can try removing the spaces in the folder name... so move/copy C:\Program Files (x86)\Git to C:\Git\ then set autoProcessMedia.cfg

[General]
    git_path = C:\Git\bin\git.exe
thesatman commented 10 years ago
Thank you, problem fixed. As I said, several things seem to be broken (that's why I hate changes ;o) ... ), but need to take this one issue at the time. I'm not sure if you want me to open a new topic for this. I could ask my question here, but if you find it better to open a new topic, then just close this one and let me know.

 

On Wednesday, September 3, 2014 09:16 AM CEST, Clinton Hall <notifications@github.com> wrote:

 

Ok... git on Windows can be a bit funny.
In autoProcessMedia.cfg, set

[General] log_debug = 1

This will add more logging, so if you run again we should see at what point it fails.
Also, you can try removing the spaces in the folder name... so move/copy `C:\Program Files (x86)\Git` to `C:\Git\`
then set autoProcessMedia.cfg

[General] git_path = C:\Git\bin\git.exe

---
Reply to this email directly or view it on GitHub:
https://github.com/clinton-hall/nzbToMedia/issues/545#issuecomment-54260324
clinton-hall commented 10 years ago

Just keep going. We'll work the issues as they arrive.

thesatman commented 10 years ago
Great ! :o)

After tonights run I have following issues:

 

Scenario 1: CP downloads a movie (via uTorrent). My folder and category setup for CP:

W:\sabnzbd_incomplete

W:\sabnzbd_complete (with category "film, tv" subfolder)

Label for torrents = couchpotato_

 

In uTorrent I use :

W:\torrent_incomplete (stores both torrent + files)

W:\torrent_complete (only torrents)

W:\torrent_download (all media files)

I use labeled folders "SickRagetv_, couchpotato_, iso"

 

When the movie is completed I find it in W:\torrent_download\couchpotato_ and always need to do a manual folder scan in CP to move the movie to the final mediaserver movie folder. I have been reading your "torrentToMedia" manual but am confused. The problem I see is when I enter the "command to execute", that this will be invoked for ALL downloads. But like f.ex the label "iso": I give a download this label manually when I see that it is a img, iso or vid_TS folder. This way they all end up in the iso folder. Next step for those files is to run MakeMKV. For iso and img, choose the correct language track, only the relevant sub files. save, move to couthpotato_ folder, then run manual scan. Thus "iso" does not have to run the "post-process command torrentToMedia". Same goes for other torrent download that are manually started, like an ebook or other non-media server related stuff.

 

How do you suggest I go about?

 

Scenario 2: SickRage downloads a tv show with uTorrent. This morning I found the files in W:\torrent_download\SickRagetv_. The files and folders:

 

W:\torrent_download\SBtv_\tv_show_sxxexx_some-name

W:\torrent_download\SBtv_\tv_show_sxxexx_some-name\tv_show_sxxexx_some-name-(lots of RAR files)

 

I see in SickRage that there is a setting called "Unpack any TV releases in your TV Download Dir? NOTE: Only working with RAR archive"

Should I use this, and if so, what is my TV download dir? "Sabnzbd_complete\tv" or "torrent_download\SickRagetv_\tv_show_sxxexx_some-name" . Or should I use nzbToSickBeard.py to to the job?

 

Thank you again in advance for your time and patience.

 

On Wednesday, September 3, 2014 10:51 PM CEST, Clinton Hall <notifications@github.com> wrote:
 

Just keep going. We'll work the issues as they arrive.
---
Reply to this email directly or view it on GitHub:
https://github.com/clinton-hall/nzbToMedia/issues/545#issuecomment-54364726
clinton-hall commented 10 years ago

Personally I would use TorrentToMedia to do both of these.

For scenario 1 TorrentToMedia would send the release to CouchPotato to be renamed. You can have the script do the extraction of any .rar files, doe hard-linking to a new folder to allow continued seeding while the movie is renamed etc, or you can set it to move the files.

You can specify what categories you want processed, and what categories you want ignored... So having the script called for every download is not a problem. Also, you can have the script call any secondary scripts, so it might be possible to actually call MakeMKV as an automated process.

For scenario 2, again TorrentToMedia will extract the .rar files, then send the current location to SickRage to rename into the final library.

So, in order to help confirm the settings to use, please confirm if you want to continue seeding, or not. Then I can give you some settings to try.

thesatman commented 10 years ago

I switched from seeding to not-seeding. Not because I am a leecher, but because files got moved and gave me errors during the automation process. I am more thinking towards an automated process for anonymous usenet uploads with a 900 day cycle. It's nice to get, but so much nicer to give :o) !But that is not on todays plate. So short answer : no seeding :o)

clinton-hall commented 10 years ago

Try setting these specific fields in autoProcessMedia and then setting utorrent to call TorrentToMedia.py as per the wiki. Also create the folder W:\torrent_download\processed... this is just a safer way to process files and verify they were processed before deleting the original torrent.

Also, this creates new CouchPotato section "couchpotato_". If your NZB downloads use a different category (movies, couchpotato etc) then you need to leave that section alone and just create this as second category... same for SickBeard.

[General]
    ffmpeg_path = C:\ffmpeg-20140901-git-97b8809-win64-static\bin

[CouchPotato]
    [[couchpotato_]]
        enabled = 1
        apikey = ######## your changes #############
        host = localhost
        port = 5050
        Torrent_NoLink = 0
        method = renamer
        extract = 1
        watch_dir = W:\torrent_download\couchpotato_

[SickBeard]
    [[SickRagetv_]]
        enabled = 1
    host = localhost
        port = 8083
        username = ######## your changes #############
        password = ######## your changes #############
        Torrent_NoLink = 0
        extract = 1
        watch_dir = W:\torrent_download\SickRagetv_

[Nzb]
    default_downloadDirectory = W:\sabnzbd_complete

[Torrent]
    clientAgent = utorrent
    useLink = hard
    outputDirectory = W:\torrent_download\processed
    default_downloadDirectory = W:\torrent_download
    categories = iso
    noFlatten = 
    uTorrentWEBui = http://localhost:8082/gui/
    uTorrentUSR = ######## your changes #############
    uTorrentPWD = ######## your changes #############
    deleteOriginal = 1

In theory this should do what you want... process the couchpotato and SickRageTV labels, but ignore others.

Give it a go and let me know how you get on.

thesatman commented 10 years ago
First one was a good one ... the usenet download was ISO. CP processed it and the movie.iso ended up in w:\mediaserver\film\movie_name\movie.iso. Since Plex can not stream iso, I need to find a solution the same way I need to deal with them in uTorrent. (park them, mount with Virtual CloneDrive, run MakeMKV, select audio track and relevant subs, rename titel00.mkv to movie_name.mkv, run CP renamer, unmount).

 

So two things count here: Do not move iso and vid_ts to the mediaserver\films folder. And how automate the isoToMKV with option to set preferences (like language audio =en, sub language first choice = en, else second choice NL, NO) You mentioned earlier that this could be done ? 

Any thoughts on question one (clearly a CP topic. The second question is more optional in case you should have any experience with this.)
 

On Friday, September 5, 2014 03:19 AM CEST, Clinton Hall <notifications@github.com> wrote:
 

Try setting these specific fields in autoProcessMedia and then setting utorrent to call TorrentToMedia.py as per the wiki.
Also create the folder W:\torrent_download\processed... this is just a safer way to process files and verify they were processed before deleting the original torrent.
Also, this creates new CouchPotato section "couchpotato_". If your NZB downloads use a different category (movies, couchpotato etc) then you need to leave that section alone and just create this as second category... same for SickBeard.

[General] ffmpegpath = C:\ffmpeg-20140901-git-97b8809-win64-static\bin [CouchPotato] [[couchpotato]] enabled = 1 apikey = ######## your changes ############# host = localhost port = 5050 Torrent_NoLink = 0 method = renamer extract = 1 watch_dir = W:\torrentdownload\couchpotato [SickBeard] [[SickRagetv_]] enabled = 1 host = localhost port = 8083 username = ######## your changes ############# password = ######## your changes ############# Torrent_NoLink = 0 extract = 1 watch_dir = W:\torrentdownload\SickRagetv [Nzb] default_downloadDirectory = W:\sabnzbd_complete [Torrent] clientAgent = utorrent useLink = hard outputDirectory = W:\torrent_download\processed default_downloadDirectory = W:\torrent_download categories = iso noFlatten = uTorrentWEBui = http://localhost:8082/gui/ uTorrentUSR = ######## your changes ############# uTorrentPWD = ######## your changes ############# deleteOriginal = 1

In theory this should do what you want... process the couchpotato_ and SickRageTV_ labels, but ignore others.
Give it a go and let me know how you get on.
---
Reply to this email directly or view it on GitHub:
https://github.com/clinton-hall/nzbToMedia/issues/545#issuecomment-54567368
clinton-hall commented 10 years ago

Interesting. TorrentToMedia has the option to call a userscript for a specified category/label. Also, nzbToMedia does allow the same, but both of these would require you to intervene and set the category/label based on the filetype. Currently my script doesn't set this based on filetype.

However, these scripts do support transcoding via ffmpeg, which allows you to specify which filetypes to transcode and which ones to ignore.

See this http://stackoverflow.com/questions/19200790/converting-dvd-image-with-subtitles-to-mkv-using-avconv

So, my script will currently support adding these necessary tags. But the issue is it won't convert the .iso directly (and will try to transcode the .vob files 1 by 1.

So what I can do (might take a few days to add in) is add a function that will mount an .iso file and check for .vob files inside video_TS folder. In addition, for non .iso downloads, where .vob files are found, check to see if they are in a video_TS folder. Now in both cases the script would need to concatenation the VTS_01_n.vob files into a single temp .vob file and then transcode this.

So, all of this is quite possible, and rather trivial on Linux. For Windows I'll need to check to see if there is an easy to package iso mount tool, and a simple .vob concatenation tool.

Other option is to simply call handbrake, iso2mkv etc... But this would not support my current transcode options and would likely make the code a lot more complex....

I'll have a look and see what solutions I can find.

clinton-hall commented 10 years ago

Ah in windows

copy /b vob1.vob + vob2.vob + vob3.vob outputFile.vob

So that part is trivial.

clinton-hall commented 10 years ago

http://www.pismotechnic.com/download/ Looks like Pismo File Mount Audit Package build 171 has a command line tool http://www.pismotechnic.com/download/pfmap-171-readme.txt This is something that can be installed free, but I can't "distribute" it, so I would only be able to put a link to it on the installation instructions.

So as long as that was installed, this could be used to mount the file, then we copy the .vobs to a single .vob in a new location, then un mount the .iso and call the trabscoder.

thesatman commented 10 years ago

I'm reporting back to you about the uTorrent changes. Something is not working as it should. Let me explain:

After the torrent is completed I see that the files are copied (yes, not moved, but that has a reason. I\ll explain in a bit...) from W:\torrentdownload\couchpotato to W:\torrentdownload\processed\couchpotato. But there it ends. CP is not picking them up.

My CP config:

[CouchPotato] [[movie]] ######### I keep removing this [movie] section, but it keeps coming back ###### enabled = 0 apikey = "" host = localhost port = 5050 ssl = 0 web_root = "" Torrent_NoLink = 0 method = renamer delete_failed = 0 wait_for = 2 extract = 1 minSize = 0 delete_ignored = 0 remote_path = 0 watchdir = "" [[couchpotato]] enabled = 1 apikey = ####### my key ####### host = localhost port = 5050 Torrent_NoLink = 0 method = renamer extract = 1 watch_dir = W:\torrentdownload\couchpotato [[film]] enabled = 1 apikey = ##### my key ##### host = localhost port = 5050 ssl = 0 web_root = "" Torrent_NoLink = 1 method = renamer delete_failed = 0 wait_for = 2 extract = 1 minSize = 0 delete_ignored = 0 remote_path = 0 watch_dir = ""

[Torrent] clientAgent = utorrent useLink = hard outputDirectory = W:\torrent_download\processed default_downloadDirectory = W:\torrent_download categories = iso noFlatten = "" uTorrentWEBui = http://localhost:8082/gui/ uTorrentUSR = ### my login ### uTorrentPWD = ### my pw ### deleteOriginal = 1

From the log file :

2014-09-06 06:50:36 INFO ::MAIN: Loading config from [C:\nzbToMedia-GIT\nzbToMedia\autoProcessMedia.cfg] 2014-09-06 06:50:37 INFO ::MAIN: Checking database structure... 2014-09-06 06:50:38 INFO ::MAIN: Checking if git needs an update 2014-09-06 06:50:42 INFO ::MAIN: No update needed 2014-09-06 06:50:42 INFO ::MAIN: nzbToMedia Version:d904aafb99938455e3fed45d70d392eb021f1da8 Branch:master (Windows 7) 2014-09-06 06:50:42 INFO ::MAIN: ######################################################### 2014-09-06 06:50:42 INFO ::MAIN: ## ..::[TorrentToMedia.py]::.. ## 2014-09-06 06:50:42 INFO ::MAIN: ######################################################### 2014-09-06 06:50:43 INFO ::MAIN: SEARCH: Found a unique directory MOVIE_NAME in the category directory 2014-09-06 06:50:43 INFO ::MAIN: Auto-detected SECTION:CouchPotato 2014-09-06 06:50:48 INFO ::MAIN: Output directory set to: W:\torrentdownload\processed\couchpotato\MOVIE_NAME 2014-09-06 06:50:48 INFO ::COPYLINK: MEDIAFILE: [MOVIE_NAME2.avi] 2014-09-06 06:50:48 INFO ::COPYLINK: SOURCE FOLDER: [C:\Video\link_w_torrentdownload\couchpotato\MOVIE_NAME] 2014-09-06 06:50:48 INFO ::COPYLINK: TARGET FOLDER: [W:\torrentdownload\processed\couchpotato\MOVIE_NAME] 2014-09-06 06:50:48 INFO ::COPYLINK: Hard linking SOURCE MEDIAFILE -> TARGET FOLDER 2014-09-06 06:50:48 WARNING ::COPYLINK: Error: Local NTFS volumes are required to complete the operation. , copying instead ... 2014-09-06 06:50:48 INFO ::COPYLINK: Copying SOURCE MEDIAFILE -> TARGET FOLDER 2014-09-06 06:51:54 INFO ::COPYLINK: MEDIAFILE: [MOVIE_NAME1.avi] 2014-09-06 06:51:54 INFO ::COPYLINK: SOURCE FOLDER: [C:\Video\link_w_torrentdownload\couchpotato\MOVIE_NAME] 2014-09-06 06:51:54 INFO ::COPYLINK: TARGET FOLDER: [W:\torrentdownload\processed\couchpotato\MOVIE_NAME] 2014-09-06 06:51:54 INFO ::COPYLINK: Hard linking SOURCE MEDIAFILE -> TARGET FOLDER 2014-09-06 06:51:54 WARNING ::COPYLINK: Error: Local NTFS volumes are required to complete the operation. , copying instead ... 2014-09-06 06:51:54 INFO ::COPYLINK: Copying SOURCE MEDIAFILE -> TARGET FOLDER 2014-09-06 06:53:07 INFO ::MAIN: FLATTEN: Flattening directory: W:\torrentdownload\processed\couchpotato\MOVIE_NAME 2014-09-06 06:53:07 INFO ::MAIN: Found 2 media files in W:\torrentdownload\processed\couchpotato\MOVIENAME 2014-09-06 06:53:07 INFO ::MAIN: Calling CouchPotato:couchpotato to post-process:MOVIE_NAME

Note on the COPYLINK error and nfts:

After having a discussion on the uTorrent forum it looks like uTorrent can have issues with networked drives. In my case the W: drive. I could not use W:\torrents_incomplete and then let it move everything to W:\torrents_download. So I needed to make a link on my C: drive, pointing to W: as a work-around. Question is if the COPYLINK error is related to this... ?

Anyhow, the question remains, why is CP not postprocessing W:\torrentdownload\processed\couchpotato\MOVIE_NAME ? As far as I can see there is no pointer in the autoProcessMedia.cfg that tells CP to look for it there. Or am I mistaking? We mention watch_dir = W:\torrentdownload\couchpotato. And there are files in this folder. But then we create a new "processed" folder and put a copy of the files there. Where is this folder called upon for CP postprocessing and moving it to the W:\mediaservercontent3\films\ folder ?

For the ISO and TS scripting, maybe have a look here :

http://videoscripts.wordpress.com/

clinton-hall commented 10 years ago

[[movie]] section will always be re-added. just leave it disabled and all is good there.

Try setting

[Torrent]
useLink = copy

to simply copies the files and then processes them... you are right, the hard link wont work from C: to W:

You could just do a move, but this won't be any quicker.... once everything else is working, we can look at ways to speed this up. (Can you confirm exactly where your W: drive (or a directory on this drive) is mounted to?

To find out why CouchPotato didn't postprocess, can you set

[General]
    log_debug = 1

then run the TorrentToMedia.py script manually from command prompt C:\Python27\python.exe C:\nzbToMedia-GIT\nzbToMedia\TorrentToMedia.py then post the output of the command window... hopefully this had more details (maybe a traceback) than the previous logs.

thesatman commented 10 years ago
uselink = move is what I have now. To avoid that old isos are being stacked on the C drive and take all the available space (created a smaller VM with limited disk space since all data is to be stored on the NAS, also VM)

 

C:\Video\link_w_sabnzbd_complete => W:\sabnzbd_complete

C:\Video\link_w_sabnzbd_incomplete => W:\sabnzbd_incomplete

C:\Video\link_w_torrent_download => W:\torrent_complete 

 

The log file for running TorrentToMedia.py :

 

2014-09-06 16:47:57 INFO    ::MAIN: Loading config from [C:\nzbToMedia-GIT\nzbToMedia\autoProcessMedia.cfg]

2014-09-06 16:47:57 INFO    ::MAIN: Checking database structure...

2014-09-06 16:47:57 DEBUG   ::MAIN: Checking Initial Schema database upgrade

2014-09-06 16:47:57 DEBUG   ::MAIN: InitialSchema upgrade not required

2014-09-06 16:47:57 DEBUG   ::MAIN: Checking if we can use git commands: "C:\Program Files (x86)\Git\bin\git.exe" version

2014-09-06 16:47:57 DEBUG   ::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" version with your shell in C:\nzbToMedia-GIT\nzbToMedia

2014-09-06 16:47:57 DEBUG   ::MAIN: git output: git version 1.9.4.msysgit.1

2014-09-06 16:47:57 DEBUG   ::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" version : returned successful

2014-09-06 16:47:57 DEBUG   ::MAIN: Using: "C:\Program Files (x86)\Git\bin\git.exe"

2014-09-06 16:47:57 DEBUG   ::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" symbolic-ref -q HEAD with your shell in C:\nzbToMedia-GIT\nzbToMedia

2014-09-06 16:47:57 DEBUG   ::MAIN: git output: refs/heads/master

2014-09-06 16:47:57 DEBUG   ::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" symbolic-ref -q HEAD : returned successful

2014-09-06 16:47:57 INFO    ::MAIN: Checking if git needs an update

2014-09-06 16:47:57 DEBUG   ::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" rev-parse HEAD with your shell in C:\nzbToMedia-GIT\nzbToMedia

2014-09-06 16:47:57 DEBUG   ::MAIN: git output: d904aafb99938455e3fed45d70d392eb021f1da8

2014-09-06 16:47:57 DEBUG   ::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" rev-parse HEAD : returned successful

2014-09-06 16:47:57 DEBUG   ::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" fetch origin with your shell in C:\nzbToMedia-GIT\nzbToMedia

2014-09-06 16:48:03 DEBUG   ::MAIN: git output: 

2014-09-06 16:48:03 DEBUG   ::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" fetch origin : returned successful

2014-09-06 16:48:03 DEBUG   ::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" rev-parse --verify --quiet "@{upstream}" with your shell in C:\nzbToMedia-GIT\nzbToMedia

2014-09-06 16:48:03 DEBUG   ::MAIN: git output: d904aafb99938455e3fed45d70d392eb021f1da8

2014-09-06 16:48:03 DEBUG   ::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" rev-parse --verify --quiet "@{upstream}" : returned successful

2014-09-06 16:48:03 DEBUG   ::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" rev-list --left-right "@{upstream}"...HEAD with your shell in C:\nzbToMedia-GIT\nzbToMedia

2014-09-06 16:48:03 DEBUG   ::MAIN: git output: 

2014-09-06 16:48:03 DEBUG   ::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" rev-list --left-right "@{upstream}"...HEAD : returned successful

2014-09-06 16:48:03 DEBUG   ::MAIN: cur_commit = d904aafb99938455e3fed45d70d392eb021f1da8 % (newest_commit)= d904aafb99938455e3fed45d70d392eb021f1da8, num_commits_behind = 0, num_commits_ahead = 0

2014-09-06 16:48:03 INFO    ::MAIN: No update needed

2014-09-06 16:48:03 INFO    ::MAIN: nzbToMedia Version:d904aafb99938455e3fed45d70d392eb021f1da8 Branch:master (Windows 7)

2014-09-06 16:48:03 DEBUG   ::MAIN: Connecting to utorrent: http://localhost:8082/gui/

2014-09-06 16:48:03 INFO    ::MAIN: #########################################################

2014-09-06 16:48:03 INFO    ::MAIN: ## ..::[TorrentToMedia.py]::.. ##

2014-09-06 16:48:03 INFO    ::MAIN: #########################################################

2014-09-06 16:48:03 DEBUG   ::MAIN: Options passed into TorrentToMedia: ['C:\\nzbToMedia-GIT\\nzbToMedia\\TorrentToMedia.py']

2014-09-06 16:48:03 WARNING ::MAIN: Invalid number of arguments received from client, Switching to manual run mode ...

2014-09-06 16:48:03 DEBUG   ::MAIN: No directories identified in CouchPotato:movie for post-processing

2014-09-06 16:48:03 INFO    ::MAIN: Searching W:\torrent_download\couchpotato_ for mediafiles to post-process ...

2014-09-06 16:48:03 DEBUG   ::MAIN: Found file Thumbs.db in root directory W:\torrent_download\couchpotato_.

2014-09-06 16:48:03 INFO    ::COPYLINK: MEDIAFILE: [Thumbs.db]

2014-09-06 16:48:03 INFO    ::COPYLINK: SOURCE FOLDER: [W:\torrent_download\couchpotato_]

2014-09-06 16:48:03 INFO    ::COPYLINK: TARGET FOLDER: [W:\torrent_download\couchpotato_\Thumbs]

2014-09-06 16:48:03 INFO    ::COPYLINK: MEDIAFILE already exists in the TARGET folder, skipping ...

2014-09-06 16:48:03 INFO    ::MAIN: Searching W:\torrent_download\processed\couchpotato_ for mediafiles to post-process ...

2014-09-06 16:48:03 INFO    ::MAIN: Starting manual run for CouchPotato:couchpotato_ - Folder:W:\torrent_download\couchpotato_\Thumbs

2014-09-06 16:48:03 INFO    ::MAIN: Checking database for download info for Thumbs ...

2014-09-06 16:48:03 INFO    ::MAIN: Unable to locate download info for Thumbs, continuing to try and process this release ...

2014-09-06 16:48:04 DEBUG   ::MAIN: Received Directory: W:\torrent_download\couchpotato_\Thumbs | Name: Thumbs | Category: couchpotato_

2014-09-06 16:48:04 DEBUG   ::MAIN: SEARCH: Found Category: couchpotato_ in directory structure

2014-09-06 16:48:04 INFO    ::MAIN: SEARCH: Found a unique directory Thumbs in the category directory

2014-09-06 16:48:04 DEBUG   ::MAIN: Determined Directory: W:\torrent_download\couchpotato_\Thumbs | Name: Thumbs | Category: couchpotato_

2014-09-06 16:48:04 INFO    ::MAIN: Auto-detected SECTION:CouchPotato

2014-09-06 16:48:04 INFO    ::MAIN: Output directory set to: W:\torrent_download\processed\couchpotato_\Thumbs

2014-09-06 16:48:04 DEBUG   ::MAIN: Scanning files in directory: W:\torrent_download\couchpotato_\Thumbs

2014-09-06 16:48:04 DEBUG   ::MAIN: Found 0 files in W:\torrent_download\couchpotato_\Thumbs

2014-09-06 16:48:04 DEBUG   ::MAIN: Checking for archives to extract in directory: W:\torrent_download\processed\couchpotato_\Thumbs

2014-09-06 16:48:04 INFO    ::MAIN: FLATTEN: Flattening directory: W:\torrent_download\processed\couchpotato_\Thumbs

2014-09-06 16:48:04 WARNING ::MAIN: Found no media files in W:\torrent_download\processed\couchpotato_\Thumbs

2014-09-06 16:48:04 INFO    ::MAIN: Calling CouchPotato:couchpotato_ to post-process:Thumbs
thesatman commented 10 years ago
The results after SickBeard downloadeda torrent. There is a problem with the output directory. It is not created.

#########################################################

2014-09-06 19:03:48 INFO    ::MAIN: ## ..::[TorrentToMedia.py]::.. ##

2014-09-06 19:03:48 INFO    ::MAIN: #########################################################

2014-09-06 19:03:48 DEBUG   ::MAIN: Options passed into TorrentToMedia: ['C:\\nzbToMedia-GIT\\nzbToMedia\\TorrentToMedia.py', 'C:\\Video\\link_w_torrent_download\\SickRagetv_', 'TV-SHOW.avi', 'SickRagetv_', '900ACA656BC0E7391E79BDFCCF5D0051D5588077']

2014-09-06 19:03:48 DEBUG   ::MAIN: Adding TORRENT download info for directory C:\Video\link_w_torrent_download\SickRagetv_ to database

2014-09-06 19:03:48 DEBUG   ::MAIN: Received Directory: C:\Video\link_w_torrent_download\SickRagetv_ | Name: TV-SHOW.avi | Category: SickRagetv_

2014-09-06 19:03:48 DEBUG   ::MAIN: SEARCH: Found Category: SickRagetv_ in directory structure

2014-09-06 19:03:48 INFO    ::MAIN: SEARCH: Found torrent file TV-SHOW.avi in input directory directory C:\Video\link_w_torrent_download\SickRagetv_

2014-09-06 19:03:48 INFO    ::MAIN: SEARCH: Setting inputDirectory to C:\Video\link_w_torrent_download\SickRagetv_\TV-SHOW.avi

2014-09-06 19:03:48 DEBUG   ::MAIN: Determined Directory: C:\Video\link_w_torrent_download\SickRagetv_\TV-SHOW.avi | Name: TV-SHOW.avi | Category: SickRagetv_

2014-09-06 19:03:48 INFO    ::MAIN: Auto-detected SECTION:SickBeard

2014-09-06 19:03:48 DEBUG   ::MAIN: Stopping torrentTV-SHOW.avi in utorrent while processing

2014-09-06 19:03:53 INFO    ::MAIN: Output directory set to: W:\torrent_download\processed\SickRagetv_\TV-SHOW.avi

2014-09-06 19:03:53 DEBUG   ::MAIN: Scanning files in directory: C:\Video\link_w_torrent_download\SickRagetv_\TV-SHOW.avi

2014-09-06 19:03:53 DEBUG   ::MAIN: Found 1 files in C:\Video\link_w_torrent_download\SickRagetv_\TV-SHOW.avi

2014-09-06 19:03:53 DEBUG   ::MAIN: Checking for archives to extract in directory: W:\torrent_download\processed\SickRagetv_\TV-SHOW.avi

2014-09-06 19:03:53 INFO    ::MAIN: FLATTEN: Flattening directory: W:\torrent_download\processed\SickRagetv_TV-SHOW.avi

2014-09-06 19:03:53 WARNING ::MAIN: Found no media files in W:\torrent_download\processed\SickRagetv_\TV-SHOW.avi

2014-09-06 19:03:53 INFO    ::MAIN: Calling SickBeard:SickRagetv_ to post-process:TV-SHOW.avi

 

Just a thought... : from what I can see the time stamps are only seconds apart. If moving a file from W:\some-folder to W:\another-folder, this is done immediately, local on the NAS. However, since I am using a link, and moving from C: on one PC to W: on a NAS networked drive, this takes longer that an few seconds (ISO can take up to 30 minutes). Strange enough, the file in C: is the same file on W:. But a move from that file from W:\abc to W:\xyz is dealt with as local, and the same ISO file is moved in matter of seconds.

 

So if it is the delay that is the issue here, the script needs to wait until the move is completed, or C: as input directory should be avoided. Don't know if I am talking crazy now ;o) Just brain storming ...
clinton-hall commented 10 years ago

ok, with the log from the manual process, was that actually the output from the command window, or was that the logfile? the command windows should end with an error trace-back which I need to see what is failing here.

for the whole copy/move issue, try this

[Network]
    mount_points = C:\Video\link_w_torrent_download\,W:\torrent_complete\

[SickBeard]
    [[SickRagetv_ ]]
        remote_path = 1 
        watch_dir = C:\Video\link_w_torrent_download\SickRagetv_

[CouchPotato]
    [[couchpotato]]
        remote_path = 1 
        watch_dir = C:\Video\link_w_torrent_download\couchpotato_

[Torrent]
    useLink = hard
    outputDirectory = C:\Video\link_w_torrent_download\

see if this runs manually first, and again, try to capture the command output.

thesatman commented 10 years ago
Sorry, that was the log file. Here is the command line output :

[01:13:44] [DEBUG]::MAIN: cur_commit = d904aafb99938455e3fed45d70d392eb021f1da8

% (newest_commit)= d904aafb99938455e3fed45d70d392eb021f1da8, num_commits_behind

= 0, num_commits_ahead = 0

[01:13:44] [INFO]::MAIN: No update needed

[01:13:44] [INFO]::MAIN: nzbToMedia Version:d904aafb99938455e3fed45d70d392eb021f

1da8 Branch:master (Windows 7)

Traceback (most recent call last):

  File "C:\nzbToMedia-GIT\nzbToMedia\TorrentToMedia.py", line 323, in <module>

    exit(main(sys.argv))

  File "C:\nzbToMedia-GIT\nzbToMedia\TorrentToMedia.py", line 240, in main

    nzbtomedia.initialize()

  File "C:\nzbToMedia-GIT\nzbToMedia\nzbtomedia\__init__.py", line 336, in initi

alize

    REMOTEPATHS = [ tuple(item.split(',')) for item in REMOTEPATHS.split('|') ]

 # /volume1/Public/,E:\|/volume2/share/,\\NAS\

AttributeError: 'list' object has no attribute 'split'

 
clinton-hall commented 10 years ago

Yeah... verified here... something has changed with this... it used to work!

Please update to latest nightly branch and test again.

thesatman commented 10 years ago
Sorry, new to this. How to update to latest nightly branch?
thesatman commented 10 years ago
Figured it out on how to switch to nightly (https://github.com/clinton-hall/nzbToMedia/issues/447)

Here is the Traceback. Is this OK or do you need more info ?

 

[18:02:26] [INFO]::MAIN: Calling CouchPotato:couchpotato_ to post-process:Thumbs

 

Traceback (most recent call last):

  File "C:\nzbToMedia-GIT\nzbToMedia\TorrentToMedia.py", line 323, in <module>

    exit(main(sys.argv))

  File "C:\nzbToMedia-GIT\nzbToMedia\TorrentToMedia.py", line 308, in main

    clientAgent)

  File "C:\nzbToMedia-GIT\nzbToMedia\TorrentToMedia.py", line 206, in processTor

rent

    inputCategory)

  File "C:\nzbToMedia-GIT\nzbToMedia\nzbtomedia\autoProcess\autoProcessMovie.py"

, line 106, in process

    delete_failed = int(nzbtomedia.CFG[section][inputCategory]["delete_failed"])

 

TypeError: int() argument must be a string or a number, not 'Section'

 

On Sunday, September 7, 2014 02:41 AM CEST, Clinton Hall <notifications@github.com> wrote:
 

Yeah... verified here... something has changed with this... it used to work!
Please update to latest nightly branch and test again.
---
Reply to this email directly or view it on GitHub:
https://github.com/clinton-hall/nzbToMedia/issues/545#issuecomment-54733361
clinton-hall commented 10 years ago

thanks for that... I have added some instructions to the wiki https://github.com/clinton-hall/nzbToMedia/wiki/Branches

Please let me know how this works on nightly branch.

thesatman commented 10 years ago
tested this morning monday 07:40 Europe Oslo time
 

C:\nzbToMedia-GIT\nzbToMedia>C:\Python27\python.exe C:\nzbToMedia-GIT\nzbToMedia

\TorrentToMedia.py

[07:40:35] [INFO]::MAIN: Loading config from [C:\nzbToMedia-GIT\nzbToMedia\autoP

rocessMedia.cfg]

[07:40:35] [INFO]::MAIN: Checking database structure...

[07:40:35] [DEBUG]::MAIN: Checking Initial Schema database upgrade

[07:40:35] [DEBUG]::MAIN: InitialSchema upgrade not required

[07:40:35] [DEBUG]::MAIN: Checking if we can use git commands: "C:\Program Files

 (x86)\Git\bin\git.exe" version

[07:40:35] [DEBUG]::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" ver

sion with your shell in C:\nzbToMedia-GIT\nzbToMedia

[07:40:36] [DEBUG]::MAIN: git output: git version 1.9.4.msysgit.1

[07:40:36] [DEBUG]::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" version : ret

urned successful

[07:40:36] [DEBUG]::MAIN: Using: "C:\Program Files (x86)\Git\bin\git.exe"

[07:40:36] [DEBUG]::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" sym

bolic-ref -q HEAD with your shell in C:\nzbToMedia-GIT\nzbToMedia

[07:40:37] [DEBUG]::MAIN: git output: refs/heads/nightly

[07:40:37] [DEBUG]::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" symbolic-ref

-q HEAD : returned successful

[07:40:37] [INFO]::MAIN: Checking if git needs an update

[07:40:37] [DEBUG]::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" rev

-parse HEAD with your shell in C:\nzbToMedia-GIT\nzbToMedia

[07:40:37] [DEBUG]::MAIN: git output: cb126c36444dafa2b581773db0a9ae454dab2ff5

[07:40:37] [DEBUG]::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" rev-parse HEA

D : returned successful

[07:40:37] [DEBUG]::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" fet

ch origin with your shell in C:\nzbToMedia-GIT\nzbToMedia

[07:40:41] [DEBUG]::MAIN: git output:

[07:40:41] [DEBUG]::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" fetch origin

: returned successful

[07:40:42] [DEBUG]::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" rev

-parse --verify --quiet "@{upstream}" with your shell in C:\nzbToMedia-GIT\nzbTo

Media

[07:40:42] [DEBUG]::MAIN: git output: cb126c36444dafa2b581773db0a9ae454dab2ff5

[07:40:42] [DEBUG]::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" rev-parse --v

erify --quiet "@{upstream}" : returned successful

[07:40:42] [DEBUG]::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" rev

-list --left-right "@{upstream}"...HEAD with your shell in C:\nzbToMedia-GIT\nzb

ToMedia

[07:40:42] [DEBUG]::MAIN: git output:

[07:40:42] [DEBUG]::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" rev-list --le

ft-right "@{upstream}"...HEAD : returned successful

[07:40:42] [DEBUG]::MAIN: cur_commit = cb126c36444dafa2b581773db0a9ae454dab2ff5

% (newest_commit)= cb126c36444dafa2b581773db0a9ae454dab2ff5, num_commits_behind

= 0, num_commits_ahead = 0

[07:40:42] [INFO]::MAIN: No update needed

[07:40:42] [INFO]::MAIN: nzbToMedia Version:cb126c36444dafa2b581773db0a9ae454dab

2ff5 Branch:nightly (Windows 7)

[07:40:42] [DEBUG]::MAIN: Connecting to utorrent: http://localhost:8082/gui/

[07:40:42] [INFO]::MAIN: #######################################################

##

[07:40:42] [INFO]::MAIN: ## ..::[TorrentToMedia.py]::.. ##

[07:40:42] [INFO]::MAIN: #######################################################

##

[07:40:42] [DEBUG]::MAIN: Options passed into TorrentToMedia: ['C:\\nzbToMedia-G

IT\\nzbToMedia\\TorrentToMedia.py']

[07:40:42] [WARNING]::MAIN: Invalid number of arguments received from client, Sw

itching to manual run mode ...

[07:40:42] [DEBUG]::MAIN: No directories identified in CouchPotato:movie for pos

t-processing

[07:40:42] [INFO]::MAIN: Searching C:\Video\link_w_torrent_download\couchpotato_

 for mediafiles to post-process ...

[07:40:42] [DEBUG]::MAIN: Found file Thumbs.db in root directory C:\Video\link_w

_torrent_download\couchpotato_.

[07:40:42] [INFO]::COPYLINK: MEDIAFILE: [Thumbs.db]

[07:40:43] [INFO]::COPYLINK: SOURCE FOLDER: [C:\Video\link_w_torrent_download\co

uchpotato_]

[07:40:43] [INFO]::COPYLINK: TARGET FOLDER: [C:\Video\link_w_torrent_download\co

uchpotato_\Thumbs]

[07:40:43] [INFO]::COPYLINK: MEDIAFILE already exists in the TARGET folder, skip

ping ...

[07:40:43] [INFO]::MAIN: Starting manual run for CouchPotato:couchpotato_ - Fold

er:C:\Video\link_w_torrent_download\couchpotato_\Thumbs

[07:40:43] [INFO]::MAIN: Checking database for download info for Thumbs ...

[07:40:43] [INFO]::MAIN: Unable to locate download info for Thumbs, continuing t

o try and process this release ...

[07:40:43] [DEBUG]::MAIN: Received Directory: C:\Video\link_w_torrent_download\c

ouchpotato_\Thumbs | Name: Thumbs | Category: couchpotato_

[07:40:43] [DEBUG]::MAIN: SEARCH: Found Category: couchpotato_ in directory stru

cture

[07:40:43] [INFO]::MAIN: SEARCH: Found a unique directory Thumbs in the category

 directory

[07:40:43] [DEBUG]::MAIN: Determined Directory: C:\Video\link_w_torrent_download

\couchpotato_\Thumbs | Name: Thumbs | Category: couchpotato_

[07:40:43] [INFO]::MAIN: Auto-detected SECTION:CouchPotato

[07:40:43] [INFO]::MAIN: Output directory set to: C:\Video\link_w_torrent_downlo

ad\couchpotato_\Thumbs

[07:40:43] [DEBUG]::MAIN: Scanning files in directory: C:\Video\link_w_torrent_d

ownload\couchpotato_\Thumbs

[07:40:43] [DEBUG]::MAIN: Found 0 files in C:\Video\link_w_torrent_download\couc

hpotato_\Thumbs

[07:40:43] [DEBUG]::MAIN: Checking for archives to extract in directory: C:\Vide

o\link_w_torrent_download\couchpotato_\Thumbs

[07:40:43] [INFO]::MAIN: FLATTEN: Flattening directory: C:\Video\link_w_torrent_

download\couchpotato_\Thumbs

[07:40:43] [DEBUG]::MAIN: Checking for empty folders in:C:\Video\link_w_torrent_

download\couchpotato_\Thumbs

[07:40:43] [WARNING]::MAIN: Found no media files in C:\Video\link_w_torrent_down

load\couchpotato_\Thumbs

[07:40:43] [INFO]::MAIN: Calling CouchPotato:couchpotato_ to post-process:Thumbs

 

Traceback (most recent call last):

  File "C:\nzbToMedia-GIT\nzbToMedia\TorrentToMedia.py", line 323, in <module>

    exit(main(sys.argv))

  File "C:\nzbToMedia-GIT\nzbToMedia\TorrentToMedia.py", line 308, in main

    clientAgent)

  File "C:\nzbToMedia-GIT\nzbToMedia\TorrentToMedia.py", line 206, in processTor

rent

    inputCategory)

  File "C:\nzbToMedia-GIT\nzbToMedia\nzbtomedia\autoProcess\autoProcessMovie.py"

, line 106, in process

    delete_failed = int(nzbtomedia.CFG[section][inputCategory]["delete_failed"])

 

TypeError: int() argument must be a string or a number, not 'Section'

 

C:\nzbToMedia-GIT\nzbToMedia>
clinton-hall commented 10 years ago

ok.. please set

[CouchPotato]
    [[couchpotato_]]
        delete_failed = 0

then try a manual process again.

clinton-hall commented 10 years ago

in fact... please copy the default section [[movie]] into [[couchpotato_]] So anything you haven't already set, just use the defaults... previously when I said what parameters to set, those were only the parameters that weren't default...

thesatman commented 10 years ago
my config :

[CouchPotato]

    #### autoProcessing for Movies

    #### movie - category that gets called for post-processing with CPS

    [[movie]]

        enabled = 0

        apikey = ""

        host = localhost

        port = 5050

        ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######

        ssl = 0

        web_root = ""

        # Enable/Disable linking for Torrents

        Torrent_NoLink = 0

        method = renamer

        delete_failed = 0

        wait_for = 2

        extract = 1

        # Set this to minimum required size to consider a media file valid (in MB)

        minSize = 0

        # Enable/Disable deleteing ignored files (samples and invalid media files)

        delete_ignored = 0

        ##### 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 = ""

    [[couchpotato_]]

        enabled = 1

        apikey = 4af235adae52473db2f1378a8dc508f3

        host = localhost

        port = 5050

        ssl = 0

        web_root = ""

        Torrent_NoLink = 0

        method = renamer

        delete_failed = 0

        wait_for = 2

        extract = 1

        remote_path = 1

        watch_dir = C:\Video\link_w_torrent_download

    [[film]]

        enabled = 1

        apikey = 4af235adae52473db2f1378a8dc508f3

        host = localhost

        port = 5050

        ssl = 0

        web_root = ""

        Torrent_NoLink = 1

        method = renamer

        delete_failed = 0

        wait_for = 2

        extract = 1

        minSize = 0

        delete_ignored = 0

        remote_path = 0

        watch_dir = ""

 

 

the output: (please note that something is creating a folder "thumbs" with file thumbs.db. In the process below you see that CP is getting movie information for thumbs ...). Other then that, is this what you are looking for?

 

     

    C:\nzbToMedia-GIT\nzbToMedia>C:\Python27\python.exe C:\nzbToMedia-GIT\nzbToMedia\TorrentToMedia.py

    [18:34:54] [INFO]::MAIN: Loading config from [C:\nzbToMedia-GIT\nzbToMedia\autoProcessMedia.cfg]

    [18:34:54] [INFO]::MAIN: Checking database structure...

    [18:34:54] [DEBUG]::MAIN: Checking Initial Schema database upgrade

    [18:34:54] [DEBUG]::MAIN: InitialSchema upgrade not required

    [18:34:54] [DEBUG]::MAIN: Checking if we can use git commands: "C:\Program Files (x86)\Git\bin\git.exe" version

    [18:34:54] [DEBUG]::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" version with your shell in C:\nzbToMedia-GI

    T\nzbToMedia

    [18:34:54] [DEBUG]::MAIN: git output: git version 1.9.4.msysgit.1

    [18:34:54] [DEBUG]::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" version : returned successful

    [18:34:54] [DEBUG]::MAIN: Using: "C:\Program Files (x86)\Git\bin\git.exe"

    [18:34:54] [DEBUG]::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" symbolic-ref -q HEAD with your shell in C:\

    nzbToMedia-GIT\nzbToMedia

    [18:34:54] [DEBUG]::MAIN: git output: refs/heads/nightly

    [18:34:54] [DEBUG]::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" symbolic-ref -q HEAD : returned successful

    [18:34:54] [INFO]::MAIN: Checking if git needs an update

    [18:34:54] [DEBUG]::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" rev-parse HEAD with your shell in C:\nzbToM

    edia-GIT\nzbToMedia

    [18:34:54] [DEBUG]::MAIN: git output: cb126c36444dafa2b581773db0a9ae454dab2ff5

    [18:34:54] [DEBUG]::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" rev-parse HEAD : returned successful

    [18:34:54] [DEBUG]::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" fetch origin with your shell in C:\nzbToMed

    ia-GIT\nzbToMedia

    [18:34:57] [DEBUG]::MAIN: git output:

    [18:34:57] [DEBUG]::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" fetch origin : returned successful

    [18:34:57] [DEBUG]::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" rev-parse --verify --quiet "@{upstream}" wi

    th your shell in C:\nzbToMedia-GIT\nzbToMedia

    [18:34:57] [DEBUG]::MAIN: git output: cb126c36444dafa2b581773db0a9ae454dab2ff5

    [18:34:57] [DEBUG]::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" rev-parse --verify --quiet "@{upstream}" : returned s

    uccessful

    [18:34:57] [DEBUG]::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" rev-list --left-right "@{upstream}"...HEAD

    with your shell in C:\nzbToMedia-GIT\nzbToMedia

    [18:34:57] [DEBUG]::MAIN: git output:

    [18:34:57] [DEBUG]::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" rev-list --left-right "@{upstream}"...HEAD : returned

     successful

    [18:34:57] [DEBUG]::MAIN: cur_commit = cb126c36444dafa2b581773db0a9ae454dab2ff5 % (newest_commit)= cb126c36444dafa2b5817

    73db0a9ae454dab2ff5, num_commits_behind = 0, num_commits_ahead = 0

    [18:34:57] [INFO]::MAIN: No update needed

    [18:34:57] [INFO]::MAIN: nzbToMedia Version:cb126c36444dafa2b581773db0a9ae454dab2ff5 Branch:nightly (Windows 7)

    [18:34:57] [DEBUG]::MAIN: Connecting to utorrent: http://localhost:8082/gui/

    [18:34:57] [INFO]::MAIN: #########################################################

    [18:34:57] [INFO]::MAIN: ## ..::[TorrentToMedia.py]::.. ##

    [18:34:57] [INFO]::MAIN: #########################################################

    [18:34:57] [DEBUG]::MAIN: Options passed into TorrentToMedia: ['C:\\nzbToMedia-GIT\\nzbToMedia\\TorrentToMedia.py']

    [18:34:57] [WARNING]::MAIN: Invalid number of arguments received from client, Switching to manual run mode ...

    [18:34:57] [DEBUG]::MAIN: No directories identified in CouchPotato:movie for post-processing

    [18:34:57] [INFO]::MAIN: Searching C:\Video\link_w_torrent_download\couchpotato_ for mediafiles to post-process ...

    [18:34:57] [DEBUG]::MAIN: Found file Thumbs.db in root directory C:\Video\link_w_torrent_download\couchpotato_.

    [18:34:57] [INFO]::COPYLINK: MEDIAFILE: [Thumbs.db]

    [18:34:57] [INFO]::COPYLINK: SOURCE FOLDER: [C:\Video\link_w_torrent_download\couchpotato_]

    [18:34:57] [INFO]::COPYLINK: TARGET FOLDER: [C:\Video\link_w_torrent_download\couchpotato_\Thumbs]

    [18:34:58] [INFO]::COPYLINK: Hard linking SOURCE MEDIAFILE -> TARGET FOLDER

    [18:34:58] [INFO]::MAIN: Starting manual run for CouchPotato:couchpotato_ - Folder:C:\Video\link_w_torrent_download\couc

    hpotato_\Thumbs

    [18:34:58] [INFO]::MAIN: Checking database for download info for Thumbs ...

    [18:34:58] [INFO]::MAIN: Unable to locate download info for Thumbs, continuing to try and process this release ...

    [18:34:58] [DEBUG]::MAIN: Received Directory: C:\Video\link_w_torrent_download\couchpotato_\Thumbs | Name: Thumbs | Cate

    gory: couchpotato_

    [18:34:58] [DEBUG]::MAIN: SEARCH: Found Category: couchpotato_ in directory structure

    [18:34:58] [INFO]::MAIN: SEARCH: Found a unique directory Thumbs in the category directory

    [18:34:58] [DEBUG]::MAIN: Determined Directory: C:\Video\link_w_torrent_download\couchpotato_\Thumbs | Name: Thumbs | Ca

    tegory: couchpotato_

    [18:34:58] [INFO]::MAIN: Auto-detected SECTION:CouchPotato

    [18:34:58] [INFO]::MAIN: Output directory set to: C:\Video\link_w_torrent_download\couchpotato_\Thumbs

    [18:34:58] [DEBUG]::MAIN: Scanning files in directory: C:\Video\link_w_torrent_download\couchpotato_\Thumbs

    [18:34:58] [DEBUG]::MAIN: Found 0 files in C:\Video\link_w_torrent_download\couchpotato_\Thumbs

    [18:34:58] [DEBUG]::MAIN: Checking for archives to extract in directory: C:\Video\link_w_torrent_download\couchpotato_\T

    humbs

    [18:34:58] [INFO]::MAIN: FLATTEN: Flattening directory: C:\Video\link_w_torrent_download\couchpotato_\Thumbs

    [18:34:58] [DEBUG]::MAIN: Checking for empty folders in:C:\Video\link_w_torrent_download\couchpotato_\Thumbs

    [18:34:58] [WARNING]::MAIN: Found no media files in C:\Video\link_w_torrent_download\couchpotato_\Thumbs

    [18:34:58] [INFO]::MAIN: Calling CouchPotato:couchpotato_ to post-process:Thumbs

    [18:34:59] [INFO]::MAIN: Attemping imdbID lookup for Thumbs

    [18:34:59] [INFO]::MAIN: Searching folder and file names for imdbID ...

    [18:34:59] [INFO]::MAIN: Searching IMDB for imdbID ...

    [18:34:59] [DEBUG]::MAIN: Opening URL: http://www.omdbapi.com

    [18:35:00] [INFO]::MAIN: Found imdbID [tt2058117]

    [18:35:00] [DEBUG]::MAIN: Opening URL: http://localhost:5050/api/4af235adae52473db2f1378a8dc508f3/media.get with PARAMS:

     {'id': u'tt2058117'}

    [18:35:01] [ERROR]::MAIN: no media found for id tt2058117

    [18:35:01] [WARNING]::COUCHPOTATO: No media files found in directory C:\Video\link_w_torrent_download\couchpotato_\Thumb

    s to manually process.

    [18:35:01] [INFO]::CLEANDIRS: Directory C:\Video\link_w_torrent_download\couchpotato_\Thumbs has been processed, removin

    g ...

    Traceback (most recent call last):

      File "C:\nzbToMedia-GIT\nzbToMedia\TorrentToMedia.py", line 323, in <module>

        exit(main(sys.argv))

      File "C:\nzbToMedia-GIT\nzbToMedia\TorrentToMedia.py", line 308, in main

        clientAgent)

      File "C:\nzbToMedia-GIT\nzbToMedia\TorrentToMedia.py", line 233, in processTorrent

        nzbtomedia.cleanDir(outputDestination, sectionName, inputCategory)

      File "C:\nzbToMedia-GIT\nzbToMedia\nzbtomedia\nzbToMediaUtil.py", line 655, in cleanDir

        logger.error("Unable to delete directory %s" % (dirName))

    NameError: global name 'dirName' is not defined

     

    C:\nzbToMedia-GIT\nzbToMedia>
clinton-hall commented 10 years ago

ok, that last error was a mistake at my end. this is now fixed. So if your git is working, running again should now go on to try the next folder after Thumbs... In theory, this probably should work if called from utorrent now.

The whole issue with Thumbs directory comes from Windows. If you browse to look at the folder in explorer, the thumbs.db is created. at the end of the day this shouldn't cause any issues for auto postprocessing, and in the manual runs (now that I have fixed the error above, this should just skip the file and go on to the movie files.

thesatman commented 10 years ago
Running the same command again. I see I am 1 commit behind. How do I update the nightly?
clinton-hall commented 10 years ago

ah... missed that

[General]
    auto_update = 1

then run manually and it should update.

otherwise, cd into the directory and issue git pull

thesatman commented 10 years ago
System crash... Ran the command at 07:40 and left my desk. When I came back the system was not responsive. I looked at the VM Sphere control panel and saw that for this particular VM running NzbToMedia the CPU spiked of the charts since 07:40. It had been doing so for over 30 minutes, so had to reboot.

 

When looking at the nzbToMedia log it looks like it was as if the script was going in a loop.

 

        2014-09-09 07:40:53 INFO    ::MAIN: nzbToMedia Version:71d740e14e3ba075038057ca0f96c1ee47ebe1a2 Branch:nightly (Windows 7)

        2014-09-09 07:40:53 DEBUG   ::MAIN: Connecting to utorrent: http://localhost:8082/gui/

        2014-09-09 07:40:53 INFO    ::MAIN: #########################################################

        2014-09-09 07:40:53 INFO    ::MAIN: ## ..::[TorrentToMedia.py]::.. ##

        2014-09-09 07:40:53 INFO    ::MAIN: #########################################################

        2014-09-09 07:40:53 DEBUG   ::MAIN: Options passed into TorrentToMedia: ['C:\\nzbToMedia-GIT\\nzbToMedia\\TorrentToMedia.py']

        2014-09-09 07:40:53 WARNING ::MAIN: Invalid number of arguments received from client, Switching to manual run mode ...

        2014-09-09 07:40:53 DEBUG   ::MAIN: No directories identified in CouchPotato:movie for post-processing

        2014-09-09 07:40:53 INFO    ::MAIN: Searching C:\Video\link_w_torrent_download\couchpotato_ for mediafiles to post-process ...

        2014-09-09 07:40:53 DEBUG   ::MAIN: Found file Thumbs.db in root directory C:\Video\link_w_torrent_download\couchpotato_.

        2014-09-09 07:40:53 INFO    ::COPYLINK: MEDIAFILE: [Thumbs.db]

        2014-09-09 07:40:53 INFO    ::COPYLINK: SOURCE FOLDER: [C:\Video\link_w_torrent_download\couchpotato_]

        2014-09-09 07:40:53 INFO    ::COPYLINK: TARGET FOLDER: [C:\Video\link_w_torrent_download\couchpotato_\Thumbs]

        2014-09-09 07:40:53 INFO    ::COPYLINK: MEDIAFILE already exists in the TARGET folder, skipping ...

        2014-09-09 07:40:53 INFO    ::MAIN: Starting manual run for CouchPotato:couchpotato_ - Folder:C:\Video\link_w_torrent_download\couchpotato_\Thumbs

        2014-09-09 07:40:53 INFO    ::MAIN: Checking database for download info for Thumbs ...

        2014-09-09 07:40:53 INFO    ::MAIN: Unable to locate download info for Thumbs, continuing to try and process this release ...

        2014-09-09 07:40:54 DEBUG   ::MAIN: Received Directory: C:\Video\link_w_torrent_download\couchpotato_\Thumbs | Name: Thumbs | Category: couchpotato_

        2014-09-09 07:40:54 DEBUG   ::MAIN: SEARCH: Found Category: couchpotato_ in directory structure

        2014-09-09 07:40:54 INFO    ::MAIN: SEARCH: Found a unique directory Thumbs in the category directory

        2014-09-09 07:40:54 DEBUG   ::MAIN: Determined Directory: C:\Video\link_w_torrent_download\couchpotato_\Thumbs | Name: Thumbs | Category: couchpotato_

        2014-09-09 07:40:54 INFO    ::MAIN: Auto-detected SECTION:CouchPotato

        2014-09-09 07:40:54 INFO    ::MAIN: Output directory set to: C:\Video\link_w_torrent_download\couchpotato_\Thumbs

        2014-09-09 07:40:54 DEBUG   ::MAIN: Scanning files in directory: C:\Video\link_w_torrent_download\couchpotato_\Thumbs

        2014-09-09 07:40:54 DEBUG   ::MAIN: Found 0 files in C:\Video\link_w_torrent_download\couchpotato_\Thumbs

        2014-09-09 07:40:54 DEBUG   ::MAIN: Checking for archives to extract in directory: C:\Video\link_w_torrent_download\couchpotato_\Thumbs

        2014-09-09 07:40:54 INFO    ::MAIN: FLATTEN: Flattening directory: C:\Video\link_w_torrent_download\couchpotato_\Thumbs

        2014-09-09 07:40:54 DEBUG   ::MAIN: Checking for empty folders in:C:\Video\link_w_torrent_download\couchpotato_\Thumbs

        2014-09-09 07:40:54 WARNING ::MAIN: Found no media files in C:\Video\link_w_torrent_download\couchpotato_\Thumbs

        2014-09-09 07:40:54 INFO    ::MAIN: Calling CouchPotato:couchpotato_ to post-process:Thumbs

        2014-09-09 07:40:55 INFO    ::MAIN: Attemping imdbID lookup for Thumbs

        2014-09-09 07:40:55 INFO    ::MAIN: Searching folder and file names for imdbID ...

        2014-09-09 07:40:55 INFO    ::MAIN: Searching IMDB for imdbID ...

        2014-09-09 07:40:56 DEBUG   ::MAIN: Opening URL: http://www.omdbapi.com

        2014-09-09 07:40:56 INFO    ::MAIN: Found imdbID [tt1234567]

        2014-09-09 07:40:56 DEBUG   ::MAIN: Opening URL: http://localhost:5050/api/4af235adae52473db2f1378a8dc508f3/media.get with PARAMS: {'id': u'tt1234567'}

        2014-09-09 07:40:58 ERROR   ::MAIN: no media found for id tt1234567

        2014-09-09 07:40:58 WARNING ::COUCHPOTATO: No media files found in directory C:\Video\link_w_torrent_download\couchpotato_\Thumbs to manually process.

        2014-09-09 07:40:58 INFO    ::CLEANDIRS: Directory C:\Video\link_w_torrent_download\couchpotato_\Thumbs has been processed, removing ...

        2014-09-09 07:40:58 INFO    ::MAIN: Starting manual run for CouchPotato:couchpotato_ - Folder:C:\Video\link_w_torrent_download\couchpotato_\movie_name

        2014-09-09 07:40:58 INFO    ::MAIN: Checking database for download info for movie_name ...

        2014-09-09 07:40:58 INFO    ::MAIN: Found download info for movie_name, setting variables now ...

        2014-09-09 07:40:58 DEBUG   ::MAIN: Received Directory: C:\Video\link_w_torrent_download\couchpotato_\movie_name | Name: movie_name | Category: couchpotato_

        2014-09-09 07:40:58 DEBUG   ::MAIN: SEARCH: Found Category: couchpotato_ in directory structure

        2014-09-09 07:40:58 INFO    ::MAIN: SEARCH: Found a unique directory movie_name in the category directory

        2014-09-09 07:40:58 DEBUG   ::MAIN: Determined Directory: C:\Video\link_w_torrent_download\couchpotato_\movie_name | Name: movie_name | Category: couchpotato_

        2014-09-09 07:40:58 INFO    ::MAIN: Auto-detected SECTION:CouchPotato

        2014-09-09 07:40:58 DEBUG   ::MAIN: Stopping torrent movie_name in utorrent while processing

        2014-09-09 07:41:03 INFO    ::MAIN: Output directory set to: C:\Video\link_w_torrent_download\couchpotato_\movie_name

        2014-09-09 07:41:03 DEBUG   ::MAIN: Scanning files in directory: C:\Video\link_w_torrent_download\couchpotato_\movie_name

        2014-09-09 07:41:04 DEBUG   ::MAIN: Found 5 files in C:\Video\link_w_torrent_download\couchpotato_\movie_name

        2014-09-09 07:41:04 INFO    ::COPYLINK: MEDIAFILE: [movie_name.avi]

        2014-09-09 07:41:04 INFO    ::COPYLINK: SOURCE FOLDER: [C:\Video\link_w_torrent_download\couchpotato_\movie_name]

        2014-09-09 07:41:04 INFO    ::COPYLINK: TARGET FOLDER: [C:\Video\link_w_torrent_download\couchpotato_\movie_name]

        2014-09-09 07:41:04 INFO    ::COPYLINK: SOURCE AND TARGET files are the same, skipping ...

        2014-09-09 07:41:04 INFO    ::COPYLINK: MEDIAFILE: [www.Film-Test.nl.JPG]

        2014-09-09 07:41:04 INFO    ::COPYLINK: SOURCE FOLDER: [C:\Video\link_w_torrent_download\couchpotato_\movie_name]

        2014-09-09 07:41:04 INFO    ::COPYLINK: TARGET FOLDER: [C:\Video\link_w_torrent_download\couchpotato_\movie_name]

        2014-09-09 07:41:04 INFO    ::COPYLINK: SOURCE AND TARGET files are the same, skipping ...

        2014-09-09 07:41:04 DEBUG   ::MAIN: Read only mode on file C:\Video\link_w_torrent_download\couchpotato_\movie_name\www.Film-Test.nl.JPG Will try to make it writeable

        2014-09-09 07:41:04 INFO    ::COPYLINK: MEDIAFILE: [movie_name.jpg]

        2014-09-09 07:41:04 INFO    ::COPYLINK: SOURCE FOLDER: [C:\Video\link_w_torrent_download\couchpotato_\movie_name]

        2014-09-09 07:41:04 INFO    ::COPYLINK: TARGET FOLDER: [C:\Video\link_w_torrent_download\couchpotato_\movie_name]

        2014-09-09 07:41:04 INFO    ::COPYLINK: SOURCE AND TARGET files are the same, skipping ...

        2014-09-09 07:41:04 DEBUG   ::MAIN: Read only mode on file C:\Video\link_w_torrent_download\couchpotato_\movie_name\movie_name.jpg Will try to make it writeable

        2014-09-09 07:41:04 INFO    ::COPYLINK: MEDIAFILE: [www.Film-Test.nl.JPG]

        2014-09-09 07:41:04 INFO    ::COPYLINK: SOURCE FOLDER: [C:\Video\link_w_torrent_download\couchpotato_\movie_name\Cover]

        2014-09-09 07:41:04 INFO    ::COPYLINK: TARGET FOLDER: [C:\Video\link_w_torrent_download\couchpotato_\movie_name]

        2014-09-09 07:41:04 INFO    ::COPYLINK: MEDIAFILE already exists in the TARGET folder, skipping ...

        2014-09-09 07:41:04 INFO    ::COPYLINK: MEDIAFILE: [movie_name.jpg]

        2014-09-09 07:41:04 INFO    ::COPYLINK: SOURCE FOLDER: [C:\Video\link_w_torrent_download\couchpotato_\movie_name\Cover]

        2014-09-09 07:41:04 INFO    ::COPYLINK: TARGET FOLDER: [C:\Video\link_w_torrent_download\couchpotato_\movie_name]

        2014-09-09 07:41:05 INFO    ::COPYLINK: MEDIAFILE already exists in the TARGET folder, skipping ...

        2014-09-09 07:41:05 DEBUG   ::MAIN: Checking for archives to extract in directory: C:\Video\link_w_torrent_download\couchpotato_\movie_name

        2014-09-09 07:41:05 INFO    ::MAIN: FLATTEN: Flattening directory: C:\Video\link_w_torrent_download\couchpotato_\movie_name

         

         

        And here the loging stopped ...
thesatman commented 10 years ago
FYI : Windows Defender Alert: Level: medium

Detected Tool:Win32/Hideproc.C 

Resources: C:\nzbToMedia-GIT\nzbToMedia\nzbtomedia\extractor\bin\chp.exe
clinton-hall commented 10 years ago

yes, the windows defender alert is because I bundle chp.exe which is used to perform the 7zip extraction in the background (if you are running on your HTPC you don't want a command window opening on top of your movie...). Because this launches a process as hidden, is is considered a risk as it could allow a process to be spawned without your knowing.

I am confident the actual file itself is safe. However you can delete chp.exe and the script will still run fine with a command window while extracting.

For the other issue. it looks like the script is running, so try a download and see how a single movie is processed (doing a manual run will use a lot of process as it tries to process your entire download complete list.

thesatman commented 10 years ago
Not out of the woods yet ... any idea what is going on? The torrent was finnished. A black command window popped up, and closed. The movie was not moved to the media server folder "filmer". So I tried with a manual run.

My findings:

    the input folder and the output folder are the same according to your settings. Can this be correct?

    The cml output ends with an error saying that C:\\Video\\link_w_torrent_download\\couchpotato_\\movie_name\\2000 movie_name.avi can not be found. But the file is there. Do note the "2000" in the movie name, which is not included in the folder name. In this case it is bad file naming as 2000 stands for the year of release.

    What happens if I start a torrent manually, and give it the label "couchpotato_". Will it still be treated correctly so that CouchPotato picks it up and adds it to the list?

Here is the output from the command line:

 

C:\nzbToMedia-GIT\nzbToMedia>C:\Python27\python.exe C:\nzbToMedia-GIT\nzbToMedia\TorrentToMedia.py

[23:13:58] [INFO]::MAIN: Loading config from [C:\nzbToMedia-GIT\nzbToMedia\autoProcessMedia.cfg]

[23:13:58] [INFO]::MAIN: Checking database structure...

[23:13:58] [DEBUG]::MAIN: Checking Initial Schema database upgrade

[23:13:58] [DEBUG]::MAIN: InitialSchema upgrade not required

[23:13:58] [DEBUG]::MAIN: Checking if we can use git commands: "C:\Program Files (x86)\Git\bin\git.exe" version

[23:13:58] [DEBUG]::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" version with your shell in C:\nzbToMedia-GI

T\nzbToMedia

[23:13:59] [DEBUG]::MAIN: git output: git version 1.9.4.msysgit.1

[23:13:59] [DEBUG]::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" version : returned successful

[23:13:59] [DEBUG]::MAIN: Using: "C:\Program Files (x86)\Git\bin\git.exe"

[23:13:59] [DEBUG]::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" symbolic-ref -q HEAD with your shell in C:\

nzbToMedia-GIT\nzbToMedia

[23:13:59] [DEBUG]::MAIN: git output: refs/heads/nightly

[23:13:59] [DEBUG]::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" symbolic-ref -q HEAD : returned successful

[23:13:59] [INFO]::MAIN: Checking if git needs an update

[23:13:59] [DEBUG]::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" rev-parse HEAD with your shell in C:\nzbToM

edia-GIT\nzbToMedia

[23:13:59] [DEBUG]::MAIN: git output: 71d740e14e3ba075038057ca0f96c1ee47ebe1a2

[23:13:59] [DEBUG]::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" rev-parse HEAD : returned successful

[23:13:59] [DEBUG]::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" fetch origin with your shell in C:\nzbToMed

ia-GIT\nzbToMedia

[23:14:05] [DEBUG]::MAIN: git output:

[23:14:05] [DEBUG]::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" fetch origin : returned successful

[23:14:05] [DEBUG]::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" rev-parse --verify --quiet "@{upstream}" wi

th your shell in C:\nzbToMedia-GIT\nzbToMedia

[23:14:05] [DEBUG]::MAIN: git output: 71d740e14e3ba075038057ca0f96c1ee47ebe1a2

[23:14:05] [DEBUG]::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" rev-parse --verify --quiet "@{upstream}" : returned s

uccessful

[23:14:05] [DEBUG]::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" rev-list --left-right "@{upstream}"...HEAD

with your shell in C:\nzbToMedia-GIT\nzbToMedia

[23:14:05] [DEBUG]::MAIN: git output:

[23:14:05] [DEBUG]::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" rev-list --left-right "@{upstream}"...HEAD : returned

 successful

[23:14:05] [DEBUG]::MAIN: cur_commit = 71d740e14e3ba075038057ca0f96c1ee47ebe1a2 % (newest_commit)= 71d740e14e3ba07503805

7ca0f96c1ee47ebe1a2, num_commits_behind = 0, num_commits_ahead = 0

[23:14:05] [INFO]::MAIN: No update needed

[23:14:05] [INFO]::MAIN: nzbToMedia Version:71d740e14e3ba075038057ca0f96c1ee47ebe1a2 Branch:nightly (Windows 7)

[23:14:05] [DEBUG]::MAIN: Connecting to utorrent: http://localhost:8082/gui/

[23:14:05] [INFO]::MAIN: #########################################################

[23:14:05] [INFO]::MAIN: ## ..::[TorrentToMedia.py]::.. ##

[23:14:05] [INFO]::MAIN: #########################################################

[23:14:05] [DEBUG]::MAIN: Options passed into TorrentToMedia: ['C:\\nzbToMedia-GIT\\nzbToMedia\\TorrentToMedia.py']

[23:14:05] [WARNING]::MAIN: Invalid number of arguments received from client, Switching to manual run mode ...

[23:14:05] [DEBUG]::MAIN: No directories identified in CouchPotato:movie for post-processing

[23:14:05] [INFO]::MAIN: Searching C:\Video\link_w_torrent_download\couchpotato_ for mediafiles to post-process ...

[23:14:05] [DEBUG]::MAIN: Found file 2000 movie_name.avi in root directory C:\Video\link_w_torrent_dow

nload\couchpotato_.

[23:14:13] [INFO]::COPYLINK: MEDIAFILE: [2000 movie_name.avi]

[23:14:13] [INFO]::COPYLINK: SOURCE FOLDER: [C:\Video\link_w_torrent_download\couchpotato_]

[23:14:13] [INFO]::COPYLINK: TARGET FOLDER: [C:\Video\link_w_torrent_download\couchpotato_\movie_name]

 

[23:14:13] [INFO]::COPYLINK: Hard linking SOURCE MEDIAFILE -> TARGET FOLDER

[23:14:13] [DEBUG]::MAIN: Found file Thumbs.db in root directory C:\Video\link_w_torrent_download\couchpotato_.

[23:14:13] [INFO]::COPYLINK: MEDIAFILE: [Thumbs.db]

[23:14:13] [INFO]::COPYLINK: SOURCE FOLDER: [C:\Video\link_w_torrent_download\couchpotato_]

[23:14:13] [INFO]::COPYLINK: TARGET FOLDER: [C:\Video\link_w_torrent_download\couchpotato_\Thumbs]

[23:14:13] [INFO]::COPYLINK: MEDIAFILE already exists in the TARGET folder, skipping ...

[23:14:13] [INFO]::MAIN: Starting manual run for CouchPotato:couchpotato_ - Folder:C:\Video\link_w_torrent_download\couc

hpotato_\movie_name

[23:14:13] [INFO]::MAIN: Checking database for download info for movie_name ...

[23:14:13] [INFO]::MAIN: Unable to locate download info for movie_name, continuing to try and process

this release ...

[23:14:13] [DEBUG]::MAIN: Received Directory: C:\Video\link_w_torrent_download\couchpotato_\movie_name

 | Name: movie_name | Category: couchpotato_

[23:14:13] [DEBUG]::MAIN: SEARCH: Found Category: couchpotato_ in directory structure

[23:14:13] [INFO]::MAIN: SEARCH: Found a unique directory movie_name in the category directory

[23:14:13] [DEBUG]::MAIN: Determined Directory: C:\Video\link_w_torrent_download\couchpotato_\movie_name | Name: movie_name | Category: couchpotato_

[23:14:13] [INFO]::MAIN: Auto-detected SECTION:CouchPotato

[23:14:14] [INFO]::MAIN: Output directory set to: C:\Video\link_w_torrent_download\couchpotato_\movie_name

[23:14:14] [DEBUG]::MAIN: Scanning files in directory: C:\Video\link_w_torrent_download\couchpotato_\movie_name

Traceback (most recent call last):

  File "C:\nzbToMedia-GIT\nzbToMedia\TorrentToMedia.py", line 323, in <module>

    exit(main(sys.argv))

  File "C:\nzbToMedia-GIT\nzbToMedia\TorrentToMedia.py", line 308, in main

    clientAgent)

  File "C:\nzbToMedia-GIT\nzbToMedia\TorrentToMedia.py", line 126, in processTorrent

    inputFiles = nzbtomedia.listMediaFiles(inputDirectory)

  File "C:\nzbToMedia-GIT\nzbToMedia\nzbtomedia\nzbToMediaUtil.py", line 834, in listMediaFiles

    if is_sample(fullCurFile) or not is_minSize(fullCurFile, minSize):

  File "C:\nzbToMedia-GIT\nzbToMedia\nzbtomedia\nzbToMediaUtil.py", line 181, in is_minSize

    inputSize = os.path.getsize(inputName)

  File "C:\Python27\lib\genericpath.py", line 49, in getsize

    return os.stat(filename).st_size

WindowsError: [Error 2] The system cannot find the file specified: 'C:\\Video\\link_w_torrent_download\\couchpotato_\\movie_name\\2000 movie_name.avi'

 

C:\nzbToMedia-GIT\nzbToMedia>
clinton-hall commented 10 years ago

I thought this might be related to the space in the file name, but I just can't reproduce this.

Can you perhaps email me the full log with the actual movie name? Show the log from the automatic run and the manual run.

If you start a download manually and add the couchpotato_ label then yes, this will be processed as though it was a CouchPotato download.

clinton-hall commented 10 years ago

this last change should allow the script to continue and ignore this error... I'm not sure what will happen after this...

thesatman commented 10 years ago
Before we look at anything else, please can you confirm if this is correct? input and output directory are the same, shouldn't this be another folder?

 

2014-09-10 00:22:33 INFO    ::COPYLINK: SOURCE FOLDER: [C:\Video\link_w_torrent_download\couchpotato_\Barbie of Swan Lake (2003) DVD5 Retail Subs Ned.Eng.Fr. TBS]

2014-09-10 00:22:33 INFO    ::COPYLINK: TARGET FOLDER: [C:\Video\link_w_torrent_download\couchpotato_\Barbie of Swan Lake (2003) DVD5 Retail Subs Ned.Eng.Fr. TBS]

2014-09-10 00:22:33 INFO    ::COPYLINK: SOURCE AND TARGET files are the same, skipping ...

 
clinton-hall commented 10 years ago

Since you are not continuing to seed, this doesn't actually matter... if it gets to the point SickBeard/CouchPotato process the file, then it will move the files from here anyway.

if you want, you can set

[Torrent]
    outputDirectory = C:\Video\link_w_torrent_download\processed
    useLink = hard

Since this location is a link, I'm not sure if the link itself will work... try and see what happens. It should link to this location, then process from that location, and if successful delete the original.

thesatman commented 10 years ago
After a new uTorrent download I saw a black popup, then nothing. Nothing in the log file either... So I did a manual run and used the same parameters that are entered in uTorrent "run script ..."

 

 

C:\nzbToMedia-GIT\nzbToMedia>C:\nzbToMedia-GIT\nzbToMedia\TorrentToMedia.py "C:\Video\link_w_torrent_download\couchpotat

o_" "Silent Fall (1994).avi" "couchpotato_" "04F79CAE438D9B0F8EE3464DA537294EE4E10F91"

 

Traceback (most recent call last):

  File "C:\nzbToMedia-GIT\nzbToMedia\TorrentToMedia.py", line 7, in <module>

    import nzbtomedia

  File "C:\nzbToMedia-GIT\nzbToMedia\nzbtomedia\__init__.py", line 28, in <module>

    from nzbtomedia.autoProcess.autoProcessComics import autoProcessComics

  File "C:\nzbToMedia-GIT\nzbToMedia\nzbtomedia\autoProcess\autoProcessComics.py", line 6, in <module>

    from nzbtomedia.nzbToMediaUtil import convert_to_ascii, remoteDir, server_responding

  File "C:\nzbToMedia-GIT\nzbToMedia\nzbtomedia\nzbToMediaUtil.py", line 186

    logger.error("Failed to get file size for %s", % (inputName))

                                                   ^

SyntaxError: invalid syntax

 

C:\nzbToMedia-GIT\nzbToMedia>
clinton-hall commented 10 years ago

sorry for this. I made a typo yesterday, but fixed this before my last response above. since you had said "before we do anything else" i assumed you hadn't updated yet so I didn't mention this bug.

but alas you updated while there was a bug... please do a manual git pull and try again.

clinton-hall commented 10 years ago

Ok... So this is the first attempt at adding transcoding of .iso files and VIDEO_TS folders.

In order to do this in windows, you need to install Pismo File Mount Audit Package from http://www.pismotechnic.com/download/pfmap-171-win.exe

Once this is installed this should be found in your system path... Nothing additional is required for Linux.

If you have an .iso (or VIDEO_TS folder in either your SickBeard or CouchPotato categories, the transcoder should attempt to transcode these as per your transcoder settings. There is no-doubt a lot of testing required here.

as a start, I would suggest the following

[Transcoder]
    getSubs = 0
    subLanguages = eng
    transcode = 1
    duplicate = 1  ## let's do this for now to be sure we don't delete the original... once we know it works we can change
    ignoreExtensions = .avi,.mkv,.mp4 # add any other common download file types that you don't want transcoded.
    outputVideoPath = C:\Video\link_w_torrent_download\transcoded
    processOutput = 1
    audioLanguage = eng  ## set this as to your preference for primary audio language.
    allAudioLanguages = 1
    allSubLanguages =1
    embedSubs = 0
    burnInSubtitle = 0
    extractSubs = 0
    externalSubDir =
    hwAccel = 0
    generalOptions =
    outputDefault = mkv

All others, just leave as per defaults. Let me know how this gets on... of course, we probably want to get on top of your other issues first... but hey... this is here for testing.

thesatman commented 10 years ago
git pull : OK

new run. Still error. And input and output are still the same. Mistake on my end or something in the script?

[07:43:30] [INFO]::MAIN: nzbToMedia Version:2d1283e4bf7221e6d2b002553bf749e5d2a4e794 Branch:nightly (Windows 7)

[07:43:31] [DEBUG]::MAIN: Connecting to utorrent: http://localhost:8082/gui/

[07:43:31] [INFO]::MAIN: #########################################################

[07:43:31] [INFO]::MAIN: ## ..::[TorrentToMedia.py]::.. ##

[07:43:31] [INFO]::MAIN: #########################################################

[07:43:31] [DEBUG]::MAIN: Options passed into TorrentToMedia: ['C:\\nzbToMedia-GIT\\nzbToMedia\\TorrentToMedia.py', 'C:\

\Video\\link_w_torrent_download\\couchpotato_', 'Silent Fall (1994).avi', 'couchpotato_', '04F79CAE438D9B0F8EE3464DA5372

94EE4E10F91']

[07:43:31] [DEBUG]::MAIN: Adding TORRENT download info for directory C:\Video\link_w_torrent_download\couchpotato_ to da

tabase

[07:43:31] [DEBUG]::MAIN: Received Directory: C:\Video\link_w_torrent_download\couchpotato_ | Name: Silent Fall (1994).a

vi | Category: couchpotato_

[07:43:31] [DEBUG]::MAIN: SEARCH: Found Category: couchpotato_ in directory structure

[07:43:31] [INFO]::MAIN: SEARCH: Found torrent file Silent Fall (1994).avi in input directory directory C:\Video\link_w_

torrent_download\couchpotato_

[07:43:31] [INFO]::MAIN: SEARCH: Setting inputDirectory to C:\Video\link_w_torrent_download\couchpotato_\Silent Fall (19

94).avi

[07:43:31] [DEBUG]::MAIN: Determined Directory: C:\Video\link_w_torrent_download\couchpotato_\Silent Fall (1994).avi | N

ame: Silent Fall (1994).avi | Category: couchpotato_

[07:43:31] [INFO]::MAIN: Auto-detected SECTION:CouchPotato

[07:43:31] [DEBUG]::MAIN: Stopping torrent Silent Fall (1994).avi in utorrent while processing

[07:43:36] [INFO]::MAIN: Output directory set to: C:\Video\link_w_torrent_download\couchpotato_\Silent Fall (1994).avi

[07:43:37] [DEBUG]::MAIN: Scanning files in directory: C:\Video\link_w_torrent_download\couchpotato_\Silent Fall (1994).

avi

[07:43:37] [DEBUG]::MAIN: Found 1 files in C:\Video\link_w_torrent_download\couchpotato_\Silent Fall (1994).avi

[07:43:37] [INFO]::COPYLINK: MEDIAFILE: [Silent Fall (1994).avi]

[07:43:37] [INFO]::COPYLINK: SOURCE FOLDER: [C:\Video\link_w_torrent_download\couchpotato_]

[07:43:37] [INFO]::COPYLINK: TARGET FOLDER: [C:\Video\link_w_torrent_download\couchpotato_\Silent Fall (1994).avi]

[07:43:37] [INFO]::COPYLINK: SOURCE AND TARGET folders are the same, skipping ...

[07:43:37] [DEBUG]::MAIN: Checking for archives to extract in directory: C:\Video\link_w_torrent_download\couchpotato_\S

ilent Fall (1994).avi

[07:43:37] [INFO]::MAIN: FLATTEN: Flattening directory: C:\Video\link_w_torrent_download\couchpotato_\Silent Fall (1994)

.avi

[07:43:37] [ERROR]::FLATTEN: Could not flatten C:\Video\link_w_torrent_download\couchpotato_\Silent Fall (1994).avi

[07:43:37] [INFO]::MAIN: Found 1 media files in C:\Video\link_w_torrent_download\couchpotato_\Silent Fall (1994).avi

[07:43:37] [INFO]::MAIN: Calling CouchPotato:couchpotato_ to post-process:Silent Fall (1994).avi

[07:43:38] [INFO]::MAIN: Attemping imdbID lookup for Silent Fall (1994).avi

[07:43:38] [INFO]::MAIN: Searching folder and file names for imdbID ...

Traceback (most recent call last):

  File "C:\nzbToMedia-GIT\nzbToMedia\TorrentToMedia.py", line 323, in <module>

    exit(main(sys.argv))

  File "C:\nzbToMedia-GIT\nzbToMedia\TorrentToMedia.py", line 262, in main

    result = processTorrent(inputDirectory, inputName, inputCategory, inputHash, inputID, clientAgent)

  File "C:\nzbToMedia-GIT\nzbToMedia\TorrentToMedia.py", line 206, in processTorrent

    inputCategory)

  File "C:\nzbToMedia-GIT\nzbToMedia\nzbtomedia\autoProcess\autoProcessMovie.py", line 136, in process

    imdbid = find_imdbid(dirName, inputName)

  File "C:\nzbToMedia-GIT\nzbToMedia\nzbtomedia\nzbToMediaUtil.py", line 862, in find_imdbid

    for file in os.listdir(dirName):

WindowsError: [Error 267] The directory name is invalid: 'C:\\Video\\link_w_torrent_download\\couchpotato_\\Silent Fall

(1994).avi/*.*'

 

C:\nzbToMedia-GIT\nzbToMedia>