Help with Video (Episode) Smart Play List

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
live4ever Offline
Fan
Posts: 556
Joined: Sep 2006
Reputation: 3
Post: #1
Using 19065 on OS X 10.5.6 with PM.HD

I'm trying to make a smart play list that shows the TV episodes that aired in the last 3 weeks. From the wiki I used this example:

Code:
<smartplaylist type="music">
  <name>Recently Played Songs</name>
  <match>all</match>
  <rule field="lastplayed" operator="inthelast">2 weeks</rule>
  <order direction="descending">lastplayed</order>
</smartplaylist>

My Playlist
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="episodes">
    <name>TV aired in last 3 weeks</name>
    <match>all</match>
    <rule field="airdate" operator="inthelast">3 weeks</rule>
    <order direction="ascending">airdate</order>
</smartplaylist>

In the library if I get info on my recently scanned in shows the air date field is populated. Also the "Recently added playlist" works fine.

Thanks in advance.
find quote
live4ever Offline
Fan
Posts: 556
Joined: Sep 2006
Reputation: 3
Post: #2
I've updated to the latest stable release, cleaned out my library, settings etc. added one TV show with one episode that aired in the last 2 days and still can't make the smart playlist work.

If I change the type of playlist to "TV Shows" the playlist brings me to the TV show listing page and lists the TV shows that aired.

Is this type of episode playlist just not possible? Thanks for any help.
find quote
mwkurt Offline
Posting Freak
Posts: 973
Joined: Mar 2010
Reputation: 9
Post: #3
Hello,

I have been trying to create a playlist that would allow me to view all of the TV Show episodes that I have downloaded in the last week and have not viewed yet. I have tried the "Aired in" "the last" selections in the playlist and I can't seem to figure out how to make it work. If I put "week" or "1 week" or "7 days", I get shows that have aired well over 7 days or a week ago. Has anyone managed to figure out a way to do this? Could anyone tell me how to go about making this playlist work?

Thanks,
Mark
find quote
prae5 Offline
Team-XBMC Forum Moderator
Posts: 1,684
Joined: Jan 2009
Reputation: 28
Location: Cambridge, UK
Post: #4
hmmm I just tried this too and have a similar issue. I created the following video playlist:

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="episodes">
    <name>Aired in last 2 days</name>
    <match>all</match>
    <rule field="airdate" operator="inthelast">2 days</rule>
</smartplaylist>

Now it takes ages to load - about 20 minutes and then displays pretty much my entire episode library (8000 items). Relevant log section below and full debug here - http://pastebin.com/cKem5wU9

