therenamer.com (FORUM CLOSED, CONTACT ME IF YOU HAVE QUESTIONS)

Awesome Simple Best TV Show Renamer .....with Episode Titles!
It is currently Thu Jun 20, 2013 7:16 am

All times are UTC




Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri Feb 19, 2010 4:56 pm 
Offline

Joined: Fri Feb 19, 2010 4:38 pm
Posts: 7
Alfred,

Would it be possible to add an option for TheTVDB searching using absolute numbers?

This is mainly for anime, and I know there is the AnimeDB option, but it doesn't do quite what I'm looking for. I'd like to take an anime series with running numbers and rename it using seasons / episodes from TheTVDB for use in XBMC, so that XBMC can scrape all the great metadata from TheTVDB.

For example, take the show "Bleach - 201" (there are over 250 episodes). Could you take the show name and number, look that up on TheTVDB with absolute number instead of season and episode number, and then rename the episode to Bleach S10E12?

Here's a link to that episode - with absolute number near the bottom of the page - http://thetvdb.com/?tab=episode&seriesid=74796&seasonid=47971&id=416351&lid=7

And assuming you get base episode records (http://thetvdb.com/wiki/index.php/API:Base_Episode_Record) from TheTVDB, the field is <absolute_number>.

Also, I wanted to say, your program is really great, thanks a ton for making it, and for making it better and better.

Brandon


Top
 Profile  
 
PostPosted: Sat Feb 20, 2010 1:01 am 
Offline
Site Admin

Joined: Sun Feb 22, 2009 5:14 pm
Posts: 1528
Location: Matrix World
How do you know 201 is S10E12?


Top
 Profile  
 
PostPosted: Sat Feb 20, 2010 5:25 pm 
Offline

Joined: Fri Feb 19, 2010 4:38 pm
Posts: 7
I think I'm having a hard time explaining this.

I didn't know 201 was S10E12 until I went to TheTVDB. For each show, it has Season, Episode, and Absolute Number. if you hit up the episode link that I sent, near the bottom of the screen it will also list absolute number, and I think this data is sent back in the episode information xml as well.

I'm not sure how the searching works with the API. If you download a package of information for the whole series, you'd be able to look through each episode and check the <absolute_number> field until you matched it up. If you had to submit season / episode number and got back one show that matched, it would be much harder to do.

I understand too this would be a significant change to part of the app, and you'd probably need a new option to make this work, ie "search by absolute number", as otherwise how would you know if 201 is S2E01 or absolute number 201.

B


Top
 Profile  
 
PostPosted: Sat Feb 20, 2010 11:29 pm 
Offline
Site Admin

Joined: Sun Feb 22, 2009 5:14 pm
Posts: 1528
Location: Matrix World
oh, I didn't see the Absolute Number field at the bottom.

At the bottom is the sorting "Aired Order | DVD Order | Absolute Order "
http://thetvdb.com/index.php?tab=seasonall&id=74796&lid=7&order=absolute

But now that I have the episode title, how do I convert 201 to S10E12?... hmmm
How does the submitter know what number to put in? based on what?

this link http://thetvdb.com/wiki/index.php/API:Base_Episode_Record doesn't quite say anything.

Somewhere in that wiki should explain how to add the <absolute_number> field.
Can you help check where I can get that info?


Top
 Profile  
 
PostPosted: Sun Feb 21, 2010 12:09 am 
Offline

Joined: Fri Feb 19, 2010 4:38 pm
Posts: 7
I don't think you can add that information to the page you are using - you'd have to switch to using the XML API instead.

I'm not totally sure on how the xml api works for thetvdb. As a test, I've just registered myself for an API key and done some manual tests using Bleach and information from here: http://thetvdb.com/wiki/index.php/Programmers_API .

As I understand it, here are the steps:

1 - Pull mirror info. Right now there is only one mirror, so I didn't worry about mirror selection.

2 - Lookup the series using http://www.thetvdb.com/api/GetSeries.php?seriesname=Bleach - this tells me that the series id is 74796

3 - Get series information using this link - <mirrorpath_zip>/api/<apikey>/series/<seriesid>/all/en.xml - which would be something like this:
http://thetvdb.com//api/XXXX/series/74796/all/en.xml

The xml file that you get back is explained in the wiki, but on a high level goes:
Code:
<data>
 <series>
   series info
 </series>
 <episode>
  episode info
 </episode>
 <episode>
  episode info
 </episode>
 ....
</data>


4 - Parse the xml and find the episode and info you need.

Each episode tag has the base episode record info outlined at this link - http://thetvdb.com/wiki/index.php/API:Base_Episode_Record - including season, episode, title, and absolute episode.

Here's an example, again for Bleach:
Code:
<Episode>
<id>336770</id>
<Combined_episodenumber>13</Combined_episodenumber>
<Combined_season>7</Combined_season>
<DVD_chapter/>
<DVD_discid/>
<DVD_episodenumber/>
<DVD_season/>
<Director/>
<EpImgFlag/>
<EpisodeName>Ishida Chad, the Quickening of a New Power</EpisodeName>
<EpisodeNumber>13</EpisodeNumber>
<FirstAired>2007-10-17</FirstAired>
<GuestStars/>
<IMDB_ID/>
<Language>en</Language>
<Overview>
Ichigo. Uryuu and Chad arrive in Hueco Mundo to find themselves in strange building. They are able to survive and avoid most of the traps but they must then find a way out of the building and deal with the guards who are there to get rid of any trespassers who dare to enter. Finally, Chad and Uryuu’s new powers will be tested in a real situation.
</Overview>
<ProductionCode/>
<Rating/>
<SeasonNumber>7</SeasonNumber>
<Writer/>
<absolute_number>144</absolute_number>
<filename>episodes/74796/336770.jpg</filename>
<lastupdated>1266331910</lastupdated>
<seasonid>28677</seasonid>
<seriesid>74796</seriesid>
</Episode>


So from this, you'd have to scan each episode tag to find the one with the correct absolute number, then read the season, episode, title, and build the new file name from that.

I imagine this may be a little more complicated than how you are doing it now, but it would also open the door for even more features with all the data available in the xml.

B


Top
 Profile  
 
PostPosted: Sun Feb 21, 2010 12:14 am 
Offline
Site Admin

Joined: Sun Feb 22, 2009 5:14 pm
Posts: 1528
Location: Matrix World
ok. I was hoping not to use their API.
Anyway, don't rename your files manually yet. I will look into this.

Might not be for next build as it's a bit of work to do.


Top
 Profile  
 
PostPosted: Sun Feb 21, 2010 12:20 am 
Offline

Joined: Fri Feb 19, 2010 4:38 pm
Posts: 7
Awesome, thanks Alfred.

I understand that it's more complicated. I'd be glad to help if I can, though I have limited programming experience (mainly just Java).

I'll wait a while and keep my fingers crossed.

B


Top
 Profile  
 
PostPosted: Mon Feb 22, 2010 12:47 am 
Offline
Site Admin

Joined: Sun Feb 22, 2009 5:14 pm
Posts: 1528
Location: Matrix World
I've managed to get it.
There's many similar nodes for each episode:

Code:
  <Combined_episodenumber>15</Combined_episodenumber>
  <Combined_season>12</Combined_season>
  <DVD_episodenumber></DVD_episodenumber>
  <EpisodeNumber>15</EpisodeNumber>
  <FirstAired>2009-07-07</FirstAired>
  <SeasonNumber>12</SeasonNumber>
  <Writer>Masashi Sogo</Writer>
  <absolute_number>227</absolute_number>


Just to confirm,
You need Season and Episode numbers from:
<SeasonNumber>12</SeasonNumber>
<EpisodeNumber>15</EpisodeNumber>

NOT from:
<Combined_season>12</Combined_season>
<DVD_episodenumber></DVD_episodenumber>


Top
 Profile  
 
PostPosted: Wed Feb 24, 2010 4:48 am 
Offline

Joined: Fri Feb 19, 2010 4:38 pm
Posts: 7
Yes, as far as I know, that's exactly what I'm looking for!

(on a side note, is it possible in future to either keep a log of the batch file that's created to do the renaming, or not delete it after a run? i've had a few times where a rename simply didn't do anything, and if I could rerun the script, or even just see it, I could probably figure out why nothing happened - ie strange characters, bad paths, bad permissions, etc).

B


Top
 Profile  
 
PostPosted: Thu Feb 25, 2010 11:50 pm 
Offline
Site Admin

Joined: Sun Feb 22, 2009 5:14 pm
Posts: 1528
Location: Matrix World
Hi brandon,

After a session, click the 'Show Log' button? Don't restart theRenamer or it will wipe out the log file.

I'm going to put absolute numbers on hold abit.
The Movie's 'Google Says Sorry' thing is still happening no matter what I try.
It's going to take priority now.
Will be rewriting movies function to query directly to IMDb instead of google.

Alfred Says Sorry.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
POWERED_BY