Help me understand ComicRN.py #44

Closed
CyberCowboy opened this Issue Oct 4, 2012 · 9 comments

Projects

None yet

3 participants

@CyberCowboy

Forgive me if I'm being stupid, I tried reading the other bug reports and within the script itself and I'm just not getting it. (I've successfully set up CouchPotato, and Sickbeard as well as another show torrenting software written by a friend so I'm not a complete newb to this)

First my system setup:
Ubuntu Server x64 12.04
Directory where I want comics to end up /mnt/samba/Comics/<title>
Directory containing Mylar: /home/bjames/mylar
Sabnzbd scripts directory (I had to create this, pointed Sab at it): /home/bjames/sabnzbd/scripts
Within the scripts dir I did a symlink to /home/bjames/mylar/sabnzbd/ComicRN.py just to make life easier to manage. Permissions on symlink are 777
Sabnzbd group is comics with directory being /mnt/samba/Comics/mylar
ComicRN.py reports in the text that version is 1.02.a (I saw some confusion as to if this is the current version or not)
Comdir = '/mnt/samba/Comics/'
mylaron = "yes"
repblank = "no"
remcrap = "yes"
comicyearopt = "yes"
zerosup = "2"

Sabnzbd is download the files and they are ending up in /mnt/samba/Comics/Mylar with each issue having it's own folder as shown:

/mnt/samba/Comics/mylar$ ls
Green Lantern New Guardians 6 (2011) (2012) Justice League 6 (2011) (2012)
Green Lantern New Guardians 8 (2011) (2012) Justice League 7 (2011) (2012)
Justice League 10 (2011) (2012) Justice League 8 (2011) (2012)
Justice League 11 (2011) (2012) Justice League 9 (2011) (2012)

Justice League 5 (2011) (2012)

Maybe my expectations are off, but I'd expect on the /mnt/samba/Comics to see for the 2 examples above a directory for Green Lantern New Guardians and Justice League with each individual title below that (possibly with a year directory then the individual issues)

@evilhero evilhero was assigned Oct 4, 2012
@evilhero
Owner
evilhero commented Oct 4, 2012

Well I'd like to first point out that I'm a complete newb at all of this - this is my first pet project, my first program (using python) as well as several other firsts because of Mylar.

But you are correct in your thinking, the way Mylar works is that if Rename Files is checked off in Mylar(and it is from your setup because you have 2 years being passed) it will create the folder structure as "Green Lantern New Guardians (2011)/Green Lantern New Guardians 6 (2012).cbr" Once it's done, it'll remove the download directory that SAB created in that instance (the sub-dirs you have now in the /mnt/samba/Comics/mylar dir).

The reason why your having problems thus far is that your ComicRN.py script is of an older version. Check in the /sabnzbd folder within the Mylar root (if you're running a recent commit), and the version should be v1.02.b as well as having a Settings Configuration displayed on each run (it'll show in the SABlog) along with some verbosity as to what it's doing (or attempting to do).

Give'r a try and let me know - you're not wrong in your thinking at all...although the script isn't setup to create a structure of Series/Year/Comic - yet!

@CyberCowboy

Major props for taking on somethign like this for a first project, I've
tried to learn programming over a dozen times (Python and others) and
always seem to fail

Where I was getting the 1.02.a was in the comments at the top of the
ComicRN.py (just mentioning this since I just went out and pulled it down
and it still says 1.02.a)

@evilhero
Owner
evilhero commented Oct 4, 2012

I'm still trying to figure out if I'm passing or failing on this one!

Yeah that was a typo on the version...when you run it it should display v1.02.b in the SAB run log for the downloaded item. If you are using the correct version, paste the log from SAB in here and I'll scope out the problem and see what's going on :)

@CyberCowboy

I'd say passing, if you have hints for how you managed to teach yourself
this much this quickly let me know (as I understand it you hadn't
programmed anything before, if you know other languages maybe that helped)

Here's the log (I think, if it's not the right one let me know)

