Jump to content

New Plugin: Smart Playlists 2.0


ShaneP

Recommended Posts

horstepipe
1 hour ago, emdubya77 said:

It seems to vary between clients - for example it's possible on Fire TV but not Android mobile.

This applies to all playlists, not just from this plugin - I'm sure I've seen a FR somewhere.

are you sure this works on FireOS? At least it doesn't work on Android TV here (not the mobile version of the app). Yeah I don't find the FR, too - but was also sure there was one.

Link to comment
Share on other sites

Junglejim
2 hours ago, horstepipe said:

are you sure this works on FireOS? At least it doesn't work on Android TV here (not the mobile version of the app). Yeah I don't find the FR, too - but was also sure there was one.

I personally don't own a FireOS device so can't comment there.. but Android TV on a Sony TV and Android mobile on a Samsung tablet both don't show detailed info. It's just play, same as the web browser. It's a shame smart playlists are so neglected on this platform, apps like XBMC/Kodi have had this functionality for years.

Link to comment
Share on other sites

Junglejim
12 minutes ago, emdubya77 said:

Yep, but only with the central 'select' button (open/play/play from here/remove). Strangely if I use the 'menu'/hamburger button I don't get the 'open' choice.

I found these....eventually:

 

Cool! Thank's for searching these requests out.. Added my +1 to all of them. :)

  • Like 1
Link to comment
Share on other sites

BaiGanJia
On 6/27/2022 at 5:39 PM, Bazzu85 said:

@ShaneP

When modifying a smart playlist removing the "limit" flag the associated playlist is not updated. the only solution I found was to delete the playlist and let the plugin rebuild it..

additionally I encountered this problem many times today..

an example is this:

image.thumb.png.10c9ab35fdfd35b4b157c94506352382.png

image.png.9c9a3535f3b7824119f11f717a9f0f96.png

If I for example remove the played condition this is the log:

image.png.9ac6d1129039a43e99b028ffd4660575.png

and the playlist remain as previously.

if I delete the playlist and save again in the plugin:

image.thumb.png.92583a6e41a806f8d33aab29df1bd68d.png

image.png.a2c77a01ac165176416d3de2810f36d7.png

 

After that adding again the is played false and saving, update the playlist back to 262 items without the delete method..

Me too, the playlists created before are invalid and have to be recreated
Link to comment
Share on other sites

  • 2 weeks later...
dRuEFFECT

I'm having trouble trying to accomplish something specific here, hoping it's possible or can figure out some kind of workaround.

TLDR: trying to get a smart playlist to show media items from a manual playlist, but filter to unwatched items only and sort by rating.

My wife and I separately add movies to the server and don't always agree on what to watch when we have time to sit down for a movie. I wanted to group movies into a collection or playlist like "Movie Queue: Agreed" that we can just spam add a bunch of movies on the fly. Taking it a step further I want movies to drop off after it's been watched. I would have preferred adding movies to an agreed collection, as to avoid adding the same movie twice, but there's no option to add a movie to a collection on the android tv app. 

I created a manual playlist called "Movie Queue: Agreed" for which I can use my TV remote on an Nvidia Shield to add new movies to this playlist easily, just bring up the context menu and add to playlist. I tried creating a smart playlist using the manual playlist as a source type, with the sort and filter options applied, but no media items are found. Does this not work? Am I doing something wrong?

image.png.60ec5efce3a650dd6e274f766dff75d9.png

image.png.707e598d3725268f05e296adc1a83b19.png

image.png.c3e5efa17c8493ec87f242d9ee46a36d.png

Link to comment
Share on other sites

Junglejim
7 hours ago, dRuEFFECT said:

I'm having trouble trying to accomplish something specific here, hoping it's possible or can figure out some kind of workaround.

TLDR: trying to get a smart playlist to show media items from a manual playlist, but filter to unwatched items only and sort by rating.

My wife and I separately add movies to the server and don't always agree on what to watch when we have time to sit down for a movie. I wanted to group movies into a collection or playlist like "Movie Queue: Agreed" that we can just spam add a bunch of movies on the fly. Taking it a step further I want movies to drop off after it's been watched. I would have preferred adding movies to an agreed collection, as to avoid adding the same movie twice, but there's no option to add a movie to a collection on the android tv app. 

