Jump to content

New Plugin: Smart Playlists 2.0


Recommended Posts

Posted
On 3/19/2024 at 4:03 PM, soderlund91 said:

Okay, playing around some more and i seem to get episodes in the list, but not the tv-show. 

What i'm trying to do is for example make a collection of Marvel. So i thought the only filter needed would be " studio > contain > "Marvel". 
This gives me all movies but none of the series.

Have you tried using "Studio (Treecrawl)", what this will do is crawl up  the episode chain...  so first look at the episode, then the season then the series looking for the info. This will add the "Marvel Series" as individual items on a playlist. 

Posted
On 3/19/2024 at 7:52 PM, mickle026 said:

Just for your info, I don't know if this is your issue with Firefox but it might be so I have posted a link.  Firefox keeps 3 cached versions of the dom.  Two of them don't refresh and are static.  You have to change the way the page loads.  I discussed it here with @VicMoore.

https://emby.media/community/index.php?/topic/124492-pseudo-tv-for-emby/&do=findComment&comment=1312171

Great, thanks will look into this...

Posted
On 3/20/2024 at 1:31 PM, ginjaninja said:

it seems in some circumstances 2.5.0.0 is not respecting the source setting, unless I'm misunderstanding the logging

Rather than enumerating the database (mediaitems) for members the plugin was enumerating the playlist itself.

in any case the contents are not getting updated correctly.

eg

image.thumb.png.4915d65fe72dabcb0be5b8c0f55d9bd6.png

 

[20/03/2024 01:18:50]: Execution triggered by 'OnSave'
[20/03/2024 01:18:50]: Source is Nick - Watched Movies  [Live]
[20/03/2024 01:18:50]: Dealing with 0 media items from source.
[20/03/2024 01:18:50]: Query: WHERE (Media Type is Movie AND Last Played is in the last Type: Weeks, Value: 10 for Nicholas Bird)   
[20/03/2024 01:18:50]: Comparing: 'Poor Things', Field: 'Media Type', Expected: 'Movie', Actual: 'Movie', Operator: 'is', Type: 'listMapValue', Context 'Nicholas Bird', Matched: True
[20/03/2024 01:18:50]: Comparing: 'Poor Things', Field: 'Last Played', Expected: 'Type: Weeks, Value: 10', Actual: '20/03/2024 00:00:00 +00:00', Operator: 'is in the last', Type: 'date', Context 'Nicholas Bird', Matched: True
[20/03/2024 01:18:50]: 'Poor Things' added to playlist/collection!!!!
[20/03/2024 01:18:50]: Comparing: 'Avatar', Field: 'Media Type', Expected: 'Movie', Actual: 'Movie', Operator: 'is', Type: 'listMapValue', Context 'Nicholas Bird', Matched: True
[20/03/2024 01:18:50]: Comparing: 'Avatar', Field: 'Last Played', Expected: 'Type: Weeks, Value: 10', Actual: '18/03/2024 00:00:00 +00:00', Operator: 'is in the last', Type: 'date', Context 'Nicholas Bird', Matched: True
[20/03/2024 01:18:50]: 'Avatar' added to playlist/collection!!!!
[20/03/2024 01:18:50]: Comparing: 'Saltburn', Field: 'Media Type', Expected: 'Movie', Actual: 'Movie', Operator: 'is', Type: 'listMapValue', Context 'Nicholas Bird', Matched: True
[20/03/2024 01:18:50]: Comparing: 'Saltburn', Field: 'Last Played', Expected: 'Type: Weeks, Value: 10', Actual: '27/01/2024 00:00:00 +00:00', Operator: 'is in the last', Type: 'date', Context 'Nicholas Bird', Matched: True
[20/03/2024 01:18:50]: 'Saltburn' added to playlist/collection!!!!
[20/03/2024 01:18:50]: Comparing: 'The Holdovers', Field: 'Media Type', Expected: 'Movie', Actual: 'Movie', Operator: 'is', Type: 'listMapValue', Context 'Nicholas Bird', Matched: True
[20/03/2024 01:18:50]: Comparing: 'The Holdovers', Field: 'Last Played', Expected: 'Type: Weeks, Value: 10', Actual: '20/01/2024 00:00:00 +00:00', Operator: 'is in the last', Type: 'date', Context 'Nicholas Bird', Matched: True
[20/03/2024 01:18:50]: 'The Holdovers' added to playlist/collection!!!!
[20/03/2024 01:18:50]: Dealing with 4 after filter.
[20/03/2024 01:18:50]: Removing missing episodes if any.
[20/03/2024 01:18:50]: Limiting items to 10 based on Played date desc:Descending:Shuffled - False.
[20/03/2024 01:18:50]: Complete

 

