dbr / tvdb_api

Simple to use interface to TheTVDB.com API in Python
The Unlicense
339 stars 63 forks source link

Create Directory Structure. #10

Closed queeup closed 14 years ago

queeup commented 15 years ago

Hi again,

First of all sorry about request here. I saw your note about Lighthouse. I'm too lazy for create account :)

Could you add directory structure feature? Something like SABnzbd tvsort function? http://trac2.assembla.com/SABnzbd/browser/trunk/main/sabnzbd/tvsort.py

Searching file on tvdb then create and move to directory.

$ tvnamer scrubs.s01e01.avi
####################
# Starting tvnamer
# Processing 1 files
# ..got tvdb mirrors
# Starting to process files
####################
# Processing scrubs (season: 1, episode 1)
TVDB Search Results:
1 -> Scrubs # http://thetvdb.com/?tab=series&id=76156
Automatically selecting only result
####################
Old name: scrubs.s01e01.avi
New name: Scrubs - [01x01] - My First Day.avi
New directory: Scrubs/Season 1/
Rename and move?
([y]/n/a/q)
dbr commented 15 years ago

No problem, that's exactly why I've left this open!

I've implemented something similar as a separate script, autoPathTv.py

I'll look into this as an option for tvnamer v2.0, but I'm tempted to keep renaming and moving as separate tools..

Hm, it might just be an case of doing os.mkdirs() on the path of the new file, then you could include %(shownam)s/season $(seas)d/ in the output filename.. the problem with this is (if you already have the file in the correct dir) it would make ./Scrubs/season 1/Scrubs/season 1/thefile.avi..

dbr commented 15 years ago

http://dbr.lighthouseapp.com/projects/13342-tvdb_api/tickets/56-move-renamed-files-to-specific-folder

queeup commented 15 years ago

ooo i didn't know autoPathTv.py script. Thank for pointing.

dbr commented 14 years ago

The above ticket has moved to http://dbr.lighthouseapp.com/projects/36049/tickets/2-move-renamed-files-to-specific-folder

dbr commented 14 years ago

Basic functionality is there, still some bugs, but it works