Importing TV Shows named by the date they aired, scan & scrape by air-date ("bydate")
#31
Now that I've had a look at the VideoInfoScanner code to make a small change to support being able to scrape MythTV recordings into the Video library the following might be an approach.

Create the new TVDB related API that can lookup based on air date. This will need to be newly coded.

Within the VideoInfoScanner, if the FileItem has a episode and season set to zero, then it knows to use the air date API. Pull the air date out of the FileItem and hit the new API on TVDB to get the actual episode and season values + all the other information that can then be added to the library.

For sources like MythTV the airdate can be populated into the FileItem element and the episode and season can be set to zero (pretty much already done).
Reply
#32
Patch submitted with details in the trac ticket:
http://trac.xbmc.org/ticket/5143

Btw, I didn't end up even using the new tvdb api because xbmc doesn't ever search by individual season and episode number. both the existing and date-based matches are done from the show's episode list.
Reply
#33
csbook Wrote:Patch submitted with details in the trac ticket:
http://trac.xbmc.org/ticket/5143

Btw, I didn't end up even using the new tvdb api because xbmc doesn't ever search by individual season and episode number. both the existing and date-based matches are done from the show's episode list.
Thanks for taking the first stab at this. I'm going to try to patch this into my own build and see what happens.
Reply
#34
csbook Wrote:Patch submitted with details in the trac ticket:
http://trac.xbmc.org/ticket/5143

Btw, I didn't end up even using the new tvdb api because xbmc doesn't ever search by individual season and episode number. both the existing and date-based matches are done from the show's episode list.
Well, I added your patch, but none of my dated shows are getting properly imported into my TV library. Do I have to add lines to the advancedsettings.xml file?

Filename examples:
The.Daily.Show.05.12.2009.PDTV.XviD-iHT.[VTV]
The.Daily.Show.2009.05.13.DSR.XviD-YT.[VTV]

The Daily Show\Season 14\
04-01-2009
05-11-2009
Reply
#35
kricker Wrote:Well, I added your patch, but none of my dated shows are getting properly imported into my TV library. Do I have to add lines to the advancedsettings.xml file?

No, you shouldn't have to do anything if the files match the format that I gave in the trac. What are the names of your files?

I can think of two other possible problems:
1) XBMC seems to keep track of changes to the a directory before scanning, so make sure you touch at least one file in your directory to cause a rescan.
2) Its possible the files were imported with one of the old episode-based regexps, in which case you may have to remove the files, clean the library and then put them back to have it attempt to match them all again.
Reply
#36
csbook Wrote:No, you shouldn't have to do anything if the files match the format that I gave in the trac. What are the names of your files?

I can think of two other possible problems:
1) XBMC seems to keep track of changes to the a directory before scanning, so make sure you touch at least one file in your directory to cause a rescan.
2) Its possible the files were imported with one of the old episode-based regexps, in which case you may have to remove the files, clean the library and then put them back to have it attempt to match them all again.
I added a brand new directory to scan. Those files are the first two listed in the post above.

Exactly how should the line in the advancedsettings.xml look for a custom by date regex? For files such as those last files listed in my previous post.
Reply
#37
Ok, those files should work by default. I should mention that you don't need to do anything in advancedsettings to make this work, unless you've already provided your own regexps in which case you need to add the new ones.

This is from the wiki with my two new entries put in. I'm not at home so hopefully there's no type-os.

<tvshowmatching>
<regexp>\[[Ss]([0-9]+)\]_\[[Ee]([0-9]+)([^\\/]*)</regexp> <!-- foo_[s01]_[e01] -->
<regexp>[\._ \-]([0-9]+)x([0-9]+)([^\\/]*)</regexp> <!-- foo.1x09 -->
<regexp>[\._ \-][Ss]([0-9]+)[\.\-]?[Ee]([0-9]+)([^\\/]*)</regexp> <!-- foo, s01e01, foo.s01.e01, foo.s01-e01 -->
<regexp byDate="true">([0-9][0-9][0-9][0-9])[\.-]([0-9][0-9])[\.-]([0-9][0-9])</regexp>
<regexp byDate="true">([0-9][0-9])[\.-]([0-9][0-9])[\.-]([0-9][0-9][0-9][0-9])</regexp>
<regexp>[\._ \-]([0-9]+)([0-9][0-9])([\._ \-][^\\/]*)</regexp> <!-- foo.103 -->
</tvshowmatching>

Note that the order is very important. You can see that I'm putting in the date ones before the last existing one because the last expression used for foo.103 episodes would incorrectly match episodes that were labeled by date. So be careful if you use action="append" or anything like that.
Reply
#38
csbook Wrote:... unless you've already provided your own regexps in which case you need to add the new ones....
Bingo. I do have my own regex, so I had a feeling that was the case. I will try it out with those added now.
Reply
#39
a small tip; ([0-9]{4}) matches exactly 4 numbers.

you've "learned" from my prior ignorance Smile
Reply
#40
Things are looking up. I added the following to my advancedsettings.xml

Code:
<tvshowmatching>
    <regexp byDate="true">([0-9]{4})[\.-]([0-9]{2})[\.-]([0-9]{2})</regexp>
    <regexp byDate="true">([0-9]{2})[\.-]([0-9]{2})[\.-]([0-9]{4})</regexp>
    <regexp>Season[\._ ]([0-9]+)[\\/]([0-9]+)[^\\/]*</regexp>
</tvshowmatching>

It appears the episodes are imported properly, I haven't really checked if they are what the library says they are yet. I'm going to go through them now and see.

Thank you all! This is great. I no longer have to switch to file view from library view to watch these kinds of shows.
Reply
#41
r20559
Reply
#42
spiff Wrote:r20559
Wonderful. Thanks fellas!
Reply
#43
I can't get this working for some reason.

I'm using kricker's Rev20903 build and my file/episode structure is as follows:

TV Shows/The Daily Show/The Daily Show Season 14/The.Daily.Show.05.21.2009.PDTV.XviD-iHT.[VTV]

My AdvancedSettings.xml is blank except for (copied from kricker's post earlier):

Code:
<tvshowmatching>
    <regexp byDate="true">([0-9]{4})[\.-]([0-9]{2})[\.-]([0-9]{2})</regexp>
    <regexp byDate="true">([0-9]{2})[\.-]([0-9]{2})[\.-]([0-9]{4})</regexp>
    <regexp>Season[\._ ]([0-9]+)[\\/]([0-9]+)[^\\/]*</regexp>
</tvshowmatching>

Am I missing something?
Reply
#44
Well, I didn't have a season subdirectory like you did but aside from that my setup is the same.

Did you try touching the files or creating new ones that didn't exist before you updated XBMC? There may be some info in the log as well that could help.
Reply
#45
I tried all of those tips that you said csbook, but the scraper still won't find anything. I also tried reinstalling XBMC with everything fresh and still nothing.

Log file for my Rev20872 install (useful library stuff starts on line 293 I think:
http://pastebin.ca/1449233

Any ideas anyone?

EDIT: Here's another log after I removed my Season subfolder and moved all of the files into just "/The Daily Show/". It's actually doing the FileCurl operation in this one:
http://pastebin.ca/1449241
Reply

Logout Mark Read Team Forum Stats Members Help
Importing TV Shows named by the date they aired, scan & scrape by air-date ("bydate")1