Hey @ginjaninja, you are correct, when selecting media items it should enumerate all items... Which from what I see it does, I think the logs could be clearer, 0 normal means it has no items to start with. Also, I see the playlist is 'Live' which reacts a little different, if 'Live' it caches items from an event and then processes them... So when the cache is full (10 items) or time (30 seconds) elapses it will process items in the cache to avoid firing to often. 

Posted
On 3/23/2024 at 12:22 AM, joechilds said:

Thanks @ShaneP!

Is there a reason that this new version isn’t available on your GitHub page under “releases”?

And any chance you might add this to the official Emby plugin store?

Jeu @joechilds2 reasons... 
1. This is a very experimental release. 

2. I got lazy and forgot :), I am busy trying to get some of the annoying bugs resolved and will put out 2.5.1.4830 soon, I'll be sure to include this in the releases. 

  • Thanks 1
feerlessleadr
Posted
34 minutes ago, ShaneP said:

Hey @feerlessleadr, I am seeing the same thing, seems to be a bug within the underlying Emby code, I have reached out. So hopefully this gets resolved soon. 

I've noticed that I'm able to create the playlist in manual mode, set the sort order, then save and generate the playlist. Then, switch it back to live, and that essentially solves the issue. 

Additionally, eventually the sort job does run overnight, I'm just not able to trigger it manually. 

ginjaninja
Posted
19 hours ago, ShaneP said:

Hey @ginjaninja, you are correct, when selecting media items it should enumerate all items... Which from what I see it does, I think the logs could be clearer, 0 normal means it has no items to start with. Also, I see the playlist is 'Live' which reacts a little different, if 'Live' it caches items from an event and then processes them... So when the cache is full (10 items) or time (30 seconds) elapses it will process items in the cache to avoid firing to often. 

Thanks so might the reason ,why i thought the content of the live playlist was incorrect, be that I was expecting

On creation, trawl the database for matching content and initially populate the playlist and thereafter continue to populate matching content from database on a 'live/regular' basis...

when in fact "live" means

On creation, do not trawl the database and do not initially populate the playlist but thereafter add matching content based on live events (not a review of the database).

Have i understood live correctly? do you think?

In that case i think for my "Recently watched playlists" i possibly want to set the playlists to manual in the first instance on creation (so the content is populated from database) and then set them to live thereafter.

Posted
7 hours ago, ginjaninja said:

Thanks so might the reason ,why i thought the content of the live playlist was incorrect, be that I was expecting

On creation, trawl the database for matching content and initially populate the playlist and thereafter continue to populate matching content from database on a 'live/regular' basis...

when in fact "live" means

On creation, do not trawl the database and do not initially populate the playlist but thereafter add matching content based on live events (not a review of the database).

Have i understood live correctly? do you think?

In that case i think for my "Recently watched playlists" i possibly want to set the playlists to manual in the first instance on creation (so the content is populated from database) and then set them to live thereafter.

100% Correct @ginjaninja, but I saw somethings similar on one of my playlists, so decided to track through the code, and it seems that if media type is Episode, the episode is not being retrieve for the lib (Media.Controller) that queries the underlying data. I spent the day on this and could not find a solution..... yet. Also, same lib seem to give me an SQLLite exception when trying to remove items from a playlist for Sort... so there's that as well.

So gonna try get to the bottom of this headache :).

  • Thanks 1
o0cynix0o
Posted
On 3/25/2024 at 8:49 AM, feerlessleadr said:

I've noticed that I'm able to create the playlist in manual mode, set the sort order, then save and generate the playlist. Then, switch it back to live, and that essentially solves the issue. 

Additionally, eventually the sort job does run overnight, I'm just not able to trigger it manually. 

This got my list loading again. Seems doing this for one got it working on all of them. Thanks for this. Waiting for a fix. "Raw rolls on!"

 

Posted

While you're in the code making changes, I'd love to see IMDB, TVDBID, etc as rule options :)

Posted

I know now might not be the best time to ask for new features but something I would find very helpful is an option to...

Add Tag as as type along with Collection and Playlist

Instead of a playlist or a collection being created have the ability to add a tag to an item that meets the criteria outlined.

In essence it would be a smart tags feature.

GrimReaper
Posted
50 minutes ago, shinedou said:

