Jump to content

New Plugin: Smart Playlists 2.0


ShaneP

Recommended Posts

horstepipe
2 minutes ago, N3RO815 said:

Hello.
Are you using the beta version of Emby? If yes, then the plugin does not work there. Only with the stable version.

I am also still waiting for it to work in the beta. ๐Ÿ˜‰

ahh yes sorry, forget to mention that. Yes I do ๐Ÿ™‚

Link to comment
Share on other sites

On 2/17/2022 at 2:04 PM, ShaneP said:

Hey All 2.1.0.3 ready for testing.

Version 2.1.0.3

  • Feature
    • Added "Country" Filter Criteria. Filter item on the "ProductionLocation" metadata.
    • Added "Genre (List)" Filter Criteria. Displays a drop down list of Genres already in the system, if the Genre does not exist the fall back it to use the already existing "Genre" string filter.
    • Added checkbox on delete confirmation to retain the generated playlist/collection
    • Sorted playlists/collections alphabetically
    • Added "Tag (Tree Crawl)" Criteria. Filters the item on tag or its parents tags (and so on, all the way to to root).
    • Added "Studio (Tree Crawl)" Criteria. Filters the item on it's studio value or its parents studio value (and so on, all the way to to root).
    • Updating sourcing to navigate to the lowest item in the path.
    • Added new Update types: Daily, Weekly, Monthly, The main difference between this and the shuffle update types is that the shuffle will remove all items in the playlist/collection prior to adding new items, and then shuffle the playlist randomly, where as the scheduled update types will only add new items to to the playlist/collection or remove items no longer meeting the criteria from the playlist/collection and NOT shuffle the playlist/collection. Scheduled update types are way better when it comes to performance as there are only small updates to the the backend after the initial populate.
    • Added updateType Icons
    • Added tooltips to buttons and icons
  • Bug
    • Fixed a legacy bug where the next shuffle date was calculated based on the last shuffle date isn't of the current run date. Meaning that if the playlist ran twice the shuffle date would be bumped twice.

As always code in the repo

SmartPlaylist-2.1.0.3.zip 171.89 kBย ยทย 9 downloads

Thanks for the update and your continued work. Unfortunately, I have to report that the "Source Type" feature is still not working properly. The playlist is now populated with tracks, but it seems to include songs from all collections and not just the selected one. Also, all my playlist with the source type "Collection" now have the same songs.

Link to comment
Share on other sites

ShaneP
7 minutes ago, N3RO815 said:

Hello.
Are you using the beta version of Emby? If yes, then the plugin does not work there. Only with the stable version.

I am also still waiting for it to work in the beta. ๐Ÿ˜‰

Next on the list!!! :)

  • Like 2
Link to comment
Share on other sites

ShaneP
1 minute ago, Kauzig said:

Thanks for the update and your continued work. Unfortunately, I have to report that the "Source Type" feature is still not working properly. The playlist is now populated with tracks, but it seems to include songs from all collections and not just the selected one. Also, all my playlist with the source type "Collection" now have the same songs.

Yea I saw some odd old code that might have caused this. Can you try again in 2.1.0.4 and let me know if youโ€™re still seeing an issue?

Link to comment
Share on other sites

13 minutes ago, ShaneP said:

Yea I saw some odd old code that might have caused this. Can you try again in 2.1.0.4 and let me know if youโ€™re still seeing an issue?

I did a quick test and now it looks like the playlists are only populated with a single or very few songs. But they are always the same songs and it looks like they are from other collections again.

Link to comment
Share on other sites

ShaneP
1 hour ago, Kauzig said:

I did a quick test and now it looks like the playlists are only populated with a single or very few songs. But they are always the same songs and it looks like they are from other collections again.

Thanks for that, really have no idea here, as it's working fine in my tests. Let me do a little digging. If you can provided any additional info that would be great.

Link to comment
Share on other sites

levander
5 hours ago, ShaneP said:

This is on the manager side, to make finding and editing smart playlist easier. What would be your use case to having this chronological?

Wait, are we talking about items contained in playlists/collections or we are talking about names of playlists/collections itself? ๐Ÿง

Link to comment
Share on other sites

ShaneP
28 minutes ago, levander said:

