mwheelerjr / mptvseries

Automatically exported from code.google.com/p/mptvseries
0 stars 0 forks source link

Support for looking up episodes using Air Date via the online API #127

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
>What enhancement or feature would you like?

I would like MP-TV series to support air dates in the file name, and then
look up the corresponding episode that aired on that date, then associate
the file with that episode. 

>How would you expect it to work? Can you illustrate it with examples such
>as images or scenarios?

For example:

The Colbert Report - 2008x02.09.avi

Could be parsed as something like (not checked for accuracy):

<series> - <year>(x|\.|-|\s)<month>(x|\.|-|\s)<day>.<ext>

MP-TV then queries thetvdb for episodes aired for $series where year =
$year and month = $month and day = $day. If #results > 1 then either pick
the first one or don't pick any (user settable?). If #results == 1, use
that episode. 

Now, if #results == 0, the quick and dirty way would be to just say "no
such episode" and move on. A more elegant solution would be to query for
episodes aired in the last, say, 7 days (to handle the case of weekly
series). If an episode exists for within 7 days, try to guess the episode #
based on previous ones. eg: if s05e04 was the last episode aired according
to thetvdb, guess that this one is s05e05. 

>Please provide any additional information below.

Would really like this feature added, as many daily shows are now being
formatted in this way. It's time consuming to rename all the files, and
instead of writing a script to do all of the above, I'd like MP-TV to do it
automagically. 

Original issue reported on code.google.com by steve...@gmail.com on 11 Feb 2009 at 3:34

GoogleCodeExporter commented 9 years ago
I could probably take advantage of the onlineAPI for Getting episode by AirDate:

http://thetvdb.com/wiki/index.php/API:GetEpisodeByAirDate

Original comment by damien.haynes@gmail.com on 11 Feb 2009 at 3:48

GoogleCodeExporter commented 9 years ago
I would love to see this implemented as well. This would make the pluigin much 
more
useful for those that watch shows that air on a daily schedule. 

Original comment by cconstan...@gmail.com on 11 Feb 2009 at 4:41

GoogleCodeExporter commented 9 years ago
please, don't try to guess episodes as is proposed, it will most certainly be 
wrong.
instead give it a season and episode that's obviously wrong like -1x-1

Original comment by Magnus.S...@gmail.com on 27 Feb 2009 at 2:34

GoogleCodeExporter commented 9 years ago
FWIW, I ended up writing a quickie perl script shortly after opening this bug to
rename the files from thetvdb using GetEpisodeByAirDate. It works quite well, 
unless
someone hasn't updated the db with the airdate for an episode, of course.

If anyone wants the script until this is implemented, let me know.

Original comment by steve...@gmail.com on 29 Jun 2009 at 4:17

GoogleCodeExporter commented 9 years ago
If you could post that Perl script with some basic instructions that would be 
killer.  Actually you don't need to post 
instructions if you don't want.  I'll figure it out if you get me that far!

Original comment by jon.roma...@gmail.com on 29 Jun 2009 at 7:06

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
(oops, attached an older version by mistake before)

Attached. I had a hard time getting it to work on anything other than my 
personal
Linux box, so I end up having it spit out a move command (mv <old file> <new 
file>)
that can be copy/pasted, or run by another script, instead of actually moving 
the
file locally. 

Original comment by steve...@gmail.com on 29 Jun 2009 at 7:17

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks!  I really appreciate the interim work-around!

Original comment by jon.roma...@gmail.com on 30 Jun 2009 at 10:43

GoogleCodeExporter commented 9 years ago
any update on this?

Original comment by jeram...@gmail.com on 18 Sep 2009 at 4:18

GoogleCodeExporter commented 9 years ago
Does anyone know what happen to: 

http://thetvdb.com/wiki/index.php/API:GetEpisodeByAirDate

Original comment by damien.haynes@gmail.com on 30 Oct 2009 at 8:35

GoogleCodeExporter commented 9 years ago

Original comment by damien.haynes@gmail.com on 30 Oct 2009 at 8:37

GoogleCodeExporter commented 9 years ago
I think the parsing engine should be modified to also look for date format 
YYYYMMDD
in local filenames e.g.

Conan.O.Brien.2009.09.09.Tom.Arnold.HDTV.XViD.avi

Original comment by damien.haynes@gmail.com on 30 Oct 2009 at 8:48

GoogleCodeExporter commented 9 years ago
Very weird that it's gone. It definitely still works though, as it's working in 
my
perl script as of last night. I'll try to update that page with some 
documentation
once my tvdb wiki account gets activated. In the meantime it's basically:

GetEpisodeByAirDate.php?apikey=$apikey&seriesid=$series_id&airdate=$air_date

Where $air_date is in the format YYYY-MM-DD.

The return value from the api seems to be the same as a normal 
BaseEpisodeRecord, so
that should be really straightfoward:
http://thetvdb.com/wiki/index.php/API:Base_Episode_Record

Original comment by steve...@gmail.com on 30 Oct 2009 at 2:50

GoogleCodeExporter commented 9 years ago
Great, thanks.

Original comment by damien.haynes@gmail.com on 30 Oct 2009 at 8:02

GoogleCodeExporter commented 9 years ago
Issue 313 has been merged into this issue.

Original comment by damien.haynes@gmail.com on 22 Jan 2010 at 4:19

GoogleCodeExporter commented 9 years ago
Please include this feature in one of the next releases... it's a much needed 
feature...