Add Tag as as type along with Collection and Playlist

Instead of a playlist or a collection being created have the ability to add a tag to an item that meets the criteria outlined.

In essence it would be a smart tags feature.

IMHO that would be out of scope of this plugin, you should take a look at Bulky plugin instead. 

 

  • Agree 1
Posted

I use the Bulky plugin and it works well but everything is manual.  I thought the idea of smart tags fits in with the idea of smart collections since they are in essence the same concept, just presented differently in Emby.  

 

  • 2 weeks later...
Mister D
Posted

I'm having an issue with this plugin. I'm using version 2.5.0.4810 with server version 4.9.0.12 and my live playlists keep showing up as empty. I previously resolved the issue by duplicating the playlist which populated the playlist like usual but after a few days, I guess when the scheduled task to update playlists runs, the playlist gets wiped out again. I duplicated the playlist again but I guess once the scheduled tasks runs again it will break the populated playlists again. Any idea what could be causing this and how to resolve it?

GrimReaper
Posted
12 minutes ago, Mister D said:

Any idea what could be causing this

Likely you being on beta 4.9 server. 

  • Sad 1
Posted
2 hours ago, Mister D said:

I'm having an issue with this plugin. I'm using version 2.5.0.4810 with server version 4.9.0.12 and my live playlists keep showing up as empty. I previously resolved the issue by duplicating the playlist which populated the playlist like usual but after a few days, I guess when the scheduled task to update playlists runs, the playlist gets wiped out again. I duplicated the playlist again but I guess once the scheduled tasks runs again it will break the populated playlists again. Any idea what could be causing this and how to resolve it?

Hi, everyone is happy to help. The best place to start is:

Thanks.

Posted
8 hours ago, Mister D said:

I'm having an issue with this plugin. I'm using version 2.5.0.4810 with server version 4.9.0.12 and my live playlists keep showing up as empty. I previously resolved the issue by duplicating the playlist which populated the playlist like usual but after a few days, I guess when the scheduled task to update playlists runs, the playlist gets wiped out again. I duplicated the playlist again but I guess once the scheduled tasks runs again it will break the populated playlists again. Any idea what could be causing this and how to resolve it?

Hey, has not been tested with this version of Emby. Playlists have there own logs (menu option) this might give you some insight into what might be happening.

Mister D
Posted
9 hours ago, ShaneP said:

Hey, has not been tested with this version of Emby. Playlists have there own logs (menu option) this might give you some insight into what might be happening.

This is the log for one of the playlists that currently do not populate anything:

 

[12/04/2024 05:11:24]: Execution triggered by 'Scheduled'
[12/04/2024 05:11:24]: Source is *New Movies* (Copy) [Live]
[12/04/2024 05:11:24]: Dealing with 1 media items from source.
[12/04/2024 05:11:24]: Query: WHERE (Media Type is Movie AND Date Added is in the last Type: Months, Value: 3)   
[12/04/2024 05:11:24]: Comparing: 'theme', Field: 'Media Type', Expected: 'Movie', Actual: 'Video', Operator: 'is', Type: 'listMapValue', Context 'Mister D', Matched: False
[12/04/2024 05:11:24]: 'theme' failed to match on criteria.
[12/04/2024 05:11:24]: Dealing with 0 after filter.
[12/04/2024 05:11:24]: Complete
  • 2 weeks later...
LongMan
Posted (edited)

EpiMode: Season seems not to work for me. Is anyone else having this problem? On the same query, if I change EpiMode to Series it is populated, however with seasons it is not. just says it has 18 items but none is shown. The same query worked before the upgrade.

Cheers,
LongMan

Edited by LongMan
Posted

Hey @LongMan I have found and fixed a few issues, is it in shuffle mode? What does the logs say for the playlist in question. Should put out a stable release on the next few days. Even the debugger is broken for me. So a bit slow to root cause issues.

  • 3 weeks later...
chander421
Posted

Links for the new version (4,8) are dead...

Junglejim
Posted
29 minutes ago, chander421 said:

Links for the new version (4,8) are dead...

This seems to DL for me. Which link are you referring to?

 

chander421
Posted
29 minutes ago, Junglejim said:

This seems to DL for me. Which link are you referring to?

 

Yes, it's working again! Strange, I had an invalid link a few hours ago...

Thanks a lot!

  • 2 weeks later...
Posted

Does this plug in still work?

I grabbed the latest dll, restarted emby, and when I go to the Smart Playlist page in settings, its just blank, there's nothing to select or do.

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...