Wait, are we talking about items contained in playlists/collections or we are talking about names of playlists/collections itself? ๐Ÿง

Just the names of the smart play lists. So when you go to "Smart Playlist" on the admin side, a list of "smart playlists" are shown. That's the list that is sorted. Not touching the items.

Link to comment
Share on other sites

ginjaninja
15 hours ago, ShaneP said:

Support for the beta 4.7 is here. I've given it a quick run through. Let me know of any issues. (If you're not running the beta, don't install, this is a separated release on it's own branch.)

SmartPlaylist-2.2.0.0.zip 231.23 kBย ยทย 6 downloads

ive got a nice "recently played episode playlist" thanks....big performance improvement from when i last tried out a smartplaylist plugin a couple of years ago (perfectly useable rather than untenably slow)

FWIW i accidently createdย  a live playlist with a set of results of every episode and it crashed the server, and caused the reboot to labour to the point of nervousness that i ballsed up the system so badly id have to remove the plugin + configuration. When i could not find a configuration xml in plugins/configuration i thought i might of completely borked everything to point id never be able to load the plugin again as i couldnt clear the configuration. eventually the reboot did recover but i wonder if the playlist rules result in a playlist count of greater than X the user should be made to confirm once that it was intentional. possibly not worth the coding effort to save people from themselves ๐Ÿ™‚

i notice a very minor issue is that if I press 'back' on browser to the smartplaylist configuration page the eg. playlist edit settings button is not live and does nothing. tested on chrome and firefox on windows 10.

ย 

ย 

image.png

Link to comment
Share on other sites

ShaneP
36 minutes ago, ginjaninja said:

ive got a nice "recently played episode playlist" thanks....big performance improvement from when i last tried out a smartplaylist plugin a couple of years ago (perfectly useable rather than untenably slow)

FWIW i accidently createdย  a live playlist with a set of results of every episode and it crashed the server, and caused the reboot to labour to the point of nervousness that i ballsed up the system so badly id have to remove the plugin + configuration. When i could not find a configuration xml in plugins/configuration i thought i might of completely borked everything to point id never be able to load the plugin again as i couldnt clear the configuration. eventually the reboot did recover but i wonder if the playlist rules result in a playlist count of greater than X the user should be made to confirm once that it was intentional. possibly not worth the coding effort to save people from themselves ๐Ÿ™‚

i notice a very minor issue is that if I press 'back' on browser to the smartplaylist configuration page the eg. playlist edit settings button is not live and does nothing. tested on chrome and firefox on windows 10.

ย 

ย 

image.png

Great thanks for that. Iโ€™ll look into it. From the code side โ€œliveโ€ is very dangerous and TBH Iโ€™d like to completely remove it (but not sure how many people use it) for that very reason, the perf is dismal, basically if I recall from the code it gets all media items and checks them continuously. 2 possible solutions, 1. If live then you cannot use all media items as a source. Or 2 your forced to limit with a no greater than X.ย 

Link to comment
Share on other sites

ginjaninja
17 minutes ago, ShaneP said:

Great thanks for that. Iโ€™ll look into it. From the code side โ€œliveโ€ is very dangerous and TBH Iโ€™d like to completely remove it (but not sure how many people use it) for that very reason, the perf is dismal, basically if I recall from the code it gets all media items and checks them continuously. 2 possible solutions, 1. If live then you cannot use all media items as a source. Or 2 your forced to limit with a no greater than X.ย 

re: live.

my most common use case is keeping a list of recently played episodes up to date....i use it regularly so should get a sense pretty quickly how it works inc. performance wise in real world use. so a regular update is pretty usefull but maybe Live could be hooked (webhook?) into a set of useful server events..like i say episode played is a useful one for me. so its reevaluating when neccessary. It feels like there would be a finite list of events that would be relevant...mediaadded, mediadeleted,mediaplayed.

re: limiting scope/count

personally i would miss the mediaitems source (isnt this the primary useful source, i cant forsee the need to make playlist out other playlist/collection content myself). The biggest case i can think of is maintain a list of played music in the last period of time....so maybe 2500 tracks.

ย 

  • Like 1
Link to comment
Share on other sites