Original comment by mory...@gmail.com on 22 Feb 2010 at 12:57

GoogleCodeExporter commented 9 years ago
Even though GetEpisodeByAirDate got erased from thetvdb's wiki for some reason, 
it does work, so closing this annoying issue (that has to do with shows like 
The Daily Show and Colbert Report) can be easily fixed by implemented this API 
call... will you include this in one of the next releases...? Please...?

Original comment by mory...@gmail.com on 10 Jun 2010 at 11:54

GoogleCodeExporter commented 9 years ago
It would be really nice if this could be implemented :)

Original comment by Terraust...@gmail.com on 1 Sep 2010 at 7:15

GoogleCodeExporter commented 9 years ago
Any update on this issue? It would be a great feature! 

Original comment by cconstan...@gmail.com on 16 Feb 2011 at 4:59

GoogleCodeExporter commented 9 years ago
Would love to see this.  Coming over from SageTV where this feature was 
implemented a year or more ago.

Original comment by jer...@thegollys.com on 25 Jun 2011 at 1:03

GoogleCodeExporter commented 9 years ago
If SageTV can do this, why cant MP-TV series?

Original comment by ukphoeni...@gmail.com on 27 Jul 2011 at 6:34

GoogleCodeExporter commented 9 years ago
SageTV and XBMC and Boxee and Plex and... They all do it :-)

Original comment by jer...@thegollys.com on 27 Jul 2011 at 6:00

GoogleCodeExporter commented 9 years ago

Original comment by damien.haynes@gmail.com on 28 Jul 2011 at 5:01

GoogleCodeExporter commented 9 years ago

Original comment by damien.haynes@gmail.com on 28 Jul 2011 at 5:01

GoogleCodeExporter commented 9 years ago
Awesome that this was started!  I think handling the basic naming structure 
will be straight forward.
show.name.yyyy.mm.dd.episodename.ext

But, there is one gotcha to watch out for as you work on this.
show.name.(YearOfPilot).yyyy.mm.dd.episodename.ext
A perfect example is Conan.  Because there was a show with the same name in the 
90s the new show is titled Conan (2010) in all the online databases.  And 
because it's daily The Scene names all the shows in the yyyy.mm.dd.

Just want to throw that out there.  I've been messing with theRenamer tonight 
to rename daily shows so TVSeries can see them. theRenamer doesn't handle Conan 
accurately.

Original comment by jer...@thegollys.com on 28 Jul 2011 at 5:37

GoogleCodeExporter commented 9 years ago
This will work fine: Conan (2010).2011.07.20.Hell.Hath.No.Cell.Phone.Reception

Original comment by damien.haynes@gmail.com on 28 Jul 2011 at 6:00

GoogleCodeExporter commented 9 years ago
Done r1794.

Original comment by damien.haynes@gmail.com on 28 Jul 2011 at 7:54

GoogleCodeExporter commented 9 years ago
Wow, that was quick. How long until it gets incorporated into the main plugin 
for us to download?

Original comment by ukphoeni...@gmail.com on 1 Aug 2011 at 2:28

GoogleCodeExporter commented 9 years ago
Will probably release a build this week. Here is a test build if you want:

http://dl.dropbox.com/u/10516352/MP-TVSeries.dll

Original comment by damien.haynes@gmail.com on 1 Aug 2011 at 2:40

GoogleCodeExporter commented 9 years ago
Cheers :-)

Original comment by ukphoeni...@gmail.com on 1 Aug 2011 at 2:48

GoogleCodeExporter commented 9 years ago
the test build crashes. I'll just wait a few more days until it is released ;-)

Original comment by ukphoeni...@gmail.com on 2 Aug 2011 at 7:27

GoogleCodeExporter commented 9 years ago
Show me the log please, otherwise it goes out with the crash unresolved for 
sure.

Original comment by damien.haynes@gmail.com on 2 Aug 2011 at 8:38

GoogleCodeExporter commented 9 years ago
Sure, can you point to me where the log is located.

Original comment by ukphoeni...@gmail.com on 3 Aug 2011 at 10:07

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Never Mind. I checked the log and it is attached below. A popup windows when 
you try to open the plugin tab inside MediaPortal - Configuration:

Failed to locate assembly 'Common.Utils, Version=1.1.6.27644, Culture=neutral, 
PublicKeyToken=null'.
Note that the configuration program must be executed from/reside in the 
MediaPortal folder, the execution will now end.

And then it crashes. Hope this helps.

Original comment by ukphoeni...@gmail.com on 3 Aug 2011 at 10:46

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This is because the DLL I posted above is for MediaPortal 1.2 Beta...sorry I 
should of mentioned that. However I will be merging this change into MP11 
branch.

Original comment by damien.haynes@gmail.com on 3 Aug 2011 at 11:57

GoogleCodeExporter commented 9 years ago
Try this for MP11: http://dl.dropbox.com/u/10516352/tvseries/MP-TVSeries.dll

Original comment by damien.haynes@gmail.com on 4 Aug 2011 at 1:16

GoogleCodeExporter commented 9 years ago
Ok works now, thanks for that :) 

btw can you point me to a good "how to" on creating string variables. So far 
string replacements look quite ineffective at Removing "BBC" prefixes in file 
names or renaming episodes like "the daily show" to "the daily show with jon 
stewart"

Original comment by ukphoeni...@gmail.com on 4 Aug 2011 at 8:30