mwheelerjr / mptvseries

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

Directly open series/season/episode in mp-tvseries #526

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What enhancement or feature would you like?
Directly open a series by specifying the series id as a parameter. 

How would you expect it to work? Can you illustrate it with examples such
as images or scenarios?
Open MP-TvSeries by specifying the parameter series_id (maybe 
season_id/episode_id also) in skin or plugin. MP-TvSeries would start and 
directly show the specified item. Pressing back would bring the user back to 
the previous window.

Original issue reported on code.google.com by bgmei...@gmail.com on 4 Jan 2011 at 8:23

GoogleCodeExporter commented 9 years ago
I would love to see this added.  Ideally I would like to be able to supply the 
following load parameters:
seriesID ( or seriesName ) and jump directly to the season or episodes view for 
that series

optionally specify season and or episode to jump to.
Option to show / hide watched episodes (not critical but would be nice)

This would be a great addition for smart-phone remotes and for the VoxCommando 
voice control application

Original comment by jitterja...@gmail.com on 11 Nov 2011 at 4:35

GoogleCodeExporter commented 9 years ago
Would also love to see this implemented for more control using VoxCommando

Original comment by shanefra...@gmail.com on 26 Dec 2011 at 2:09

GoogleCodeExporter commented 9 years ago

Original comment by damien.haynes@gmail.com on 28 Dec 2011 at 11:28

GoogleCodeExporter commented 9 years ago
Done r1892.

supported loading parameters are as follows:

Views (old way and new way):
============================
<hyperlinkParameter>Favourites</hyperlinkParameter>
or
<hyperlinkParameter>view:Favourites</hyperlinkParameter>

Series (Shows all episodes for series):
=======================================
<hyperlinkParameter>seriesid:79488</hyperlinkParameter>

Season (shows all episodes in series for season):
===================================================
<hyperlinkParameter>seriesid:79488|seasonidx:2</hyperlinkParameter>

Episode (shows only that episode for series/season):
===================================================
<hyperlinkParameter>seriesid:79488|seasonidx:2|episodeidx:6</hyperlinkParameter>

Note: There is no details view currently for tvseries so it re-uses the 
existing views system. That means, the last used view is the one that is 
loaded. Typically this is ok for most views since they dont have conditions on 
episode views except for ones that have no view levels like Latest/MostRecent.

Ideally we can create a new window that serves as a details view for 
series/episodes which bypasses the current view system.

Original comment by damien.haynes@gmail.com on 2 Jan 2012 at 2:45

GoogleCodeExporter commented 9 years ago
Test DLL: http://dl.dropbox.com/u/10516352/tvseries_loadingParameters.rar

Original comment by damien.haynes@gmail.com on 2 Jan 2012 at 2:47

GoogleCodeExporter commented 9 years ago
AMAZING!

I just did a quick test and it seems to work brilliantly.  I play with it some 
more over the next few days and let you know if I have any major issues.

MANY thanks for your time and effort on this Damien.  It'll be a wonderful 
addition for VoxCommando, and no doubt, for others too. :)

Original comment by jitterja...@gmail.com on 2 Jan 2012 at 3:33

GoogleCodeExporter commented 9 years ago
Nice one

Original comment by shanefra...@gmail.com on 2 Jan 2012 at 12:09

GoogleCodeExporter commented 9 years ago
would it be possible to also specified whether or not to show watched episodes 
in the load parameters?  I am not all that familiar with MP and I'm not even 
sure if it is possible to show/hide watched episodes at all.

Original comment by jitterja...@gmail.com on 2 Jan 2012 at 1:14

GoogleCodeExporter commented 9 years ago
jitterjames, there is an UNWATCHED view in tvseries. So if you just switch to 
use that (instead of ALL), then you will always have a filtered list of just 
just unwatched episodes.

Original comment by damien.haynes@gmail.com on 2 Jan 2012 at 9:23

GoogleCodeExporter commented 9 years ago
OK thanks.  That is good to know.  But if I want to ask for unwatched episodes 
of a particular show, there is no way to do that, other than to first go to the 
"unwatched" view, and then manually select the show.  Is that correct?

If that is the case, and there is the possibility to add an optional parameter 
to ask for unwatched, that would be great.  Based on your current syntax I can 
imagine something like this:
seriesid:79488|seasonidx:2|hidewatched:true
or something along those lines.  If it is too much trouble I understand but in 
fact this command "show unwatched episodes of show XYZ" is actually one of the 
commands I use most with VoxCommando and XBMC.

Original comment by jitterja...@gmail.com on 2 Jan 2012 at 10:31

GoogleCodeExporter commented 9 years ago
 From here http://code.google.com/p/mptvseries/source/detail?r=1877
 // get all episodes for the series
            var conditions = new SQLCondition();
            conditions.Add(new DBOnlineEpisode(), DBOnlineEpisode.cSeriesID, seriesId, SQLConditionType.Equal);
            var episodes = DBEpisode.Get(conditions, false);
            if (episodes.Count == 0) return null;

            // sorts by viewing order (getRelSortingIndexOfEp)
            // this is what users would logically watch next in tvseries
            episodes.Sort();

            // get most recently watched episode
            var watchedEpisodes = episodes.Where(e => !string.IsNullOrEmpty(e[cDateWatched]));
            if (watchedEpisodes.Count() == 0) return episodes.First();
            var lastWatched = watchedEpisodes.OrderByDescending(e => DateTime.Parse(e[cDateWatched])).First();

            // get next episode that is unwatched
            int index = episodes.IndexOf(lastWatched);
            if (index >= episodes.Count) return null;

            var unwatchedEpisodes = episodes.Skip(index).Where(e => !e[DBOnlineEpisode.cWatched]).ToList();

Original comment by edale...@gmail.com on 2 Jan 2012 at 10:41

GoogleCodeExporter commented 9 years ago
"But if I want to ask for unwatched episodes of a particular show, there is no 
way to do that, other than to first go to the "unwatched" view, and then 
manually select the show.  Is that correct?"

Yes, currently that is the only way. The last view persists though, so if you 
are only ever interested in unwatched episodes then just switch to unwatched 
view....I know that is not a good solution for voice commands though as they 
might not be interested in unwatched episodes but thats all you will be given 
in this case.

The current view system has filters already applied so really the only solution 
is to come up with a system which bypasses it when using loadingparameters to 
jump to a particular series....but this is a lot more work and will have to be 
on hold for a while. I will have a look at adding unwatchedepisodes filter on 
loadingparameter, its probably the easiest one to filter out since we do store 
unwatched counts in database at the season/series level.

fyi, I found a bug with the dll above and that is you can't exit view (via 
back) after playback of an episode.

Original comment by damien.haynes@gmail.com on 3 Jan 2012 at 1:06

GoogleCodeExporter commented 9 years ago
Fixed back navigation after playback issue. r1894

Original comment by damien.haynes@gmail.com on 3 Jan 2012 at 8:20