levander
4 hours ago, ShaneP said:

Great thanks for that. Iโ€™ll look into it. From the code side โ€œliveโ€ is very dangerous and TBH Iโ€™d like to completely remove it (but not sure how many people use it) for that very reason, the perf is dismal, basically if I recall from the code it gets all media items and checks them continuously. 2 possible solutions, 1. If live then you cannot use all media items as a source. Or 2 your forced to limit with a no greater than X.ย 

when I'm not exactly sure if I set the rules the way I supposed to I try to remember to check that limit to say 10 items. last ย week I wanted to create collection of items modified since 2022 and ended up with crashed server and ALL nfos populated with collection tag which lasted for half an hour. Sometimes I miss some tutorial or examples how to set rules properly to achieve something. for example when using exclude rules there's always something wrong.ย 

Link to comment
Share on other sites

horstepipe
22 hours ago, ShaneP said:

Support for the beta 4.7 is here. I've given it a quick run through. Let me know of any issues. (If you're not running the beta, don't install, this is a separated release on it's own branch.)

SmartPlaylist-2.2.0.0.zip 231.23 kBย ยทย 7 downloads

seems to work good here, too - nice plugin!

One thing I'm missing, maybe you could add it:
You can setup a community rating rule, but not a critic's rating. Would you mind adding this somewhen?

  • Like 1
Link to comment
Share on other sites

Having just recently come from Plex and missing Plex Meta Manager like crazy this plugin is a great help.

I'm running the latest version and trying to build a "New Releases" collection that lists that last 30 new releases sorted by newest first.

I've tried all options I can think of sorting by both ascending and descending, Limiting to 30 and sorting or choosing Sort Newly Added Items By... but the collection is always sorted by oldest -> newest. Any ideas?

P.S. I'd also love a critics rating option!

Screenshot_46.png

Screenshot_47.png

Link to comment
Share on other sites

44 minutes ago, PuffyToesToo said:

Have you tried toggling the 'Sort' button to 'On'?

ย 

f.JPG

Yep thatโ€™s what I was referring to above โ€œsort newly added itemsโ€ - no differenceย 

  • Like 1
Link to comment
Share on other sites

wordlover
On 2/20/2022 at 10:46 AM, akawoz said:

Having just recently come from Plex and missing Plex Meta Manager like crazy this plugin is a great help.

I'm running the latest version and trying to build a "New Releases" collection that lists that last 30 new releases sorted by newest first.

I've tried all options I can think of sorting by both ascending and descending, Limiting to 30 and sorting or choosing Sort Newly Added Items By... but the collection is always sorted by oldest -> newest. Any ideas?

P.S. I'd also love a critics rating option!

Screenshot_46.png

Screenshot_47.png

Why the need for a Collection or a playlist, whether Smart or built-in? Doesn't any Emby library screen allow sorting of content by "Added date," so you always have an on-the-fly view of your most recent content?

Link to comment
Share on other sites

3 hours ago, wordlover said:

Why the need for a Collection or a playlist, whether Smart or built-in? Doesn't any Emby library screen allow sorting of content by "Added date," so you always have an on-the-fly view of your most recent content?

First of all this is for "New Releases" which is distinct from "Date Added" ie. a 1932 movie downloaded today would show in Date Added but not in New Releases.

I'm trying to create an equivalent experience for my users who have come from Plex where I had a number of collections of content for them to choose from (when you have 6,000 movies and 15,000 episodes of TV stored it becomes much harder to decide what to watchย ๐Ÿ™‚)

By way of example here are some of the auto collections I was building under Plex before my move to Emby (which I am VERY happy with):

Oscar Nominated Movies 2022

Popular Movies (via IMDB)

Popular Kids Movies (via IMDB)

Top Rated Movies 2020-2022

Top Rated Documentaries

Oscars Best Picture Winners

Best of the 80s / 90s / 00s / 10s

Edited by akawoz
collections not categories
  • Like 1
Link to comment
Share on other sites

Hey there, Is there a way to batch edit or global change the update rate? I currently have over 300 Smart playlists set to live. and it is really starting to slow down emby. Is there a way to edit all of them to say once per day, without doing them individually?

Edited by Thorman
  • Like 1