Code:
15:27:13 T:2690020608 M:917467136   DEBUG: SDLKeyboard: scancode: 36, sym: 13, unicode: 13, modifier: 0
15:27:13 T:2690020608 M:917467136   DEBUG: OnKey: 61453 pressed, action is Select
15:27:13 T:2690020608 M:917467136   DEBUG: CGUIMediaWindow::GetDirectory (special://profile/playlists/video/Aired in last 10 days.xsp)
15:27:13 T:2690020608 M:917467136   DEBUG:   ParentPath = [special://videoplaylists/]
15:27:13 T:2690020608 M:917454848   DEBUG: GetEpisodesByWhere query: select * from episodeview WHERE (c05 > '2 days')
15:27:16 T:2690020608 M:901799936   DEBUG: Time for actual SQL query = 2963
15:29:04 T:2690020608 M:875757568   DEBUG: Time to retrieve episodes from dataset = 107712
15:29:04 T:2690020608 M:875544576   DEBUG: Saving fileitems [special://profile/playlists/video/Aired in last 10 days.xsp]
15:29:04 T:2690020608 M:875544576   DEBUG:   -- items: 7877, sort method: 0, ascending: false
15:43:22 T:2953850880 M:810713088   DEBUG: thread start, auto delete: 0
15:43:22 T:2690020608 M:810700800   DEBUG: SDLKeyboard: scancode: 0, sym: 310, unicode: 0, modifier: 0
15:43:22 T:2962022400 M:810405888   DEBUG: Previous line repeats 3 times.
15:43:22 T:2962022400 M:810405888   DEBUG: thread start, auto delete: 1
15:43:22 T:2962022400 M:810405888   DEBUG: DoWork - trying to extract thumb from video file smb://bigbox/tv/Gilmore

Any dev's want to confirm this should work how we expect?
find quote
live4ever Offline
Fan
Posts: 556
Joined: Sep 2006
Reputation: 3
Post: #5
I brought this up a while ago, never got any responses - still can't get it to work either.

http://forum.xbmc.org/showthread.php?tid=48195
find quote
mwkurt Offline
Posting Freak
Posts: 973
Joined: Mar 2010
Reputation: 9
Post: #6
Thanks guys for confirming this for me. I hope that one of the Dev's can take a look into this issue for us. Sure would like to make it work.

Mark
find quote
prae5 Offline
Team-XBMC Forum Moderator
Posts: 1,684
Joined: Jan 2009
Reputation: 28
Location: Cambridge, UK
Post: #7
I've created a trac ticket for this - http://trac.xbmc.org/ticket/10675

Please feel free to add any useful information you may have to it.
find quote
Th3R00st3r Offline
Senior Member
Posts: 110
Joined: Nov 2008
Reputation: 0
Post: #8
Just thought I would chime in.

I looked at your error log and noticed the where clause in the database select statement
Code:
GetEpisodesByWhere query: [b]select * from episodeview WHERE (c05 > '2 days')[/b]

Depending on what is stored in the c05 field, I don't think >'2 days' would work because it's trying to filter on the actual string value '2 days', where I would expect the data in the c05 field to be a date. so I would think the statement would read

Code:
GetEpisodesByWhere query: [b]select * from episodeview WHERE (c05 > '11/13/2010')[/b]
--where the date passed is two days ago from today.

I would try and change this to read(I don't know if that syntax is correct)
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="episodes">
    <name>Aired in last 2 days</name>
    <match>all</match>
    <rule field="airdate" operator="inthelast">[b]11/13/2010[/b]</rule>
</smartplaylist>

That should generate the correct select statement, again depending on if a date is stored in the c05 field


This is a snippet from the stock menu showing the submenu item "Recently Added Movies". If we could just replicate that for smart playlist.

Code:
<control type="button" id="90118">
            <include>ButtonHomeSubCommonValues</include>
            <label>$LOCALIZE[31081]</label>
            <onclick>ActivateWindow(VideoLibrary,[b]RecentlyAddedMovies[/b],return)</onclick>
</control>
(This post was last modified: 2010-11-15 20:50 by Th3R00st3r.)
find quote
Th3R00st3r Offline
Senior Member
Posts: 110
Joined: Nov 2008
Reputation: 0
Post: #9
In addition to my above post, where are you getting the field "airdate" from? I don't see it in the list of fields from the wiki. Also, how do you know what parameter to pass for the value (string, date, etc..)

Quote:AVAILABLE FIELDS FROM THE :WIKI
album Album the song appears on
artist Artist of the song
albumartist Artist of the album the song appears on
genre Genre of the song
title Title of the song
year Year of the song
tracknumber Track number of the song
time Duration of the song
playcount Number of times the song has been played
filename Filename of the song (excluding path)
lastplayed Date/time of last time the song was played
rating User rating of the song (from 1-5). 0 signifies no rating.
comment Comment tag of the song
playlist Whether the song is in the given playlist
find quote
mwkurt Offline
Posting Freak
Posts: 973
Joined: Mar 2010
Reputation: 9
Post: #10
Hello Th3R00st3r,

Thanks for chiming in. I am not at my HTPC to test your theory on entering a date for use in the "aired in the last" field. I do feel, however, that this is not an option to get the desired results as the date would be constantly changing and would become a PITA to change every day. The playlist should work as prae5 and myself have tried to make it work.
The airdate option, while maybe not in the WIKI is most definately in XBMC itself.

Mark
find quote
Post Reply