I created a manual playlist called "Movie Queue: Agreed" for which I can use my TV remote on an Nvidia Shield to add new movies to this playlist easily, just bring up the context menu and add to playlist. I tried creating a smart playlist using the manual playlist as a source type, with the sort and filter options applied, but no media items are found. Does this not work? Am I doing something wrong?

image.png.60ec5efce3a650dd6e274f766dff75d9.png

image.png.707e598d3725268f05e296adc1a83b19.png

image.png.c3e5efa17c8493ec87f242d9ee46a36d.png

Hi mate, I just tested it and got it working with what I think your after (v2.3.0.2 smart playlists). I worded the playlists different but it's the same as you I think.

I created a basic Emby playlist called Watch list that would equal your "Movie Queue: Agreed". Then I created a live smart playlist called My watch list...

Screenshot_2022-07-08_17-10-16.thumb.png.224f4c54091a23158ddcda8f89b4e063.png

Not to sure how really live updates are with smart playlists, its not instant for me anyway. If I go back to the edit settings of the live smart playlist and hit save it updates. didn't have the patience to wait around to see if it updated after a few minutes. Maybe set it to update daily.

Edited by Junglejim
Link to comment
Share on other sites

dRuEFFECT
27 minutes ago, Junglejim said:

I just tested it and got it working with what I think your after

And its showing your media items in the new smart playlist? I didn't have media type = Movie but tried adding that and even recreating a smart playlist, but still no luck here. 

I also noticed your smart playlist doesn't have a standalone sort optim, only sorting with a limit. Is there a different version of smart playlists out? I'm running 2.3 on Emby 4.7.5

Link to comment
Share on other sites

Junglejim
2 minutes ago, dRuEFFECT said:

And its showing your media items in the new smart playlist? I didn't have media type = Movie but tried adding that and even recreating a smart playlist, but still no luck here. 

I also noticed your smart playlist doesn't have a standalone sort optim, only sorting with a limit. Is there a different version of smart playlists out? I'm running 2.3 on Emby 4.7.5

Yea mate showing media, I only added a few test movies.

This is my Emby list, as you can see I marked The lost city as watchedScreenshot_2022-07-08_17-26-58.thumb.png.68f09085fbca93fe8eef4875566a1d71.png

This is the smart playlist sorted by rating and unwatched

Screenshot_2022-07-08_17-27-32.thumb.png.545d3f783e028ef0fd6d007e7e3f95de.png

Link to comment
Share on other sites

Junglejim

I running v2.3.0.2 of smart playlists on Emby 4.7.5. Yea your screenshot does look like a different version.

Edited by Junglejim
Link to comment
Share on other sites

dRuEFFECT
11 hours ago, Junglejim said:

I running v2.3.0.2 of smart playlists on Emby 4.7.5. Yea your screenshot does look like a different version.

I upgraded the plugin to 2.3.0.2 and it's still not working for me. Tried creating both new manual and smart playlists after upgrading. @ShaneP anything else I can do to troubleshoot this?

image.thumb.png.4706f980a3c9981cecb3c1fee28603fe.png

image.thumb.png.ade5bd8afe5b8b69786956c9ee07504a.png

image.thumb.png.87bb332ac668f64b2f8c3b59703f9bb3.png

image.png.4984002c9fc964486e8ab9ae78f8c909.png image.png.1b3ece468fade995a1d57889fcabee54.png

Link to comment
Share on other sites

ShaneP
12 minutes ago, dRuEFFECT said:

I upgraded the plugin to 2.3.0.2 and it's still not working for me. Tried creating both new manual and smart playlists after upgrading. @ShaneP anything else I can do to troubleshoot this?

image.thumb.png.4706f980a3c9981cecb3c1fee28603fe.png

image.thumb.png.ade5bd8afe5b8b69786956c9ee07504a.png

image.thumb.png.87bb332ac668f64b2f8c3b59703f9bb3.png

image.png.4984002c9fc964486e8ab9ae78f8c909.png image.png.1b3ece468fade995a1d57889fcabee54.png

