[RELEASE] Watchlist script (was 'Adding Plex's 'On Deck' feature to XBMC')

  Thread Rating:
  • 2 Votes - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Closed
Hitcher Offline
Skilled Skinner
Posts: 10,281
Joined: Aug 2007
Reputation: 80
Location: Eastleigh, UK
Post: #1
Superseded by the Skin Widgets Addon post 4th Oct 2012.

All credits for this script go to ronie and `Black.

Code:
INFORMATION FOR SKINNERS
------------------------


CONTENTS:
1. Introduction
2. Running the addon
3. Available infolabels


1. Introduction:
----------------
This script will return:
- a list containing the first unwatched episode of TV Shows you are watching.
- a list of movies that are partially watched.
- a list of most played albums

The episode list is sorted by watch date of the previous episode:
if you've watched 'South Park' yesterday and 'House' the day before,
'South Park' will be the first item on the list and 'House' the second one.

The movie list is also sorted by watch date.

The album list is sorted by playcount.


2. Running the addon:
---------------------
run the script with the options you need:
RunScript(script.watchlist,movies=true&episodes=true&albums=true&limit=25)


3. Available infolabels:
------------------------
Window(Home).Property(*)

WatchList_Movie.%d.Label        - movie title
WatchList_Movie.%d.Year            - year of release
WatchList_Movie.%d.Genre        - movie genre
WatchList_Movie.%d.Studio        - movie studio
WatchList_Movie.%d.Plot            - movie plot
WatchList_Movie.%d.PlotOutline        - movie plotoutline
WatchList_Movie.%d.Tagline        - movie tagline
WatchList_Movie.%d.Runtime        - duration of the movie
WatchList_Movie.%d.Rating        - movie rating
WatchList_Movie.%d.Fanart        - movie fanart
WatchList_Movie.%d.Thumb        - movie thumbnail
WatchList_Movie.%d.Path            - movie filename and path

WatchList_Episode.%d.Label        - episode title
WatchList_Episode.%d.Episode        - episode number
WatchList_Episode.%d.Season        - season number
WatchList_Episode.%d.EpisodeNo        - season/episode number (sxxexx)
WatchList_Episode.%d.Plot        - episode plot
WatchList_Episode.%d.TVShowTitle    - tv show title
WatchList_Episode.%d.Path        - episode filename and path
WatchList_Episode.%d.Rating        - episode rating
WatchList_Episode.%d.Thumb        - episode thumbnail
WatchList_Episode.%d.SeasonThumb    - season thumbnail
WatchList_Episode.%d.TvshowThumb    - tv show thumbnail
WatchList_Episode.%d.Fanart        - tv show fanart
WatchList_Episode.%d.IsResumable    - indicates if it's a partially watched episode (True/False)

WatchList_Album.%d.Label        - name of the album
WatchList_Album.%d.Artist        - album artist
WatchList_Album.%d.Genre        - album genre
WatchList_Album.%d.Year            - year of release
WatchList_Album.%d.Album_Label        - recordlabel
WatchList_Album.%d.Album_Description    - album review
WatchList_Album.%d.Rating        - rating of the album
WatchList_Album.%d.Thumb        - album thumbnail
WatchList_Album.%d.Fanart        - artist fanart
WatchList_Album.%d.Path            - can be used to play the album: <onclick>$INFO[Window(Home).Property(WatchList_Album.%d.Path)]</onclick>


WatchList_Running            - used by the script internally to check if it's already running

(2011-12-08 22:12)ronie Wrote:  here's the current logic:
- skin runs the script
- script will keep running in the background and monitor for playback ended/stopped notifications
(nothing new so far)
- if the script is executed again, either by the same skin or another skin,
the script will run again and kill the previous instance of the script.

for those who want a property to check if the script is running,
it's there, but not needed at all by the skin.
it's solely used by the script to check if it's already running.

Window(Home).Property(Watchlist_Running)
will be True when running, empty if not.

------------------------------------------------

Original post -

So I've just read about this new feature and quite honestly think it's brilliant and would be a very welcome addition to XBMC. For those of you who don't know what it is read on.

Quote:We always strive to make our software easier to use, and one thing we noticed was that in regular usage, certain media consumption patterns emerged that we could take advantage of to make it much easier for people to get to their media more easily. For example, if I want to watch TV, I’m most likely to be interested in seeing the next unwatched episode of a show I’ve watched recently. Easy enough to explain, but in previous versions, you were stuck finding the TV show, going to the right season, and looking for the next unwatched episode. Honestly, I’d rather spend that time opening a beer.

It’s actually easier to explain with a screen capture.

[Image: Plex-3.png]

I decided to watch some TV, so i scrolled down to highlight my Television section, and to the right, the media shelf fades in with two areas: On Deck content, and Recently Added content. Just last night, we watched the third episode of West Wing (no spoilers in the comments, please), so Plex is offering me the fourth episode. Two clicks away and I’m watching it, as opposed to (I just counted) fifteen!

A week or two ago, we finished the last episode of the first season of Walking Dead (if you haven’t read the graphic novel, you really should), and so it’s offering me the season premier for the second season. Unfortunately, I have to wait for a guy friend to visit to watch that, since Anna won’t go near zombies.

Before that, I got halfway through a Simpsons episode and then got distracted by zombies or shiny objects, so it’s offering me that half-finished episode next. And so on.

Now I know we can use partially watched videos but have no idea how we could get in progress TV shows to display the next episode.

Opinions please.



Download:
XBMC EDEN: http://mirrors.xbmc.org/addons/eden/script.watchlist/
Frodo Nightly Builds: https://github.com/XBMC-Addons/script.wa.../downloads

IF YOU HAVE ANY ISSUES, ALWAYS INCLUDE A FULL Debug Log WITH YOUR REPORT
(This post was last modified: 2012-10-10 17:49 by Hitcher.)
find
ronie Offline
Team-XBMC Member
Posts: 8,986
Joined: Jan 2009
Reputation: 147
Post: #2
i don't know what plex is,
but i fully agree with their point of view on beer. :-)


anyways... if partially watched is supported for episodes (i don't think it is?)
we should be able to script it.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or e-mail Team-XBMC members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find
Smobbo Offline
Senior Member
Posts: 219
Joined: Oct 2010
Reputation: 1
Location: The Netherlands
Post: #3
This looks freaking brilliant Smile.
I for one have quite a lot of different shows that i watch, but i mainly watch 4 or 5 shows (with or without my girlfriend), all the other new episodes that get downloaded are saved for a rainy day Wink.

Having the most 'relevant' shows first would be really cool!
It would work really nice with your skin Xeebo!
find
Hitcher Offline
Skilled Skinner
Posts: 10,281
Joined: Aug 2007
Reputation: 80
Location: Eastleigh, UK
Post: #4
That's exactly the thing I like best - it lists the next, unwatched episode (be it the current season or the next if you've just watched the last) of a TV show you're currently watching.
find
Smobbo Offline
Senior Member
Posts: 219
Joined: Oct 2010
Reputation: 1
Location: The Netherlands
Post: #5
ronie Wrote:i don't know what plex is,
but i fully agree with their point of view on beer. :-)


anyways... if partially watched is supported for episodes (i don't think it is?)
we should be able to script it.


Partially watched is allready in XBMC right...?

Because when i stop a movie or show and then click on it later it will ask me if i want to continue at the point i stopped (minuteX-secondeX), or want to start from the beginning again.
find
ronie Offline
Team-XBMC Member
Posts: 8,986
Joined: Jan 2009
Reputation: 147
Post: #6
Smobbo Wrote:Partially watched is allready in XBMC right...?

Because when i stop a movie or show and then click on it later it will ask me if i want to continue at the point i stopped (minuteX-secondeX), or want to start from the beginning again.

i was kinda wondering if this info was exposed to the skin for episodes..
just tested it, and it is.

but come to think of it, it doesn't matter anyway.
in progress episodes are still marked as unwatched, which is what we need
as they should show up on the 'on deck' panel as well.


sorting by 'relevance' ?
not sure if that's easy to define.

i guess it may be possible to sort things by the watched date of the previous episode
or something along those lines...

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or e-mail Team-XBMC members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find
Hitcher Offline
Skilled Skinner
Posts: 10,281
Joined: Aug 2007
Reputation: 80
Location: Eastleigh, UK
Post: #7
ronie Wrote:i guess it may be possible to sort things by the watched date of the previous episode
or something along those lines...

I was thinking along the same lines.

1. Find the most recently watched episode
2. Check it's season/episode numbers
3. Look in the database to see if the next episode is available
4. If it is add it to the list, if not repeat process

I'm no programmer though. Wink
find
bossanova808 Offline
Donor
Posts: 2,097
Joined: Sep 2009
Reputation: 27
Location: Melbourne, Australia
Post: #8
I just sort my TV shows by 'episodes' with hide watched turned on and this basically gives the same thing, no? Frequent watched shows with only one or two unwatched who at the top, with other shows with a larger backlog are down the list.

Seems much the same to me really?
find
blacklist Offline
Posting Freak
Posts: 814
Joined: Jul 2009
Reputation: 1
Location: Atlanta, Ga, USA
Post: #9
First, let me make sure I understand what we want to define as "On-Deck". My thoughts:

A) On-deck is a new, unwatched episode of a series you have been watching lately.
B) On-deck is an episode that you started watching but never finished.
C) On-deck is the next episode from an episode you recently watched.


A - Pull Recently Watched episodes, compare Recently Added Episodes. Series where the two lists meet are going to be new and watching. Display said episodes.

B - Pull a list of partially watched episodes. Can we see the last watched date, so that we can order by the most recently partially watched? I would assume so.

C - Pull Recently Watched Episodes. Read the series from each, then the episode list, looking for the next. Potential issues:

1) The next episode is the next season. Do we know to go from 2X12 to 3x1? How is this accomplished?
2) What happens when the new episode shows up? ie. I'm watching Walking Dead, watched the last episode, and the new episode comes up in 2 places... Latest Added and On-Deck?

Are we looking at combining all this together to create a magic-bullet list of reccomendations?

I think its a fantastic idea with lots of possibility. An additional idea: Unwatched episodes in a series that might discover new content. For instance: You've watched every episode of Mitchell and Webb Look except 3x2.... maybe you want to watch that one?

Just some brainstorming.
find
Hitcher Offline
Skilled Skinner
Posts: 10,281
Joined: Aug 2007
Reputation: 80
Location: Eastleigh, UK
Post: #10
A and C are the same - it shouldn't matter if it's a brand new series or a really old one as long as you've recently watched an episode and the next one is in your library.

B should also cover partially movies.

Thinking about it some more last night they should be broken down into two sets of data (Ongoing show and Partially watched) so if the skinner wanted they could make two separate lists on the home screen.
(This post was last modified: 2011-11-02 17:41 by Hitcher.)
find
pecinko Online
Donor
Posts: 3,674
Joined: Dec 2008
Reputation: 49
Location: Prague / Belgrade
Post: #11
Some thoughts:

- they are using season covers for episodes. This definitely looks better than episode thumbs
- navigation could be problematic if you're showing recently added (RA) and in progress items (IP) at the same time. Shown layout uses "ESC" to navigate back from a middle of RA or IP list back to main nab
- It could be a little messy and I would personally go to extra node in library (like RA) that you can link to from a home page
- partially watched is returned true for unwatched items that are in progress. I had a problem showing partially watched status for watched items. This may be different for a script, though.

BTW, I'm more intrigued by Queue feature that allows you to bookmark web video while browsing so you can watch it later from XBMC on a big screen

My skins:

Amber
Quartz

(This post was last modified: 2011-11-02 13:19 by pecinko.)
find
Dzigg Offline
Junior Member
Posts: 32
Joined: Oct 2011
Reputation: 0
Post: #12
I agree, even the name 'Ongoing Show' and 'Partially Watched' is spot on Nod

The 'partially watched' view would make it a step better than plex 'On Deck'.. If it can be implemented, it's up to the skinners to have these view easily accessible. Lots of skins have 'new episodes' built in, it can be used similarly I think..
find
pecinko Online
Donor
Posts: 3,674
Joined: Dec 2008
Reputation: 49
Location: Prague / Belgrade
Post: #13
Dzigg Wrote:The 'partially watched' view would make it a step better than plex 'On Deck'.. If it can be implemented, it's up to the skinners to have these view easily accessible. Lots of skins have 'new episodes' built in, it can be used similarly I think..

This is easy as making a smart playlist based on "In progress" status - it will return item that you did not finish watching. You can add it to home page through favorites or whatever way is using your skin of choice.

Trickier part is suggesting next episodes.

My skins:

Amber
Quartz

find
Hitcher Offline
Skilled Skinner
Posts: 10,281
Joined: Aug 2007
Reputation: 80
Location: Eastleigh, UK
Post: #14
pecinko Wrote:Trickier part is suggesting next episodes.

Indeed, this is where we'd need a script to work some magic.
find
ronie Offline
Team-XBMC Member
Posts: 8,986
Joined: Jan 2009
Reputation: 147
Post: #15
Hitcher Wrote:Indeed, this is where we'd need a script to work some magic.

will have a look at it tonight.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or e-mail Team-XBMC members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find
Thread Closed