PDA

View Full Version : To Air Soon/Missing Episode Script


Pvt_Ryan
2009-02-17, 12:40
I have written a small python script that gets TV Shows Seasons, Episodes & Air dates.

It would be nice if we could integrate this in 2 parts:
1. A scrolling bar that lets users know when the next episode is to be aired
2. A light shade of grey for the episodes that the user does not have in their listings.

The script could take the names for the TV shows that user has and base its listings and scroll bar on that.

In my case I have the structure:
TV Shows/Scrubs/Season 1/Scrubs s01e01.avi

So if this were to be implemented as a plugin then we would look in TV Shows, Get the Show name & seasons a user has and use those for the script.

There are a few Shows the regex does not work for (e.g Friends) but if this gets implemented then List the shows and I will add additional regex to fix them.

If no parameter is passed then script looks for user input.

Here is a link to my website, the code there will be up-to-date
http://projects.ninet.org/index.php/Epscraper.py

Pvt_Ryan
2009-02-19, 13:22
Updated the code to fix a few bugs and also now output the lastaired date & the date of the next episode to be aired.

asphinx
2009-02-19, 13:35
+1
I want this feature!

How would one go about implementing this into xbmc, any given skin?

Pvt_Ryan
2009-02-19, 17:00
I have no idea.. Working on it though..

Batemann
2009-02-19, 17:04
Damn!!! That's a good Idea!!! I will follow this thread closely. Good luck!

Pvt_Ryan
2009-02-19, 19:18
Added LongNA this is a flag that is set if the next episode to be aired is more than or equal to 30+/-2 days away.

The idea is in the skin the user will be able to set an option to hide the show from the scroll bar if the next episode over 30+/-2 days away.

Pvt_Ryan
2009-02-19, 19:32
sry for double post but if anyone knows how to integrate into xbmc this feel free to chip in

asphinx
2009-02-19, 19:50
I so wish I knew XBMC's inner workings at all now, could gladly make it work, but alas I can only hope someone else thinks this is a good idea too. I can picture the outcome in my mind..

Jeroen
2009-02-19, 20:03
This is one of those things where I go "Damn, why didn't I think of that?" :laugh:
Seriously good and useful idea!

Pvt_Ryan
2009-02-20, 01:56
Jeroen: Then get integrating.. :D

Everyone else start going through your shows and seeing which ones it fails on so i can adjust the regex.

Ill start to modularise the code later for the regex match so it can be selected on a show by show bais for those that fail the general one.

As it stands the code either takes one argument or prompts the user for a show name.

The only other catch is the show name may not be an exact match for the url part.
eg "The Unit" is shortened to "Unit" and "Terminator: The Sarah Conor chronicles" is "SarahConorChronicles".

Pvt_Ryan
2009-02-20, 15:13
Jeroen: just tried your skin and I must say I really like how clean and crisp it is.

I had a quick ponder over the xbmc src, I think we can make my script work in 1 of 2 ways.
1) I output to a file and structure the output so it looks like an rss feed
or
2) We do a custom scroller.

The advantage of the custom scroller is we can apply further filters and custom display options. Whereas with the built in rss feed we are stuck with what to display we can maybe detect userset options as arguments that way the rss feed can be customised before it is output to a file.

Let me know which you think is better and ill try and code with that style in mind.

EDIT: Code updated

Hilbe
2009-03-13, 03:29
Any chance this can be used for shows that don't have Season/Episode numbers? For example we have "Show Title - Episode Name.mpg" and it could fetch the info/rename it?