Race between file creation and scraper?
#1
I have a system setup where new episodes automagically appear in the appropriate directories and then I have a cron job that tells XBMC to update the library every couple of hours. In most cases this allows me to do nothing and just see new episodes appear on the listing page in xbmc.

But it appears to be a race between when the file becomes available and when the info shows up on thetvdb. Normally thetvdb update is first and it works out well, but sometimes I get the show first before the episode info is updated. When this happens the episode is never found because even though xbmc is told to update the library again later, it sees that nothing has changed in the folder.

I suppose the intention here is to prevent XBMC from spamming the show listing sites? I think I could modify my cron job to touch the folders, but now that automatic updates are built into xbmc, perhaps this will be a more common problem. Any suggestions?
Reply
#2
Yeah, I think it's a fine line to be walking on. I think the best solution would be to have an account based update management system on thetvdb that way if show info changes, and there is a record of you grabbing info for that show, it can push out the new updates the next time your library is updated. Or something like that.

It seems that requesting all the info about a show just to make sure that you've got the latest is unreasonable. Too much wasted bandwidth. Maybe a checksum could be introduced to reduce the amount of bandwidth used.

It's hard to say because I'm not familiar with all of the elements involved but I think you understand the situation pretty well.
Reply
#3
I could be wrong but I'm fairly certain my xbmc live instance does not act this way. If I add a movie or tv show before it shows up on themoviedb or tvdb it won't get added to the library. However, when it does get added, my next library update picks it up. The only time I've something like what your describing happen is when someone creates an empty episode placeholder on thetvdb with little to no details. It will still show up in the library, but it's missing all info, and unless I manually refresh that episode it will never update it.
Reply
#4
I believe the second scenario you're describing is what's occurring with the OP. The only way to address the issue is to go to the episode and bring up the context info box and select "Refresh" while viewing the info?
Reply
#5
If no info is returned by the scraper, the file won't be committed to the db. So *something* must be being returned. A debug log on pastebin.com might shed some light.
Reply
#6
I have the same setup, and can honestly say I have never had this issue. Does it happen with specific shows?
Reply
#7
Thanks for the info. I thought I was seeing the expected behaviour but since its not then I'll have to do some more digging.

I thought it was a general problem but it likely is related to my scraping of date-based episodes. Since it doesn't yet know the season and episode until it does a match that may be playing havoc with the sequence.
Reply
#8
On second thought I seem to have the same issue even with episode based matches.

Log at http://pastebin.com/m383ad763.

In this example, I've added a fake "Daily Show" episode that doesn't exist in thetvdb (as of today the last episode in the db is S14E87):
The.Daily.Show.S14E88.Larry.David.PDTV.XviD-FQM.[VTV].avi

You can see that the first update causes it to find the episode, see that its not in the db, download the dump from thetvdb and then attempt to match it. It doesn't match because there's no S14E88 episode.

Then I run another update, and it doesn't even bother scanning the directory again because the checksum on the directory hasn't changed. Since it doesn't scan the files again, it doesn't go grab the update from thetvdb. Even though this episode info still doesn't exist online, it didn't even try to grab it.

eamiryar, I can't see how your episodes get picked up later until another file gets added to the directory or one of the files gets touched. Could it be that your shows are always in the db first, with at minimum just the season and episode id entries?
Reply

Logout Mark Read Team Forum Stats Members Help
Race between file creation and scraper?0