Kodi Community Forum
Release LazyTV - an unwatched TV Show playlist generator - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
---- Thread: Release LazyTV - an unwatched TV Show playlist generator (/showthread.php?tid=170975)



RE: LazyTV - an unwatched TV Show playlist generator - Karnagious - 2014-12-03

A couple things to try:

1. Can you edit the file again, uncomment the Auction Hunters line and change the "&" to "&amp" and see if that works?

2. Could you add the episode to a smart playlist using the standard xbmc process and see what the result is?

If it is still '&' there, then the issue wont be with how LazyTV constructs the playlist, it would be with how it is read from the other end.


RE: LazyTV - an unwatched TV Show playlist generator - GavinCampbell - 2014-12-03

(2014-12-03, 05:53)Karnagious Wrote: A couple things to try:

1. Can you edit the file again, uncomment the Auction Hunters line and change the "&" to "&amp" and see if that works?

2. Could you add the episode to a smart playlist using the standard xbmc process and see what the result is?

If it is still '&' there, then the issue wont be with how LazyTV constructs the playlist, it would be with how it is read from the other end.

I did #2 and this is how the episode was added

<rule field="filename" operator="is"><value>Auction Hunters - 05x06 - Risk &amp; Reward.mp4</value></rule>

Looks like special characters such as & will need to be escaped for xml.


RE: LazyTV - an unwatched TV Show playlist generator - Karnagious - 2014-12-03

Should be a simple fix. Let me have a look.


RE: LazyTV - an unwatched TV Show playlist generator - Karnagious - 2014-12-03

In the file called 'service.py' in the addons installation folder, find this section around line 1134:

Code:
            if showname:

                # tries to read the file, if it cant it creates a new file

and place this line between them:

showname = showname.replace('"', '&quot').replace("'","&apos").replace('<',"&lt").replace('>',"&gt").replace('&',"&amp")

Make sure this line lines up with the one below "# tries to read the file...".

I will push the change to the released version soon.


RE: LazyTV - an unwatched TV Show playlist generator - GavinCampbell - 2014-12-03

(2014-12-03, 10:43)Karnagious Wrote: In the file called 'service.py' in the addons installation folder, find this section around line 1134:

Code:
            if showname:

                # tries to read the file, if it cant it creates a new file

and place this line between them:

showname = showname.replace('"', '&quot').replace("'","&apos").replace('<',"&lt").replace('>',"&gt").replace('&',"&amp")

Make sure this line lines up with the one below "# tries to read the file...".

I will push the change to the released version soon.

Thanks. Tried it.

I think that line only fixes it in the show name, not the file name. For exampel.

<!--Auction Hunters--><rule field="filename" operator="is"> <value>Auction Hunters - 05x06 - Risk & Reward.mp4</value> </rule><!--END-->
<!--Marvel&ampaposs Agents of S.H.I.E.L.D.--><rule field="filename" operator="is"> <value>Marvel's Agents of S.H.I.E.L.D - 02x03 - Making Friends and Influencing People.avi</value> </rule>

Probably just need to do the same thing with the filname variable as well.

Also noticed that the XBMC generated files had a ; at the end as well.


RE: LazyTV - an unwatched TV Show playlist generator - Karnagious - 2014-12-03

My mistake. Drop the semi-colon in where appropriate.

Then add the same line above the "if showname:" line (make sure it aligns with "if showname:"), and change showname to filename.

filename= filename.replace('"', '&quot;').replace("'","&apos;").replace('<',"&lt;").replace('>',"&gt;").replace('&',"&amp;")

That ought to do it.


RE: LazyTV - an unwatched TV Show playlist generator - GavinCampbell - 2014-12-03

(2014-12-03, 22:38)Karnagious Wrote: My mistake. Drop the semi-colon in where appropriate.

Then add the same line above the "if showname:" line (make sure it aligns with "if showname:"), and change showname to filename.

filename= filename.replace('"', '&quot;').replace("'","&apos;").replace('<',"&lt;").replace('>',"&gt;").replace('&',"&amp;")

That ought to do it.

All looks good now. Thanks for the help.


RE: [RELEASE] LazyTV - Diskotechjam - 2014-12-07

Great Addon!

I've got a question though. When I start LazyTV I have it set up to prompt a smart playlist suggestion, but when it loads it only includes unwatched episodes. Is it possible to include watched episodes as well? I like having the option of limiting to unwatched, but sometimes I like to rewatch episodes as well without having to go back and toggle the watch status. Sorry if I over looked a setting, I've been messing around with it for a little bit now and my have overlooked a feature.

thanks again


RE: LazyTV - an unwatched TV Show playlist generator - OldSchoolRPGs - 2014-12-08

I installed the LazyTV addon and setup a smart playlist with a few tv shows. But for some reason it will only play 3 random episodes before closing out. I feel like I have the settings setup correct but it doesn't seem to work past 3. Whether I let them play or skip forward it just cancels out after the 3rd.

I am running it on the newest version of OpenELEC.


RE: LazyTV - an unwatched TV Show playlist generator - Karnagious - 2014-12-08

Are you just running the smart playlist itself? Or are you running the LazyTV random player?

The number of episodes played by the random player is determined by the "Number of shows in playlist" item in the addons settings.

The smart playlist that is created, and that can be used elsewhere outside of LazyTV, should have one entry for each TV show with unwatched episodes.

Note, if the very last episode for the TV Show has been watched, LazyTV doesnt load an episode into the smart playlist.


RE: LazyTV - an unwatched TV Show playlist generator - GavinCampbell - 2014-12-11

Is it possible to have LazyTV update the smart playlist it creates on a schedule? Does it only happen when you start xbmc and when you force it to?


RE: LazyTV - an unwatched TV Show playlist generator - Karnagious - 2014-12-11

The playlist is updated when the watched status of a show is changed on the database.


RE: LazyTV - an unwatched TV Show playlist generator - westcoastbias - 2015-01-03

So is there a way to hack this to show watched episodes?

What I really want that smart playlists cant seem to do, is an equal balance of tv shows. For instance I want the same chance to watch a south park as a silicon valley even though there are 20x more south park episodes.

But a smart playlist cant do this because it ignores episode limits when combining playlists.

So this seems like a decent solution except that it only looks at unwatched episodes.


RE: LazyTV - an unwatched TV Show playlist generator - Rumik - 2015-01-06

FANTASTIC addon! Exactly what I needed, thanks man!


RE: LazyTV - an unwatched TV Show playlist generator - Karnagious - 2015-01-06

(2015-01-06, 12:15)Rumik Wrote: FANTASTIC addon! Exactly what I needed, thanks man!

Thank YOU sir. It is nice to get nice feedback.

(2015-01-03, 00:16)westcoastbias Wrote: So is there a way to hack this to show watched episodes?

What I really want that smart playlists cant seem to do, is an equal balance of tv shows. For instance I want the same chance to watch a south park as a silicon valley even though there are 20x more south park episodes.

But a smart playlist cant do this because it ignores episode limits when combining playlists.

So this seems like a decent solution except that it only looks at unwatched episodes.

I think maybe a TV SHOW smart playlist would do what you want, rather than an EPISODE playlist. Especially when you dont mind watching something that has already been watched.


This forum uses Lukasz Tkacz MyBB addons.