ShaneP 225 Posted February 26, 2022 Author Share Posted February 26, 2022 (edited) 31 minutes ago, ShaneP said: @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. So to follow up @akawoz I think there might be a bug there regarding live and limit in conjunction. If you change your Update Type to any of the shuffle options do you see the expected result? Edited February 26, 2022 by ShaneP Link to comment Share on other sites More sharing options...
akawoz 12 Posted February 27, 2022 Share Posted February 27, 2022 (edited) Thanks for working on this @ShaneP - just did a bunch of tests (in between tests I deleted the collection so that Smart Playlists would recreate it from scratch). Doesn't matter what I change Update Type to or Limited Sort By (Release date desc, Release date asc) I always get the same sort in Emby. For clarity the sort I am looking for would be newest release -> oldest release ie. Texas Chainsaw, The Ledge, Fistful of Vengeance etc Edited February 27, 2022 by akawoz Link to comment Share on other sites More sharing options...
ShaneP 225 Posted February 27, 2022 Author Share Posted February 27, 2022 (edited) 5 minutes ago, akawoz said: Thanks for working on this @ShaneP - just did a bunch of tests. Doesn't matter what I change Update Type to or Limited Sort By (Release date desc, Release date asc) I always get the same sort in Emby. For clarity the sort I am looking for would be newest release -> oldest release ie. Texas Chainsaw, The Ledge, Fistful of Vengeance etc Cool, thanks for that @akawoz, If you delete the playlist and run it again, do you see the same? (Execute button in manager to rerun) also, shuffle type will only run once in the time frame... so it could just not be running it. (execute button will always force a re-run) Edited February 27, 2022 by ShaneP Link to comment Share on other sites More sharing options...
akawoz 12 Posted February 27, 2022 Share Posted February 27, 2022 Yep @ShaneP just updated my prior post - was deleting collection between each test. Cheers 1 Link to comment Share on other sites More sharing options...
horstepipe 356 Posted February 27, 2022 Share Posted February 27, 2022 @ShaneP thanks for adding critics rating filter, but where can I grab the new release? Or isn't it published yet? Link to comment Share on other sites More sharing options...
matmielke 0 Posted February 28, 2022 Share Posted February 28, 2022 (edited) I just installed the plugin with an emby-server 4.7.0.26beta installation. Everything shows correct in the GUI and when clicking the "Smart Playlist" in the menue on the left side, it shows the Smart Playlist page with the "Add Smart Playlist" button. When klicking the button, nothing happens. Instead, I get the following error in the log file: 2022-02-28 20:10:16.248 Error Server: Error processing request *** Error Report *** Version: 4.7.0.26 Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_armhf.deb Operating system: Linux version 5.10.92-v7l+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #151 Framework: .NET 6.0.2 OS/Process: arm/arm Runtime: opt/emby-server/system/System.Private.CoreLib.dll Processor count: 4 Data path: /var/lib/emby Application path: /opt/emby-server/system System.InvalidOperationException: System.InvalidOperationException: Sequence contains no elements at System.Linq.ThrowHelper.ThrowNoElementsException() at System.Linq.Enumerable.First[TSource](IEnumerable`1 source) at SmartPlaylist.Domain.CriteriaDefinition.CriteriaDefinitions.GenreListedCriteriaDefinition.get_Type() at _GetProperty[T]_Type_(GenreListedCriteriaDefinition ) at ServiceStack.Text.Common.WriteType`2.WriteProperties(TextWriter writer, Object instance) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Common\WriteType.cs:line 425 at ServiceStack.Text.Common.WriteType`2.WriteLateboundProperties(TextWriter writer, Object value, Type valueType) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Common\WriteType.cs:line 473 at ServiceStack.Text.Common.WriteType`2.WriteAbstractProperties(TextWriter writer, Object value) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Common\WriteType.cs:line 369 at ServiceStack.Text.Common.WriteListsOfElements`2.<>c__DisplayClass1_0.<.cctor>b__0(TextWriter writer, Object obj) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Common\WriteLists.cs:line 232 at ServiceStack.Text.Common.WriteListsOfElements`2.WriteGenericArrayMultiDimension(TextWriter writer, Array array, Int32 rank, Int32[] indices) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Common\WriteLists.cs:line 367 at ServiceStack.Text.Common.WriteListsOfElements`2.WriteGenericArray(TextWriter writer, Array array) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Common\WriteLists.cs:line 374 at ServiceStack.Text.Common.WriteListsOfElements`2.WriteArray(TextWriter writer, Object oArrayValue) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Common\WriteLists.cs:line 332 at ServiceStack.Text.Common.WriteType`2.WriteProperties(TextWriter writer, Object instance) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Common\WriteType.cs:line 450 at ServiceStack.Text.JsonSerializer.SerializeToWriter(Object value, Type type, TextWriter writer) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\JsonSerializer.cs:line 159 at Emby.Common.Implementations.Serialization.JsonSerializer.SerializeToWriter(Object obj, TextWriter writer) at Emby.Common.Implementations.Serialization.JsonSerializer.SerializeToStream(Object obj, Stream stream) at Emby.Server.Implementations.HttpServer.HttpListenerHost.SerializeToJson(Object o, Stream stream) at Emby.Server.Implementations.Services.ResponseHelper.WriteObject(HttpListenerHost httpListenerHost, IRequest request, Object result, 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.Linq TargetSite: Void ThrowNoElementsException() The plugin-DLL itself is located in /var/lib/emby/plugins and /opt/emby-server/system/plugins/ Could you please help me how to proceed? Thanks and best regards, Matthias Edited February 28, 2022 by matmielke typo Link to comment Share on other sites More sharing options...
ShaneP 225 Posted February 28, 2022 Author Share Posted February 28, 2022 3 hours ago, matmielke said: I just installed the plugin with an emby-server 4.7.0.26beta installation. Everything shows correct in the GUI and when clicking the "Smart Playlist" in the menue on the left side, it shows the Smart Playlist page with the "Add Smart Playlist" button. When klicking the button, nothing happens. Instead, I get the following error in the log file: 2022-02-28 20:10:16.248 Error Server: Error processing request *** Error Report *** Version: 4.7.0.26 Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_armhf.deb Operating system: Linux version 5.10.92-v7l+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #151 Framework: .NET 6.0.2 OS/Process: arm/arm Runtime: opt/emby-server/system/System.Private.CoreLib.dll Processor count: 4 Data path: /var/lib/emby Application path: /opt/emby-server/system System.InvalidOperationException: System.InvalidOperationException: Sequence contains no elements at System.Linq.ThrowHelper.ThrowNoElementsException() at System.Linq.Enumerable.First[TSource](IEnumerable`1 source) at SmartPlaylist.Domain.CriteriaDefinition.CriteriaDefinitions.GenreListedCriteriaDefinition.get_Type() at _GetProperty[T]_Type_(GenreListedCriteriaDefinition ) at ServiceStack.Text.Common.WriteType`2.WriteProperties(TextWriter writer, Object instance) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Common\WriteType.cs:line 425 at ServiceStack.Text.Common.WriteType`2.WriteLateboundProperties(TextWriter writer, Object value, Type valueType) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Common\WriteType.cs:line 473 at ServiceStack.Text.Common.WriteType`2.WriteAbstractProperties(TextWriter writer, Object value) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Common\WriteType.cs:line 369 at ServiceStack.Text.Common.WriteListsOfElements`2.<>c__DisplayClass1_0.<.cctor>b__0(TextWriter writer, Object obj) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Common\WriteLists.cs:line 232 at ServiceStack.Text.Common.WriteListsOfElements`2.WriteGenericArrayMultiDimension(TextWriter writer, Array array, Int32 rank, Int32[] indices) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Common\WriteLists.cs:line 367 at ServiceStack.Text.Common.WriteListsOfElements`2.WriteGenericArray(TextWriter writer, Array array) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Common\WriteLists.cs:line 374 at ServiceStack.Text.Common.WriteListsOfElements`2.WriteArray(TextWriter writer, Object oArrayValue) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Common\WriteLists.cs:line 332 at ServiceStack.Text.Common.WriteType`2.WriteProperties(TextWriter writer, Object instance) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Common\WriteType.cs:line 450 at ServiceStack.Text.JsonSerializer.SerializeToWriter(Object value, Type type, TextWriter writer) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\JsonSerializer.cs:line 159 at Emby.Common.Implementations.Serialization.JsonSerializer.SerializeToWriter(Object obj, TextWriter writer) at Emby.Common.Implementations.Serialization.JsonSerializer.SerializeToStream(Object obj, Stream stream) at Emby.Server.Implementations.HttpServer.HttpListenerHost.SerializeToJson(Object o, Stream stream) at Emby.Server.Implementations.Services.ResponseHelper.WriteObject(HttpListenerHost httpListenerHost, IRequest request, Object result, 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.Linq TargetSite: Void ThrowNoElementsException() The plugin-DLL itself is located in /var/lib/emby/plugins and /opt/emby-server/system/plugins/ Could you please help me how to proceed? Thanks and best regards, Matthias Hey @matmielke, thanks for this, I actually picked up this bug today by accident and fixed in the next release. On 2/27/2022 at 12:24 AM, akawoz said: Thanks for working on this @ShaneP - just did a bunch of tests (in between tests I deleted the collection so that Smart Playlists would recreate it from scratch). Doesn't matter what I change Update Type to or Limited Sort By (Release date desc, Release date asc) I always get the same sort in Emby. For clarity the sort I am looking for would be newest release -> oldest release ie. Texas Chainsaw, The Ledge, Fistful of Vengeance etc Hey @akawoz, so I did more digging into this, what the original code was doing is sorting by the items Premiere Date (Release Date field), which is not required, what it then does if the release date is not there it goes for the next best things, the production year. I tested you exact scenario and got it was working, can you just that the release date metadata field is correct on items you'd expect to see. Also, I have done a bit of tweaking around this. So hopefully this goes away Link to comment Share on other sites More sharing options...
ShaneP 225 Posted February 28, 2022 Author Share Posted February 28, 2022 Hey all, 2.2.0.1 is available for testing. Version 2.2.0.1 Performance Optimized Live mode by not pulling all items to compare against, only new items and previous added. (Hopefully this makes things a little better.) Feature Made plugin compatible with Emby > 4.7.0.0 (Backward compatible with current release 4.6) Added 'Rating' criteria for: Community Critic Custom Added loader to management screen while loading large amounts of smartplaylists. Bug Fixed a bug on number input where the value would only be updated blur, meaning that the spinners are rendered useless. Fixed a bug where there was no Genres in the system the editor would fail to load. I have done a bit of rework on the "Live" update mode, so if you'd be so kind as to keep an eye on it for a day or two. Also, was able to get one version to work on Latest and Beta. So no need to have two branches any more. As always, code is in the repo and let me know of any problems. Happy viewing! SmartPlaylist-2.2.0.1.zip Link to comment Share on other sites More sharing options...
BaiGanJia 21 Posted March 1, 2022 Share Posted March 1, 2022 (edited) Emby 4.7.0.27 smartlist 2.2.0.1 Maybe I don't know how to use it, it's Very unstable, many conditions are very clear, but it can't return my expected results. For example I want to filter out 2000-2002 movies, it fails Error App: [SmartPlaylist][Error]: Object reference not set to an instance of an object. I wanted Shawshank and it didn't work either ``` ================================================ Edited March 1, 2022 by Byebye Link to comment Share on other sites More sharing options...
akawoz 12 Posted March 1, 2022 Share Posted March 1, 2022 (edited) Thanks for the update @ShaneP but I get the same error message. If I change it to Manual (not Live) then it works but the sorting is still wrong. Edited March 1, 2022 by akawoz Link to comment Share on other sites More sharing options...
ShaneP 225 Posted March 1, 2022 Author Share Posted March 1, 2022 14 hours ago, Byebye said: Emby 4.7.0.27 smartlist 2.2.0.1 Maybe I don't know how to use it, it's Very unstable, many conditions are very clear, but it can't return my expected results. For example I want to filter out 2000-2002 movies, it fails Error App: [SmartPlaylist][Error]: Object reference not set to an instance of an object. I wanted Shawshank and it didn't work either ``` ================================================ Hey @Byebye Thanks for that, yea there was definitely I bug I introduced when doing the Update Type: Live optimization, I missed a small things when creating a new playlist. I have fixed this. Let me know if this is good now. 12 hours ago, akawoz said: Thanks for the update @ShaneP but I get the same error message. If I change it to Manual (not Live) then it works but the sorting is still wrong. Hey @akawoz, this is really odd as I cannot replicated this on my side, and is behaving as it should. I might need to send you a special debug version so I can try determine what's going on there. You did double check the release date metadata field right? Link to comment Share on other sites More sharing options...
ShaneP 225 Posted March 1, 2022 Author Share Posted March 1, 2022 Hey All, Thanks to @Byebye finding a bug, I'm putting out a fixed version... Version 2.2.0.2 Bug Fixed newly introduced bug when Update type is live and the playlist or collection does not exist yet. Fixed info window duration format. (Playlist will need to execute once to rectify) Fixed playlist stats for live update type. Happy testing. SmartPlaylist-2.2.0.2.zip Link to comment Share on other sites More sharing options...
horstepipe 356 Posted March 1, 2022 Share Posted March 1, 2022 (edited) Hey @ShaneP as not all movies have a critics rating, is there a way to do these rules: - show movies with a community rating over 6,5 AND - show movies with a critics rating over 6,5 OR - show movies without a critics rating Edited March 1, 2022 by horstepipe Link to comment Share on other sites More sharing options...
horstepipe 356 Posted March 1, 2022 Share Posted March 1, 2022 4 minutes ago, horstepipe said: Hey @ShaneP as not all movies have a critics rating, is there a way to do these rules: - show movies with a community rating over 6,5 AND - show movies with a critics rating over 6,5 OR - show movies without a critics rating even better would be this - show movies with a community rating over 6,5 AND - show movies with a critics rating over 6,5 OR - show movies with a community rating over 7,5 AND - show movies without a critics rating Link to comment Share on other sites More sharing options...
horstepipe 356 Posted March 1, 2022 Share Posted March 1, 2022 another question: where is the config of the plugin - or where are the playlist settings stored? As I want to setup multiple playlists for each genre, I guess it takes way less time by editing the config file. Link to comment Share on other sites More sharing options...
ShaneP 225 Posted March 2, 2022 Author Share Posted March 2, 2022 21 hours ago, horstepipe said: another question: where is the config of the plugin - or where are the playlist settings stored? As I want to setup multiple playlists for each genre, I guess it takes way less time by editing the config file. @horstepipe they are stored in individual json files in your data/smartplaylist directory. Also the above scenario is double AND = All (Group), OR = Any (Group). I will add a new operator called is empty for filter on metadata that does not have a value in the next release. 1 Link to comment Share on other sites More sharing options...
Ninko 63 Posted March 2, 2022 Share Posted March 2, 2022 Any chance this plugin will be added to emby's plugin catalogue? Thanks Link to comment Share on other sites More sharing options...
ShaneP 225 Posted March 2, 2022 Author Share Posted March 2, 2022 1 hour ago, Ninko said: Any chance this plugin will be added to emby's plugin catalogue? Thanks Hey @Ninko, once all is stabilised, I’ll see what the process is. Link to comment Share on other sites More sharing options...
DarKni8 37 Posted March 7, 2022 Share Posted March 7, 2022 Guys which version i can use for 4.6.7.0? Link to comment Share on other sites More sharing options...
ShaneP 225 Posted March 7, 2022 Author Share Posted March 7, 2022 28 minutes ago, DarKni8 said: Guys which version i can use for 4.6.7.0? @DarKni8the latest version supports 4.6 and the beta. Link to comment Share on other sites More sharing options...
DarKni8 37 Posted March 7, 2022 Share Posted March 7, 2022 Thanks, I am getting this error when i click on add smart playlist. It opens nothing. Link to comment Share on other sites More sharing options...
ShaneP 225 Posted March 7, 2022 Author Share Posted March 7, 2022 47 minutes ago, DarKni8 said: Thanks, I am getting this error when i click on add smart playlist. It opens nothing. What version of the plug-in do you have? I’ve never seen this error before so not to sure, would have to investigate. Link to comment Share on other sites More sharing options...
DarKni8 37 Posted March 7, 2022 Share Posted March 7, 2022 44 minutes ago, ShaneP said: What version of the plug-in do you have? I’ve never seen this error before so not to sure, would have to investigate. The one linked in first post. 44 minutes ago, ShaneP said: What version of the plug-in do you have? I’ve never seen this error before so not 45 minutes ago, ShaneP said: What version of the plug-in do you have? I’ve never seen this error before so not to sure, would have to investigate. The release from github Link to comment Share on other sites More sharing options...
BaiGanJia 21 Posted March 8, 2022 Share Posted March 8, 2022 On 3/1/2022 at 11:19 PM, ShaneP said: Hey All, Thanks to @Byebye finding a bug, I'm putting out a fixed version... Version 2.2.0.2 Bug Fixed newly introduced bug when Update type is live and the playlist or collection does not exist yet. Fixed info window duration format. (Playlist will need to execute once to rectify) Fixed playlist stats for live update type. Happy testing. SmartPlaylist-2.2.0.2.zip 182.8 kB · 6 downloads thanks verymuch it works ,thasnks again Link to comment Share on other sites More sharing options...
redhalo 0 Posted March 8, 2022 Share Posted March 8, 2022 (edited) 22 hours ago, DarKni8 said: Thanks, I am getting this error when i click on add smart playlist. It opens nothing. I can confirm that I have the same problem with add playlist opening nothing, except I don't appear to have an error in my logs. Latest version of plugin, tried with both the latest beta and stable Emby. Edited March 8, 2022 by redhalo Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now