Link to comment
Share on other sites

DarKni8
On 2/22/2022 at 6:05 AM, akawoz said:

First of all this is for "New Releases" which is distinct from "Date Added" ie. a 1932 movie downloaded today would show in Date Added but not in New Releases.

I'm trying to create an equivalent experience for my users who have come from Plex where I had a number of collections of content for them to choose from (when you have 6,000 movies and 15,000 episodes of TV stored it becomes much harder to decide what to watchย ๐Ÿ™‚)

By way of example here are some of the auto collections I was building under Plex before my move to Emby (which I am VERY happy with):

Oscar Nominated Movies 2022

Popular Movies (via IMDB)

Popular Kids Movies (via IMDB)

Top Rated Movies 2020-2022

Top Rated Documentaries

Oscars Best Picture Winners

Best of the 80s / 90s / 00s / 10s

This is something i explored with plex meta manager on plex. So does this plugin do the same thing here on emby?

Link to comment
Share on other sites

6 hours ago, DarKni8 said:

This is something i explored with plex meta manager on plex. So does this plugin do the same thing here on emby?

Not really, the playlists and collections are built from internal metadata as opposed to PMM that pulls in external lists from Trakt and IMDB to assemble same.ย 

Still Smart Playlists; is a very useful tool and Iโ€™m very thankful for the work being put into it

Link to comment
Share on other sites

ShaneP
On 2/19/2022 at 3:22 PM, levander said:

when I'm not exactly sure if I set the rules the way I supposed to I try to remember to check that limit to say 10 items. last ย week I wanted to create collection of items modified since 2022 and ended up with crashed server and ALL nfos populated with collection tag which lasted for half an hour. Sometimes I miss some tutorial or examples how to set rules properly to achieve something. for example when using exclude rules there's always something wrong.ย 

@levander Yea, I had a similar issue. I think I might build in so fail safes into the next release.ย 

On 2/19/2022 at 4:44 PM, horstepipe said:

seems to work good here, too - nice plugin!

One thing I'm missing, maybe you could add it:
You can setup a community rating rule, but not a critic's rating. Would you mind adding this somewhen?

@horstepipe Done :)

On 2/22/2022 at 4:57 AM, Thorman said:

Hey there, Is there a way to batch edit or global change the update rate? I currently have over 300 Smart playlists set to live. and it is really starting to slow down emby. Is there a way to edit all of them to say once per day, without doing them individually?

@Thorman Unfortunately not, by the original design the api takes one playlist at a time, what I can suggest is writing a small script that will pass through the "backend" data files (json) and just change the field there.

  • Thanks 1
Link to comment
Share on other sites

ShaneP
On 2/20/2022 at 6:46 PM, akawoz said:

Having just recently come from Plex and missing Plex Meta Manager like crazy this plugin is a great help.

I'm running the latest version and trying to build a "New Releases" collection that lists that last 30 new releases sorted by newest first.

I've tried all options I can think of sorting by both ascending and descending, Limiting to 30 and sorting or choosing Sort Newly Added Items By... but the collection is always sorted by oldest -> newest. Any ideas?

P.S. I'd also love a critics rating option!

Screenshot_46.png

Screenshot_47.png

@akawoz Thanks for the positive feedback. Firstly, the "Sort newly added" and "limit' act quite differently, hence why one gets disabled.

  • Sort Newly: Will only sort any new items in the particular order, so let's say your emby playlist have 500 items already, and smartplaylist picks up a new 10 items to add, it will only sort the 10 items in the order you selected and add them to the bottom of the playlist. (Unfortunately Emby playlists/collections don't have sort functionality). On that I was thinking of building another "scheduled" process off the plugin that will sort the playlist and collections at a certain time if needed, as the only way to do it, it to basically remove the items and re-add in the order you have selected, this could be very expensive on the fly.
  • Limited, what the code does is let's say 100 new items have been flagged to add to a list, limited would sort the 100 items, then take the top 30 and then clear out the playlist and re-add, I have recently changed a little code here so if you're not seeing that behavior I'd say there's a bug, I will re-test and if I pick something up I will fix it for the next release. Will keep you posted.
  • Like 1
  • Thanks 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...