Jump to content

New Plugin: Smart Playlists 2.0


ShaneP

Recommended Posts

dual-o

I have tested the v2.1.0.0 today... after the creation of the collection all movies within lost there fanart/posters. 😕

image.thumb.png.9db0089da6fa6bd244644228980ac441.png

Link to comment
Share on other sites

ShaneP
On 1/11/2022 at 10:49 PM, dual-o said:

I have tested the v2.1.0.0 today... after the creation of the collection all movies within lost there fanart/posters. 😕

image.thumb.png.9db0089da6fa6bd244644228980ac441.png

Hey  @dual-o This is odd, as the plugin does not do anything with regards to images, basically adds the media item to an 'Emby' playlist or collection, I have seen this around my Emby regularly and I do a refresh that seems to fix it, but in saying that I have never seen it on any of my generated collections. Is it still like this ?

  • Thanks 1
Link to comment
Share on other sites

ShaneP
On 1/4/2022 at 9:43 PM, fillidill said:

This is such a powerful plugin, but when testing the latest version out making a collection with both movies and shows I get the below error. Seems to happen with certain TV shows. 

2022-01-04 22:30:15.123 Error Server: Error processing request
	*** Error Report ***
	Version: 4.6.7.0
	Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
	Operating system: Linux version 4.4.180+ (root@build15) (gcc version 7.5.0 (GCC) ) #42218 SMP Mon Oct 18 19:17:56 CST 2021
	Framework: .NET Core 3.1.21
	OS/Process: x64/x64
	Runtime: system/System.Private.CoreLib.dll
	Processor count: 4
	Data path: /config
	Application path: /system
	System.ArgumentNullException: System.ArgumentNullException: Value cannot be null. (Parameter 'source')
	   at System.IO.Pipelines.StreamPipeExtensions.CopyToAsync(Stream source, PipeWriter destination, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.HttpServer.FileWriter.WriteToAsync(IResponse response, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
	Source: System.IO.Pipelines
	TargetSite: System.Threading.Tasks.Task CopyToAsync(System.IO.Stream, System.IO.Pipelines.PipeWriter, System.Threading.CancellationToken)

 

Hey @fillidill When you say certain shows, do you have an example? Is there any "Funny" characters in the title or show name ? I'm trying to replicate this, but have failed to. I suspect that it might have somethings to do when writing the json, that the show name "malforms" the json, but that's just a hunch.

Link to comment
Share on other sites

ShaneP
On 1/11/2022 at 2:02 AM, wordlover said:

That's not feasible with a multi-hundred track playlist, and shouldn't be necessary.

Hey @wordlover(Thanks for the input @luke_70it), This  makes sense to me know, I see that you are running the playlist "live", looking at the previous maintainers code, "live" is not very optimal and just continually polls for new items, if there are any new items just adds it to the list/collection. It's not optimal for me to pull all the items (remove them from the list) sort them in memory and then put them back in order (esp. in "live" mode), I'm thinking of a few options here, one being a scheduled task that can run in the background and pick up any newly updated playlists since the last run, look at a "sort" field on the playlist and then pull them and re-add them in order, this will take a bit of work on my side, any other ideas? (I agree it's not feasible to do this manually).  At least with the background task it could take a little longer and not put to much strain on the server. (Large lists could be very slow to run, but at least this could be scheduled once a day/week/month in the 'off' hours). Emby creator/framework guys any suggestions, it would be great to have this functionality built into the native collections/playlists.

Link to comment
Share on other sites

wordlover

@ShaneP Thanks - I tested a new smart playlist using manual update and see the same issue: tracks selected via your smart list plugin's boolean logic are initially added in odd clusters, rather than ordered by album.

The non-working renaming is just something I noticed but it won't come up often, and of course I can just create a newly-named playlist with the same logic and delete the old one.

Link to comment
Share on other sites

ShaneP
1 minute ago, wordlover said:

@ShaneP Thanks - I tested a new smart playlist using manual update and see the same issue: tracks selected via your smart list plugin's boolean logic are initially added in odd clusters, rather than ordered by album.

The non-working renaming is just something I noticed but it won't come up often, and of course I can just create a newly-named playlist with the same logic and delete the old one.

Great, so for now, I will add  sorting the items before adding them to ensure the items to add in the "batch" are in some kinda order. Phase two = resorting collection/playlist. I'll also just double check the renaming issue, I tested this and was working, so maybe I missed something.

  • Like 2
Link to comment
Share on other sites

Thorman

which filter is file name? is it name, movie name, episode name or is there not a file name? 

Link to comment
Share on other sites

ShaneP
5 hours ago, Thorman said:

which filter is file name? is it name, movie name, episode name or is there not a file name? 

Hey @Thorman you could try Path

Link to comment
Share on other sites

Kauzig

Would it be possible to have an "Is in Collection X" condition? 

Edited by Kauzig
Link to comment
Share on other sites

ShaneP
10 hours ago, Kauzig said:

Would it be possible to have an "Is in Collection X" condition? 

Hey @Kauzig, what is the use case here? For example: you don’t want to add the media item if it’s in another collection X?

Link to comment
Share on other sites

Kauzig

Hi @ShaneP. Thanks for your reply. My scenario is as follows. I own a fairly large library of video game music. Over time, I've created a few collection for loosely related albums. For example "Music from the 16-bit era" or "Indie Game Music". What I would like to do now is to automatically create playlists, like "The Best from the 16-bit era", which contains all songs that are in the collection "Music from the 16-bit era" and are marked as favorites. Is this comprehensible?

Link to comment
Share on other sites

Thorman
On 1/15/2022 at 5:32 AM, ShaneP said:

Hey @Thorman you could try Path

and do i need to set the path as well or could i just put the file name? for example, I have a youtube folder that auto downloads every subscribed video of mine. each one ending with the youtubers handle. But for some reason emby decides to not put that in the title and omits it, even though it can't find metadata for it it still decides to Omit that part. Can I use this path to work around emby's issue?

Link to comment
Share on other sites

ShaneP
3 hours ago, Kauzig said:

Hi @ShaneP. Thanks for your reply. My scenario is as follows. I own a fairly large library of video game music. Over time, I've created a few collection for loosely related albums. For example "Music from the 16-bit era" or "Indie Game Music". What I would like to do now is to automatically create playlists, like "The Best from the 16-bit era", which contains all songs that are in the collection "Music from the 16-bit era" and are marked as favorites. Is this comprehensible?

Hey @Kauzig, this makes sense to me now, so I think I'll add an option called source were once can select all media or a collection/playlist then when running, it gets the media items from the source and apply the regular rules. This shouldn't be that hard to do and will add it to the list for the next version. Only issue I foresee is if you are using a generated collection as the source and it runs before the collection is generated. But I guess it just makes sense to run your generated playlists first. I'm currently adding an option to run the playlist generation straight from management side of things, but I'll also look into seeing if I can order the run.

36 minutes ago, Thorman said:

and do i need to set the path as well or could i just put the file name? for example, I have a youtube folder that auto downloads every subscribed video of mine. each one ending with the youtubers handle. But for some reason emby decides to not put that in the title and omits it, even though it can't find metadata for it it still decides to Omit that part. Can I use this path to work around emby's issue?

Hey @Thorman I had a look into this and path includes the filename when filtering, so let's say the file is '/media/youtube/ExtremeKnitting_KnitKing69-420.mp4' you could create a rule using path with contains 'KnitKing69-420' and any filenames that contains the value will be matched and added to the collection/playlist. this should cover your use case. (It's all string matching at the end of the day), Let me know if this works... I might relabel Path to "Path/Filename" to make it a little clearer.

  • Thanks 1
Link to comment
Share on other sites

Thorman
24 minutes ago, ShaneP said:

Hey @Thorman I had a look into this and path includes the filename when filtering, so let's say the file is '/media/youtube/ExtremeKnitting_KnitKing69-420.mp4' you could create a rule using path with contains 'KnitKing69-420' and any filenames that contains the value will be matched and added to the collection/playlist. this should cover your use case. (It's all string matching at the end of the day), Let me know if this works... I might relabel Path to "Path/Filename" to make it a little clearer.

Perfect, Thanks for your help!

Link to comment
Share on other sites

Kauzig
2 hours ago, ShaneP said:

Hey @Kauzig, this makes sense to me now, so I think I'll add an option called source were once can select all media or a collection/playlist then when running, it gets the media items from the source and apply the regular rules. This shouldn't be that hard to do and will add it to the list for the next version. Only issue I foresee is if you are using a generated collection as the source and it runs before the collection is generated. But I guess it just makes sense to run your generated playlists first. I'm currently adding an option to run the playlist generation straight from management side of things, but I'll also look into seeing if I can order the run.

Thank you very much @ShaneP. This sounds great!

Link to comment
Share on other sites

  • 2 weeks later...
richardyu301
On 7/20/2021 at 2:46 PM, Bazzu85 said:

@ShaneP has to make a compatibility update to remove the scrollhelper section and replace to something that works before that change become stable

I just tried on ver 4.7 and Smart Playlists does not appear on the left hand side.   So this plug-in still does not work in ver 4.7.   Am I correct?

Link to comment
Share on other sites

Bazzu85
16 hours ago, richardyu301 said:

I just tried on ver 4.7 and Smart Playlists does not appear on the left hand side.   So this plug-in still does not work in ver 4.7.   Am I correct?

I think that there's a github branch for 4.7 server.. but @ShaneP can be more specific...

Link to comment
Share on other sites

Tangsgod

I'm trying to anderstand what this plug in is doing :)

Does it work like the Smart Collection in plex? Like it can creates a movie collection with and/or without tags, genre, names etc... and having it updating by itself when a new content added in Emby matches the criterias?

Can the movie be display in a shuffle order that would refresh each time a user will open its Emby session?

Can it be added to the homescreen?

Link to comment
Share on other sites

ShaneP
On 1/31/2022 at 3:38 AM, richardyu301 said:

I just tried on ver 4.7 and Smart Playlists does not appear on the left hand side.   So this plug-in still does not work in ver 4.7.   Am I correct?

Hey @richardyu301, I haven't branched for 4.7 yet, I have this on the list of 'to dos' I'll post in here when I have a branch and beta out.

On 2/2/2022 at 12:26 PM, Tangsgod said:

I'm trying to anderstand what this plug in is doing :)

Does it work like the Smart Collection in plex? Like it can creates a movie collection with and/or without tags, genre, names etc... and having it updating by itself when a new content added in Emby matches the criterias?

Can the movie be display in a shuffle order that would refresh each time a user will open its Emby session?

Can it be added to the homescreen?

Hey @Tangsgod So basically what the smart playlist/collection does is build or update Emby playlists and collections based on certain criteria that you set up. For example, you want to create/maintain a collection for all marvel movies, one could just added 'Studio' to the criteria with the value of Marvel.

So not sure how Plex works, never used it, but you have multiple different modes you can run the playlist in, Manual -> Updates when saving the playlist. Live -> When new content is added. (But not very optimal)  and ShuffleDay/Week/Month -> Would rebuild the playlist/collection daily/weekly/monthly and shuffle the items. (New function coming out in the next version is the ability to sort this shuffle)

It can be added to the homescreen via it's parent playlist/collection (Standard Emby functionality), hope this helps.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Tangsgod

Yes, it helps a lot thank you! 

On the paper it sounds really similar to the smart collection in plex and it's a really great feature ! 

I'm looking forward to try it this week-end :)

First thing to do is to update to the beta right ? 

Link to comment
Share on other sites

ShaneP
1 hour ago, Tangsgod said:

Yes, it helps a lot thank you! 

On the paper it sounds really similar to the smart collection in plex and it's a really great feature ! 

I'm looking forward to try it this week-end :)

First thing to do is to update to the beta right ? 

Hey @Tangsgod, Not no beta version yet, so supports latest release. If all goes according to plan, new version should be out in a day or two (of the smartplaylist that is). Beta version next on the list.

  • Thanks 1
Link to comment
Share on other sites

Tangsgod
5 minutes ago, ShaneP said:

Hey @Tangsgod, Not no beta version yet, so supports latest release. If all goes according to plan, new version should be out in a day or two (of the smartplaylist that is). Beta version next on the list.

Ok, even better ! Can't wait to try this new version :)

Is there a list of the changes made since the previous release ? 

Link to comment
Share on other sites

Tremas
On 2/2/2022 at 7:26 AM, Tangsgod said:

I'm trying to anderstand what this plug in is doing :)

Does it work like the Smart Collection in plex? Like it can creates a movie collection with and/or without tags, genre, names etc... and having it updating by itself when a new content added in Emby matches the criterias?

Can the movie be display in a shuffle order that would refresh each time a user will open its Emby session?

Can it be added to the homescreen?

Hi @Tangsgod. In regards to automated collections, you may want to explore Emby's AutoBoxSet feature. AutoBoxSet was previously a plugin but has since been integrated into the main Emby server starting in version 4.6. It automatically creates collections based on tags from The Movie Database. I believe this is the way Plex was doing smart collections, but it has been some time since I used that software. You can find more about it here: https://support.emby.media/support/solutions/articles/44001162222-autoboxsets. However, Smart Playlists will give you much more control over automating your own playlists and collections.

  • Like 1
Link to comment
Share on other sites

Tangsgod

@ShaneP To install the plugin I paste the SmartPlaylist.dll file there: Emby\programdata\plugins\ then retsarted the server. I can now see the Smart Playlist option in the advanced setting, but clicking on it does nothing. Am I missing something there?

Is there something to do with this folder: Emby.SmartPlaylist.Plugin-master ?
 

Link to comment
Share on other sites

Happy2Play
2 hours ago, Tangsgod said:

@ShaneP To install the plugin I paste the SmartPlaylist.dll file there: Emby\programdata\plugins\ then retsarted the server. I can now see the Smart Playlist option in the advanced setting, but clicking on it does nothing. Am I missing something there?

Is there something to do with this folder: Emby.SmartPlaylist.Plugin-master ?
 

Can you post a server log.

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