2012-10-04 10:14:18,503::INFO::[assembler:87] Decoding
/home/bjames/Downloads/incomplete/64339249/Supergirl 003
(2011)(FBScan)(C2C).cbr yenc
2012-10-04 10:14:19,179::INFO::[init:885]
/home/bjames/Downloads/incomplete/64339249/ADMIN/SABnzbd_nzo_Xn7RRl
removed
2012-10-04 10:14:19,179::INFO::[nzbqueue:204] Saving queue
2012-10-04 10:14:19,179::INFO::[init:896] Saving data for queue9.sab
in /home/bjames/.sabnzbd/admin/queue9.sab
2012-10-04 10:14:19,179::INFO::[postproc:84] Saving postproc queue
2012-10-04 10:14:19,179::INFO::[init:896] Saving data for
postproc1.sab in /home/bjames/.sabnzbd/admin/postproc1.sab
2012-10-04 10:14:19,205::INFO::[postproc:268] Starting PostProcessing on
Supergirl 3 (2011) (2011) => Repair:True, Unpack:True, Delete:True,
Script:ComicRN.py, Cat:comics
2012-10-04 10:14:19,499::INFO::[downloader:643] Thread
5@news.usenetserver.com:119: forcing disconnect
2012-10-04 10:14:19,600::INFO::[downloader:643] Thread
3@news.usenetserver.com:119: forcing disconnect
2012-10-04 10:14:19,700::INFO::[downloader:643] Thread
2@news.usenetserver.com:119: forcing disconnect
2012-10-04 10:14:19,706::INFO::[postproc:534] Par2 check starting on
Supergirl 3 (2011) (2011)
2012-10-04 10:14:19,706::INFO::[postproc:585] No par2 sets for Supergirl 3
(2011) (2011)
2012-10-04 10:14:19,707::INFO::[misc:784] Creating directories:
/mnt/samba/Comics/mylar/Supergirl 3 (2011) (2011)
2012-10-04 10:14:19,707::INFO::[postproc:330] Running unpack_magic on
Supergirl 3 (2011) (2011)
2012-10-04 10:14:19,707::INFO::[postproc:332] unpack_magic finished on
Supergirl 3 (2011) (2011)
2012-10-04 10:14:19,801::INFO::[downloader:643] Thread
4@news.usenetserver.com:119: forcing disconnect
2012-10-04 10:14:19,901::INFO::[downloader:643] Thread
1@news.usenetserver.com:119: forcing disconnect
2012-10-04 10:14:20,417::INFO::[postproc:507] Cleaning up Supergirl 3
(2011) (2011) (keep_basic=False)
2012-10-04 10:14:20,418::INFO::[postproc:84] Saving postproc queue
2012-10-04 10:14:20,418::INFO::[init:896] Saving data for
postproc1.sab in /home/bjames/.sabnzbd/admin/postproc1.sab
2012-10-04 10:14:20,418::INFO::[downloader:243] Post-processing finished,
resuming download
2012-10-04 10:14:23,418::INFO::[nzbqueue:204] Saving queue
2012-10-04 10:14:23,419::INFO::[init:896] Saving data for queue9.sab

in /home/bjames/.sabnzbd/admin/queue

@CyberCowboy

Note: the above log entry is the last entry in the Sabnzbd log, there is no reference to Supergirl 4 which is one of the problem books from my other thread.

@evilhero
Owner
evilhero commented Oct 4, 2012

Well that's close - I was trying to figure a way to work it, but I need to see the results of the ComicRN.py script that SAB processes. Within SAB, in the History of your downloads, and under the Script section, it'll say (More) - clicking on the More will give you the results of the script (which is what I'd like to look at).

I do have some previous programming experience, but moreso from dabbling - mainly with xml/xsl parsing and some ancient programming languages that are very rarely used nowadays it seems.

@CyberCowboy

I must be dense today, here's a screenshot of my Sabnzbd but I'm not
seeing the MORE option you indicate.

https://dl.dropbox.com/u/204578/ScreenShot.png

@bebetech
bebetech commented Oct 5, 2012

I don't think your script is running? You should see script successfully ran or something in green font next to the downloaded NZBs in your screenshot.

@CyberCowboy

That looks likely now, some how sabnzbd lost my script directory. I just
fixed it and all seems right with the world. I'm sorry I missed that and
wasted everyone's time.

@evilhero evilhero closed this Oct 8, 2012
This was referenced Mar 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment