INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Limit Smartlist to latest episode of podcast  (Read 3419 times)

RedJ

  • Galactic Citizen
  • ****
  • Posts: 298
Limit Smartlist to latest episode of podcast
« on: January 20, 2016, 08:59:34 am »

I have a smartlist that contains a random shuffle of podcasts I subscribe to.  I want to exclude all but the latest episode of some news feeds since I don't want to listen to old news.  I can't get MC to limit the feed itself to only the latest episode, so I'm looking to limit it via smartlist.  I can't locate any examples where a specific thing is limited, however, only categories of things (ie. limit 1,1[genre]) which would limit other subscriptions I don't want included.

In a nutshell, I want to limit a specific Artist or Album to the single latest version without affecting any other items in the smartlist.  Is there any way to use the smartlist language to accomplish this?
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Limit Smartlist to latest episode of podcast
« Reply #1 on: January 20, 2016, 09:32:35 am »

Sure, that's cake.  :)

Make a new smart list set up the rules to show only this podcast series.  Now in the modifiers, sort by [Date Imported] (z-a) (descending).  Add another modifier to limit number.  Set number to 1.  Now you'll have just the one last episode of this podcast.

If [Date Imported] doesn't work, then use [Date Recorded], or something else that identifies the "newest" one from the rest.

Brian.
Logged

RedJ

  • Galactic Citizen
  • ****
  • Posts: 298
Re: Limit Smartlist to latest episode of podcast
« Reply #2 on: January 20, 2016, 09:40:28 am »

Thanks for the suggestion, but I already have it solved for a podcast by itself. I'm trying to get only the latest episode of news podcasts that update every hour in a smartlist containing dozens of other podcasts that aren't time-sensitive so I don't want limited.

Make a new smart list set up the rules to show only this podcast series.  Now in the modifiers, sort by [Date Imported] (z-a) (descending).  Add another modifier to limit number.  Set number to 1.  Now you'll have just the one last episode of this podcast.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Limit Smartlist to latest episode of podcast
« Reply #3 on: January 20, 2016, 10:52:26 am »

You can't do that all in a single Smartlist, unless you have a way to filter the Podcasts that you do want limited by some characteristic they all share (like [Genre] or something). But it would be easy to do with two smartlists.

Smartlist 1 (the Limiter):

Code: [Select]
[Media Sub Type]=[Podcast] [Album]=[Podcast Name #1],[Podcast Name #2],[Podcast Name #3] ~sort=[Date]-d ~limit=-1,1,[Album]Replace Podcast name #1-3 with your own podcasts that you want limited.

This list will result in just those that you want limited, and only include the single most recently released episode of each.

Smartlist 2 (the Shuffle):

Now, for smartlist number two, I can't give you exact code to paste in, because it depends on what you name #1, but you're going to do essentially this:

1. [Media Sub Type]=[Podcast]
2. [Album] is not any [Podcast Name #1], [Podcast Name #2], [Podcast Name #3] (the same list as above, but we want to exclude them).
3. [Playlist] is any the Playlist you created above.
4. Add a shuffle modifier.

Now, go to Import/Export on this playlist, and surround items #2 and #3 with parenthesis, and put the word OR in between them.

Now, this list will result in a shuffle of the contents of Smartlist #1 AND the rest of your Podcast episodes (so those you don't want limited). This is the one you actually play or sync or use or whatever.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

RedJ

  • Galactic Citizen
  • ****
  • Posts: 298
Re: Limit Smartlist to latest episode of podcast
« Reply #4 on: January 20, 2016, 01:55:52 pm »

Thank you Glynor. I will try this.  I actually looked into nesting smartlists, but nothing showed up in playlists for me despite having dozens of custom smartlists so I assumed it couldn't be done that way. 

You can't do that all in a single Smartlist, unless you have a way to filter the Podcasts that you do want limited by some characteristic they all share (like [Genre] or something).

MC will actually allow me to automatically assign a podcast to a custom genre such as Podcast.News.NAME, which you say would let me do it within a single smartlist.  Would I basically apply the same principle as your two smarlist example, essentially constructing two sets of rules and using parentheses and the OR operator to do it?

Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Limit Smartlist to latest episode of podcast
« Reply #5 on: January 20, 2016, 02:24:55 pm »

After I wrote that, I realized I was wrong. The ~limit modifier applies to the entire search, and there is no way to group it (with an OR) while allowing all of a particular other search-result set to pass through.

So, no, it needs to be two lists. If you can assign a [Genre] (such as "News" or something) to the Playlists, though, you can simplify it a bit, though.

Instead of your [Album] is X,X,X,X and [Album] is not X,X,X,X rules, you could just have [Genre]=[News] for the limited list, and (-[Genre]=[News] or [Playlist]="blah") in your shuffled list.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

RedJ

  • Galactic Citizen
  • ****
  • Posts: 298
Re: Limit Smartlist to latest episode of podcast
« Reply #6 on: January 20, 2016, 02:58:37 pm »

OK, thanks for saving me from a bunch of frustration trying to make the single list work.  I wish Media Center had a more elegant solution for this (*cough *cough).  In addition to Podcast listening, I think folks who watch recorded TV shows via MC would appreciate being able to create smartlists that only display the most recent episodes of their shows.  I'm sure there are other applications I am not thinking of.

Anyways, thanks so much for the help; I could not have done this without it.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Limit Smartlist to latest episode of podcast
« Reply #7 on: January 20, 2016, 03:06:11 pm »

Oh, you could easily do a list that only shows the most recent episode of a show. That's what the ~limit modifier is for!

The issue is that you want some shows limited, and others to have all episodes included, in the same list. This requires two lists. But that's okay, because MC can easily use nested lists.

One issue worth mentioning... By default when MC references a Playlist from another Search, it does so by Playlist ID. I'd recommend you DO NOT do it this way, however, because Playlist IDs can get messed up when you sync a Library Server client. See this thread for more details:
https://yabb.jriver.com/interact/index.php?topic=75183.0

However, there is a simple solution. The [Playlist] is any search term can also do a text search on the playlist's name, and these don't get messed up by the sync. You just have to add the search term manually in the Import/Export section of the Smartlist (or search) wizard.  See Marko's post in this thread for more information:
https://yabb.jriver.com/interact/index.php?topic=102410.msg710509#msg710509

I've tweaked mine and they all work perfectly now, whether a Library client is connected to the server or not.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

RedJ

  • Galactic Citizen
  • ****
  • Posts: 298
Re: Limit Smartlist to latest episode of podcast
« Reply #8 on: January 21, 2016, 10:04:01 am »

I've now had a chance to implement this and it works like a charm (thank you, thank you, Glynor).  I thought I'd share my final smartlist settings so that someone finding this thread searching for a similar solution will have something explicit to refer to when working it out for themselves.  Also, I have a few additional settings that might interest others doing something similar.

Here's the smartlist:
Code: [Select]
[Media Type]=[audio] (-[Feed URL]=[] or [Media Sub Type]=[Podcast]) (-[Album]=[News Radio] or p="10. News Radio") [% Listened]=<90 ~d=a ~sort=[Date]-d ~nodup=[Name] ~sort=[Date]-d,[Artist]
Here is a breakdown of what the settings do:
[Media Type]=[audio] I don't want video podcasts in this smartlist
([Media Sub Type]=[Podcast] or -[Feed URL]=[]) I want podcasts, but some podcasts refuse to get set as a podcast, so I look for the existence of an existing feed
(-[Album]=[News Radio] or p="10. News Radio") used the playlist name shortcut referenced by Marko via Glynor to avoid library server sync problems.  I added quotes around the exact playlist name to avoid unintentionally catching playlists that share the same word in them.
[% Listened]=<90 This counts podcasts that are 90% listened to as complete and doesn't show them.  It depends on the creation of a custom field named "% Listened" using the following expression: Math(round(([Bookmark] / ([Duration, 0] * 1000)) * 100))&DataType=[integer] which is also useful to add as a column inside podcast and audiobook playlists.
~d=a Limit database to all, which overcomes the problem of MC only showing the podcasts that have already been downloaded to disk.
~nodup=[Name] Sometimes episodes get double-posted in the feed if they're changed after the original posting.  This will get rid of those except if their titles were changed.
~sort=[Date]-d This is because I have hourly news feeds, so I want them to rise to the top.  You might have episodic podcasts that should be sorted from oldest first to listen in order, or prefer a random shuffle for variety.  After the playlist starts, you can drag the playing now order around to make adjustments anyways (assuming desktop playback).

Hopefully, some of this will help other like-minded podcast aficionados control freaks like me.  Instrumental in figuring out some of the above workarounds were Matt (include undownloaded) and MrC (% Listened)
Logged
Pages: [1]   Go Up