@dRuEFFECT Silly question but are you sure that the movies in source playlist haven't been played already. I am busy working on the next version and there will be an option to verbose debug to try help trouble shoot these types of issues. I plan to have this done by Sunday.

Link to comment
Share on other sites

dRuEFFECT
2 hours ago, ShaneP said:

Silly question but are you sure that the movies in source playlist haven't been played already. I am busy working on the next version and there will be an option to verbose debug to try help trouble shoot these types of issues. I plan to have this done by Sunday.

Yea they're all unwatched. Even just a filter of media type = movies returns nothing.

I'll try out the verbose logging as soon as it's ready. Thanks!

Link to comment
Share on other sites

Junglejim
6 hours ago, ShaneP said:

@dRuEFFECT Silly question but are you sure that the movies in source playlist haven't been played already. I am busy working on the next version and there will be an option to verbose debug to try help trouble shoot these types of issues. I plan to have this done by Sunday.

Hi mate looking forward to the new release.

One thing I came across while testing the request from @dRuEFFECT was that the played=false is not picked up across different users.

For example I created the playlist with my admin account which I don't watch any media with. It created the playlist fine but if I load that playlist with my main user that has watched a lot of content in the list, it still shows the list created by admin and the movies will have the watched tick but are not filtered out.

The only thing I can think of is to give my main user temporary admin rights and create the smart playlist in question?

Just tested that and it works, would be nice not to have to do that but I'm not sure if that's possible? ;)

 

Edited by Junglejim
Link to comment
Share on other sites

Junglejim
4 hours ago, dRuEFFECT said:

Yea they're all unwatched. Even just a filter of media type = movies returns nothing.

I'll try out the verbose logging as soon as it's ready. Thanks!

Hi mate, yea I just tried to create a new smart playlist from a playlist and it didn't work. previously I used a existing test playlist to edit and it worked straight away.

So it looks like that function is a little funky. :) Try creating a standard media items playlist and get that to populate, then edit that to use your Emby playlist and see if that works.

Link to comment
Share on other sites

dRuEFFECT
12 hours ago, Junglejim said:

Hi mate, yea I just tried to create a new smart playlist from a playlist and it didn't work. previously I used a existing test playlist to edit and it worked straight away.

So it looks like that function is a little funky. :) Try creating a standard media items playlist and get that to populate, then edit that to use your Emby playlist and see if that works.

Yooo that was exactly it! Seems there's a bug with creating a smart playlist based on media type of playlist, maybe it's failing to create the new playlist which it loads the items into, I noticed that creating a smart playlist with media type=playlist sets the "internal item id" = -1. But once the smart playlist is created based from media items, the destination playlist is created, then editing the smart playlist has the destination set properly and can load items sourced from another playlist. @ShaneP FYI for this issue, not 100% sure and just speculating on the reason, but this workaround works for me.

Thank you both!

edit: also, it looks like the smart playlist only shows a movie once even if it's in the source playlist twice, which works out perfect for what i wanted

Edited by dRuEFFECT
Link to comment
Share on other sites

ShaneP
2 hours ago, dRuEFFECT said:

Yooo that was exactly it! Seems there's a bug with creating a smart playlist based on media type of playlist, maybe it's failing to create the new playlist which it loads the items into, I noticed that creating a smart playlist with media type=playlist sets the "internal item id" = -1. But once the smart playlist is created based from media items, the destination playlist is created, then editing the smart playlist has the destination set properly and can load items sourced from another playlist. @ShaneP FYI for this issue, not 100% sure and just speculating on the reason, but this workaround works for me.

Thank you both!

edit: also, it looks like the smart playlist only shows a movie once even if it's in the source playlist twice, which works out perfect for what i wanted

Great, the verbose logging is complete just testing on my server, and it makes totally sense around played criteria failure, as the legacy code just uses the current user logged in. For user sensitive metadata, I’m thinking of adding a drop down on the criteria field where one can select the user to apply the filter with. Next on the list. Once that is done and I’ve done my internal tests I’ll put out a release. Thanks again for getting to the bottom of this dudes.

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

ShaneP

Version 2.4.0.0

