2009-03-26, 01:41
I'm trying to write a script that grabs all of the viewed tv episodes. Shouldn't be too hard, right? Well.. I keep running into stupid road-blocks. I know there is a way around, but I simply can't find it anywhere on the internet.
Ok, what I have right now is the ability to see if an episode has been viewed. Easy:
This lists the name of every episode that has been viewed.
That's exactly what I want.
However, for some reason I cannot add these files to a playlist simply by name (something that, based on the docs I have seen it seems like you should be able to do).. and unfortunately, I cannot get SQL to accept an outside variable, or search within two tables.. so I can't find the actual filenames of the episodes. (With actual filenames, I know that I can get them to play.)
The end idea is to be able to basically have the script create a tv show from your downloaded tv episodes. (However, I only want watched tv shows.. Who wants it to play the finale of Battlestar Galactica when you are in the middle of the third season?) While this kind of flies in the face of the point of having everything downloaded, my wife still likes having cable simply so that she doesn't have to choose something to watch.. Or so she can put something on and do something else. She doesn't want to watch a new episode of something while she's cooking, but it is nice to be able to watch something. I know that I could make a playlist of all the watched tv shows, and just shuffle it (and that's what I'll do now..) but eventually I'd like to be eventually have the script display a sort of "coming up" screen..
I have a feeling that it would be easy to recreate an [adult swim]-like feel for it too..
Anyway, the most frustrating part is that in the XBMC Database wiki page it says:
Any help, or at least pointers in the right direction would be fantastic!
Thanks!
- Derek
Ok, what I have right now is the ability to see if an episode has been viewed. Easy:
Code:
xbmc.executehttpapi('queryvideodatabase(select c00 from episode where c08)')
That's exactly what I want.
However, for some reason I cannot add these files to a playlist simply by name (something that, based on the docs I have seen it seems like you should be able to do).. and unfortunately, I cannot get SQL to accept an outside variable, or search within two tables.. so I can't find the actual filenames of the episodes. (With actual filenames, I know that I can get them to play.)
The end idea is to be able to basically have the script create a tv show from your downloaded tv episodes. (However, I only want watched tv shows.. Who wants it to play the finale of Battlestar Galactica when you are in the middle of the third season?) While this kind of flies in the face of the point of having everything downloaded, my wife still likes having cable simply so that she doesn't have to choose something to watch.. Or so she can put something on and do something else. She doesn't want to watch a new episode of something while she's cooking, but it is nice to be able to watch something. I know that I could make a playlist of all the watched tv shows, and just shuffle it (and that's what I'll do now..) but eventually I'd like to be eventually have the script display a sort of "coming up" screen..
I have a feeling that it would be easy to recreate an [adult swim]-like feel for it too..
Anyway, the most frustrating part is that in the XBMC Database wiki page it says:
Quote:This query gets just the path and filename of all of the video files from season two of Chuck.That sounds exactly like what I need. Problem: There is no query listed.
If you're not familiar with SQL queries, this query probably looks pretty complicated.
Any help, or at least pointers in the right direction would be fantastic!
Thanks!
- Derek