Need some help changing Unwatched Movies on Home Screen, based on current date
#1
Hi all,

I've recently been making some small changes to the default Estuary skin to suit my library, and have been able to change the couple of things I wanted changed (mostly changing the amount of movies displayed on the Recently Added and Unwatched Movies areas, to display 25 movies each), and to eliminate (through the smart playlists) certain things from showing up in either list (namely short films and Christmas movies).

In any case, what I'm trying to accomplish now is to change the Unwatched Movies area to display a different set of movies (by changing the source to different, already-created smart playlists), based on the current date. Specifically, I'm hoping to display holiday specific movies there during certain times of the year. I already have the genres "Christmas" and "Halloween" added to the appropriate movies in my library, and smart playlists that will pull random titles from each genre. I figure the following section from the home.xml file is what I need to change:
Code:
                        <include content="WidgetListPoster" condition="Library.HasContent(movies)">
                            <param name="content_path" value="special://skin/playlists/unwatched_movies.xsp"/>
                            <param name="widget_header" value="$LOCALIZE[31007]"/>
                            <param name="widget_target" value="videos"/>
                            <param name="list_id" value="5300"/>
                        </include>

Basically, I'm looking to add a couple of conditions, and display the appropriate movies, based on the current date. So I think I need to somehow define the System.Date(MM-DD,MM-DD) condition. For example, if condition System.Date(11-27,12-25) is true, then I would want the following content_path parameter to point to "special://skin/playlists/random_christmas_movies.xsp". I would also like to do the same for Halloween (with dates of say, 10-01,10-31, and a playlist named random_halloween_movies.xsp).

After much searching, I just can't find out if this is possible to do or not, and if it is possible, how to accomplish this correctly. Can I define multiple conditions in the include statement, and, if so, would I just replicate this section of code 3 times, and just change the condition and the path for each, or is there a way to define a condition for a parameter? Thanks in advance, for any help anyone can provide.

Sorry if this isn't posted in the correct section. I am using the Estuary skin (a modified copy I've been changing myself), but wasn't sure if this was a skin-specific question, or if this applies to all skins. I just know it's Estuary's home skin that I'm trying to change, so if this isn't the correct location, could a mod please move it to the correct forum? Thank you.

-George
Reply
#2
this can be done with a smart play list but you will need to set how money items to show
Code:
<include content="WidgetListPoster" condition="Library.HasContent(tvshows)">
                         <param name="content_path" value="special://skin/playlists/Music_concerts.xsp"/>
                         <param name="sortby" value="lastplayed"/>
                         <param name="sortorder" value="descending"/>
                         <param name="widget_header" value="Music_concerts"/>
                         <param name="widget_target" value="videos"/>
                         <param name="list_id" value="6052"/>
                     </include>
home.xml
Code:
<include content="WidgetListPoster" condition="Library.HasContent(tvshows)">
                         <param name="content_path" value="special://skin/playlists/Music_concerts.xsp"/>
                         <param name="sortby" value="lastplayed"/>
                         <param name="sortorder" value="descending"/>
                         <param name="widget_header" value="Music_concerts"/>
                         <param name="widget_target" value="videos"/>
                         <param name="list_id" value="6052"/>
                     </include>

Image
Reply
#3
Thanks for trying to help, but that appears to just straight up replace the Unwatched section of the home screen, which is not exactly what I'm trying to accomplish. I have 3 smart playlists, 1 for Christmas movies, 1 for "Halloween" movies, and then the regular Unwatched playlist. I want to use a different playlist in the Unwatched Movies section of the home screen, based on the current date. So in the weeks leading up to Halloween, instead of Unwatched movies showing there, it would show Halloween movies. Same thing with Christmas. Then, the rest of the time, I want that section to display the usual Unwatched movies that it shows by default. I hope this better clarifies what I'm trying to accomplish, and thank you for taking the time to respond.
Reply
#4
Ok, I think I figured it out. At least, it appears to be working currently. Here's how I did it (I did change the dates for each, to trigger each for testing purposes, before reverting to the dates I actually wish to use.)

Code:
                        <include content="WidgetListPoster" condition="Library.HasContent(movies) + !System.Date(11-27,12-26) + !System.Date(10-01,10-31)">
                            <param name="content_path" value="special://skin/playlists/unwatched_movies.xsp"/>
                            <param name="widget_header" value="$LOCALIZE[31007]"/>
                            <param name="widget_target" value="videos"/>
                            <param name="list_id" value="5300"/>
                        </include>
                        <include content="WidgetListPoster" condition="Library.HasContent(movies) + System.Date(11-27,12-26)">
                            <param name="content_path" value="special://skin/playlists/random_christmas_movies.xsp"/>
                            <param name="widget_header" value="Christmas Movies"/>
                            <param name="widget_target" value="videos"/>
                            <param name="list_id" value="5301"/>
                        </include>
                        <include content="WidgetListPoster" condition="Library.HasContent(movies) + System.Date(10-01,10-31)">
                            <param name="content_path" value="special://skin/playlists/random_halloween_movies.xsp"/>
                            <param name="widget_header" value="Halloween Movies"/>
                            <param name="widget_target" value="videos"/>
                            <param name="list_id" value="5302"/>
                        </include>
Reply

Logout Mark Read Team Forum Stats Members Help
Need some help changing Unwatched Movies on Home Screen, based on current date0