Feature

  • Added verbose log to info section.
  • Added link to open up generated playlist.
  • General optimization and clean up.
  • Added Sort (Then Bys) to Sort Jobs.
  • Added Sorting to source list.
  • Added Multiple Add functionality to PlaylistEditor.
  • Added user based criteria for following user metadata fields:
    • Favorite
    • LastPlayed
    • Play Count
    • Played

Bug

  • If any playlists backend files are corrupt, skips loading the playlist and moves the file to a *.failed file, and continues to load. Currently just crashes out with no notification.
  • Fixed bug when source was playlist or collection not picking up source items.

As always, code is https://github.com/ShanePe/Emby.SmartPlaylist.Plugin/releases

Happy Testing

Oh and let me know if I have missed anything.

Verbose log:

Detail -> Log button (Only if a log file exists, log is cleaned on ever playlist run, each playlist has it's own log)

image.thumb.png.aadb1e458f60c2779e5c0401fd4b4eba.png

Link:

image.png.ffb93da1111c65af748f99f09bffbf53.png

Any 'user related' fields will now have a user selector:

image.thumb.png.b69b09633882fa4a08235b70924e603a.png

Sort Then By: Sort Job

image.png.0bb52a3e65336fb926a33262672718a4.png

Multiple Add functionality -> Editor

image.thumb.png.75bd171b4c460406bf55b8d09fc550d5.png

 

SmartPlaylist-2.4.0.0.zip

Edited by ShaneP
  • Thanks 3
Link to comment
Share on other sites

ShaneP
3 minutes ago, Ninko said:

@ShanePJust tested your latest version and after running a smart playlist, Emby appears to crash.

Emby logs attached.

Thanks

unhandled_6652f0e6-a992-45ef-af24-6a26bbe9b399.txt 1.42 kB · 0 downloads embyserver-63793265377.txt 34.63 kB · 0 downloads

Thanks @Ninko, I was just uploading a fix for that, please download the 2.4.0.0 version again let me know if that resolve it.

Link to comment
Share on other sites

horstepipe
On 6/24/2022 at 12:52 PM, horstepipe said:

Is there some wiki or anything about that? Not sure how to setup AND/OR groups there. Would anybody mind showing a screenshot how it should look like?

 

best regards

*BUMP*

 

Link to comment
Share on other sites

horstepipe

@ShaneP

is adding a fix for the

 The UTC time represented when the offset is applied must be between year 0 and 10,000. (Parameter 'offset')

issue still on your todo list?

Best regards

Edited by horstepipe
Link to comment
Share on other sites

ShaneP
1 minute ago, horstepipe said:

@ShaneP

is adding a fix for the

 The UTC time represented when the offset is applied must be between year 0 and 10,000. (Parameter 'offset')

issue still on your todo list?

Best regards

Thanks for reminding me… I missed this, added to the list for next release

  • Thanks 1
Link to comment
Share on other sites

sydlexius

Would it be possible to allow for custom regex in some of the fields?  For example, I'm trying to custom tag all of my NR/Unrated content, but also wish to exclude media that I've already set custom rating for.  So something like select "Parental Rating" from the filter drop-down, then select "Regular Expression" in the adjacent drop-down, then the expression itself. 

image.png.cbd8088970f0e0bca23bc07d456fa6e2.png

Perhaps to indicate that it's an actual expression, you can force users to wrap it in forward slashes.  Such as

//^(NR|Unrated)$//

For that matter, having a regex option on many of the fields would be useful.  

Edited by sydlexius
added mock-up
  • Like 1
Link to comment
Share on other sites

ShaneP
36 minutes ago, sydlexius said:

Would it be possible to allow for custom regex in some of the fields?  For example, I'm trying to custom tag all of my NR/Unrated content, but also wish to exclude media that I've already set custom rating for.  So something like select "Parental Rating" from the filter drop-down, then select "Regular Expression" in the adjacent drop-down, then the expression itself. 

image.png.cbd8088970f0e0bca23bc07d456fa6e2.png

Perhaps to indicate that it's an actual expression, you can force users to wrap it in forward slashes.  Such as

//^(NR|Unrated)$//

For that matter, having a regex option on many of the fields would be useful.  

Good idea, on the list for next release :)

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