sydlexius 236 Posted July 25, 2022 Share Posted July 25, 2022 12 hours ago, smernt said: Ok, this seems to be working great so far! Question though, is there a way to combine a bunch of genres together into a single rule? I know there's the 'multiple values' option, but that requires typing out all of the values manually too. Being able to multi-select from the list version of the Genre rule would be great! Also, 'Parental Rating' doesn't seem to be working. I'm trying to set a rule like this: However, I keep getting the following kind of error: Incomparable: 'Superbad', Field: 'Parental rating': 'No metadata value found' This happens on all of the items, which means no items are being added to the playlist because it thinks they're all missing that metadata, even though they're not. For example, Superbad has the Parental Rating of 'R' in my metadata. I wonder if the 'Parental Rating' rule is accidentally pulling from the 'Custom Rating' metadata field by mistake? As I don't use the custom ratings but all of my items have parental ratings attached. Also, the list of Parental Ratings are a little confusing since they seem to only be US based. I'm in the UK and our ratings include U, 18, 12A etc, but they're not there, which also makes it difficult to filter in this way. For example, here's what I see if I filter within Emby: Reveal hidden contents And this is what I see as options within Smart Playlist: Reveal hidden contents So this is where a regular expression comes to the rescue. I don't know exactly how @ShaneP implemented it, but here's some pseudocode: //^G|PG$// the "|" is an "or" pipe. The beginning of line operator "^" and end of line operator "$" aren't strictly necessary, when you're dealing with single-line strings. Link to comment Share on other sites More sharing options...
sydlexius 236 Posted July 25, 2022 Share Posted July 25, 2022 3 minutes ago, sydlexius said: So this is where a regular expression comes to the rescue. I don't know exactly how @ShaneP implemented it, but here's some pseudocode: //^G|PG$// the "|" is an "or" pipe. The beginning of line operator "^" and end of line operator "$" aren't strictly necessary, when you're dealing with single-line strings. So just doing some checking, but Parental Rating is not regular expression-enabled yet. Link to comment Share on other sites More sharing options...
ShaneP 223 Posted July 25, 2022 Author Share Posted July 25, 2022 21 hours ago, smernt said: Ok, this seems to be working great so far! Question though, is there a way to combine a bunch of genres together into a single rule? I know there's the 'multiple values' option, but that requires typing out all of the values manually too. Being able to multi-select from the list version of the Genre rule would be great! Also, 'Parental Rating' doesn't seem to be working. I'm trying to set a rule like this: However, I keep getting the following kind of error: Incomparable: 'Superbad', Field: 'Parental rating': 'No metadata value found' This happens on all of the items, which means no items are being added to the playlist because it thinks they're all missing that metadata, even though they're not. For example, Superbad has the Parental Rating of 'R' in my metadata. I wonder if the 'Parental Rating' rule is accidentally pulling from the 'Custom Rating' metadata field by mistake? As I don't use the custom ratings but all of my items have parental ratings attached. Also, the list of Parental Ratings are a little confusing since they seem to only be US based. I'm in the UK and our ratings include U, 18, 12A etc, but they're not there, which also makes it difficult to filter in this way. For example, here's what I see if I filter within Emby: Reveal hidden contents And this is what I see as options within Smart Playlist: Reveal hidden contents Hey @smernt, So for the genre you have to options.Regex or Listed. Here are the examples. Listed (Could also use text, Listed to reads of a list of Genre that is already in the system). ANY group = OR Or Regex As far as the parental rating is concerned, Smart Playlist uses the underlying Emby system to get the ratings, make sure that you Library is set to the right Country. So Settings -> Library -> Advanced. Can you check that. Is your metadata tagged correctly in Emby if the country code is not UK? Link to comment Share on other sites More sharing options...
ShaneP 223 Posted July 25, 2022 Author Share Posted July 25, 2022 8 hours ago, sydlexius said: So just doing some checking, but Parental Rating is not regular expression-enabled yet. Hey @sydlexius Thanks for the help, I'm not sure if regex makes sense on selection lists, i.e. don;t know if there is a valid use case for the effort as the change UI wise for listed regex could be quite a bit of work. Link to comment Share on other sites More sharing options...
ShaneP 223 Posted July 25, 2022 Author Share Posted July 25, 2022 On 7/23/2022 at 11:50 AM, koopa8840 said: I'm running across this error, on Live Update: Error Value cannot be null. (Parameter 'first') As you can see, the Next Update time is set before Last Populated time. This morning I check the status and I have the error. You can see the Last Populated time has changed, but not the Next Update time. The log does not show anything. However, if you go to Scheduled Tasks and execute Refresh All Smart Playlists and Collections, the error is gone. Not sure what the cause is. I found this in the emby server log. @koopa8840 I can't seem to replicate and looking at the code, I can't even see a 'first' lamda query, but I could be missing something, if you're able to replicate this, this would help. Link to comment Share on other sites More sharing options...
ShaneP 223 Posted July 25, 2022 Author Share Posted July 25, 2022 23 hours ago, smernt said: This looks great! I'm just about to get it installed. Thank you for doing this, it's sorely needed in default Emby. For the Emby Devs: PLEASE just get this incorporated into Emby by default. People are doing the leg work & bringing features that should have been included years ago, so rather than just leave it like that, please make deals with these kind contributors & get these features built into Emby. I know it's definitely easier said than done, but it would certainly help tick off some of those feature requests which are buried under a few inches of dust. I'm sure the response will be 'this is planned for the future' @smernt Thank you! My plan is to stabilizes this release. (No more new features). Once it all looks clear, I'll submit to the Emby plug in gallery which would make it a little easier to install and more visible. 3 Link to comment Share on other sites More sharing options...
nuentes 30 Posted July 25, 2022 Share Posted July 25, 2022 On 7/23/2022 at 10:08 AM, ShaneP said: Hey @nuentes, Firstly any reason you don't want to upgrade to the latest version of Emby? Secondly, I am running Ubuntu as well, but the latest version of Emby so can't really debug. If I can I'll just create a new container and install 4.6.X.X and run it, if it's not a big fix I'll included in the next release. If you fire up Web Developer Tools in your browser do you see any javascript errors in the console that might shed some light on this? I'm in the middle of re-encoding a bunch of videos on my server, and I don't want to stop it to uninstall/reinstall right now. I'll probably be upgrading by the end of the week. And sorry, @ShaneP, but I don't see any javascript errors in the console. Link to comment Share on other sites More sharing options...
ShaneP 223 Posted July 25, 2022 Author Share Posted July 25, 2022 1 hour ago, nuentes said: I'm in the middle of re-encoding a bunch of videos on my server, and I don't want to stop it to uninstall/reinstall right now. I'll probably be upgrading by the end of the week. And sorry, @ShaneP, but I don't see any javascript errors in the console. Awesome @nuentes I’ll see if I can get to the bottom of it anyhoo Link to comment Share on other sites More sharing options...
sydlexius 236 Posted July 25, 2022 Share Posted July 25, 2022 3 hours ago, ShaneP said: Hey @sydlexius Thanks for the help, I'm not sure if regex makes sense on selection lists, i.e. don;t know if there is a valid use case for the effort as the change UI wise for listed regex could be quite a bit of work. Perhaps with selection lists, you could place checkboxes next to each item? Link to comment Share on other sites More sharing options...
koopa8840 23 Posted July 25, 2022 Share Posted July 25, 2022 (edited) 4 hours ago, ShaneP said: @koopa8840 I can't seem to replicate and looking at the code, I can't even see a 'first' lamda query, but I could be missing something, if you're able to replicate this, this would help. I can't replicate what the screenshots show, because I don't know what caused it. These are the steps I took; create Collection, Collection is populated, check Status 24hrs later and the error is there. However, when I copy a movie file to my movie folder the error occurs. If I go to Scheduled Tasks and manually Refresh Smart Playlists, the error is gone. I have set a Scheduled Task to Refresh every 15 minutes, so when I am moving movie files, I do not have to keep manually refreshing. Maybe the problem is related to not able to the read the file, while it is being moved? I'm going to look into Scripter-X and see if it is possible to execute a Refresh after moving a file is completed. Edited July 25, 2022 by koopa8840 Link to comment Share on other sites More sharing options...
ShaneP 223 Posted July 25, 2022 Author Share Posted July 25, 2022 11 minutes ago, koopa8840 said: I can't replicate what the screenshots show, because I don't know what caused it. These are the steps I took; create Collection, Collection is populated, check Status 24hrs later and the error is there. However, when I copy a movie file to my movie folder the error occurs. If I go to Scheduled Tasks and manually Refresh Smart Playlists, the error is gone. I have set a Scheduled Task to Refresh every 15 minutes, so when I am moving movie files, I do not have to keep manually refreshing. Maybe the problem is related to not able to the read the file, while it is being moved? I'm going to look into Scripter-X and see if it is possible to execute a Refresh after moving a file is completed. I don’t think the copy is the issue, the way the original design works is to collect metadata change events and when they reach or certain number or a time has passed it the executes. I’ll still see what I can find even if it’s just more logging to help pin point where this is happening. Link to comment Share on other sites More sharing options...
koopa8840 23 Posted July 25, 2022 Share Posted July 25, 2022 (edited) 36 minutes ago, ShaneP said: I don’t think the copy is the issue, the way the original design works is to collect metadata change events and when they reach or certain number or a time has passed it the executes. I’ll still see what I can find even if it’s just more logging to help pin point where this is happening. I know the error occurs when moving files; just not sure what causes it when nothing is being moved. The Collection is Live and populates based on the bitrate being 10Mbps or lower. You can see in the attached log multiple SmartPlaylist errors (83 of them) occur when moving files. Sorry, I can't provide a SmartPlaylist log. It doesn't show anything. The attached log includes 2022-07-23 01:02:12, which is in the attached screenshot. embyserver-63794217600.txt UPDATE Just rebooted the server and have the error. See attached server log. embyserver.txt Edited July 25, 2022 by koopa8840 1 Link to comment Share on other sites More sharing options...
koopa8840 23 Posted July 26, 2022 Share Posted July 26, 2022 (edited) The last restart, I had a Scheduled Task set to Refresh Smart Playlists upon server restart and the error occurred. I was, also, moving a TV show file at this time. I deleted the task, and am NOT moving a file, restarted the server and no error appears. Hope this helps out. UPDATE I set a Schedule Task to Refresh Smart Playlist on restart and no error occurs. It seems the error occurs when moving files regardless of being TV, Music or Movie even though the settings are for Media Type = Movie. Edited July 27, 2022 by koopa8840 Link to comment Share on other sites More sharing options...
smernt 9 Posted July 26, 2022 Share Posted July 26, 2022 On 25/07/2022 at 12:22, ShaneP said: As far as the parental rating is concerned, Smart Playlist uses the underlying Emby system to get the ratings, make sure that you Library is set to the right Country. So Settings -> Library -> Advanced. Can you check that. Is your metadata tagged correctly in Emby if the country code is not UK? Hey @ShaneP, so I have all of the country options set to UK for all of my libraries, but I'm still encountering a problem with the Parental Rating filter. For example, to simplify, if I have a simple filter such as 'Media Type is Movie AND Genre (Listed) is Comedy', the results are as you'd expect, all of my movies that have comedy genre. However, if I add a Parental Rating filter to it so the full rule is 'Media Type is Movie AND Genre (Listed) is Comedy AND Parental rating is not PG', I get no results: All of the results in the log file return the same thing for the Parental Rating rule: Incomparable: 'The Quiet Man', Field: 'Parental rating': 'No metadata value found' Using the same filter within the emby client, it returns 715 results. Also, while all of my Parental Ratings are UK based inside of Emby, such as 21 Jump Street being a GB-15 or Scary Movie being a GB-18, the list of Parental Ratings inside of Smart Playlist still doesn't include them and only includes the following, which may or may not be the problem. Link to comment Share on other sites More sharing options...
nuentes 30 Posted July 27, 2022 Share Posted July 27, 2022 On 7/25/2022 at 10:30 AM, ShaneP said: Awesome @nuentes I’ll see if I can get to the bottom of it anyhoo I've updated to 4.7.5.0, and Smart Playlist is now appearing correctly. So definitely an issue with that release. Link to comment Share on other sites More sharing options...
goldsworthy1 5 Posted July 28, 2022 Share Posted July 28, 2022 Just installed the latest version 2.4.0.0... any ideas for the below? 2022-07-28 10:06:09.869 Error App: Error loading assembly /var/packages/EmbyServer/var/plugins/SmartPlaylist.dll *** Error Report *** Version: 4.7.5.0 Command line: /volume1/@appstore/EmbyServer/system/EmbyServer.dll -programdata /var/packages/EmbyServer/var -ffdetect /var/packages/EmbyServer/target/bin/ffdetect -ffmpeg /var/packages/EmbyServer/target/bin/ffmpeg -ffprobe /var/packages/EmbyServer/target/bin/ffprobe -nolocalportconfig -ignore_vaapi_enabled_flag -pidfile /var/packages/EmbyServer/var/EmbyServer.pid -defaultdirectory /volume1/Public -updatepackage emby-server-synology7_{version}_x86_64.spk -noautorunwebapp Operating system: Linux version 4.4.180+ (root@build15) (gcc version 7.5.0 (GCC) ) #41890 SMP Thu Jul 15 03:43:42 CST 2021 Framework: .NET 6.0.2 OS/Process: x64/x64 Runtime: volume1/@appstore/EmbyServer/system/System.Private.CoreLib.dll Processor count: 4 Data path: /var/packages/EmbyServer/var Application path: /volume1/@appstore/EmbyServer/system System.BadImageFormatException: System.BadImageFormatException: Bad IL format. at System.Reflection.Assembly.Load(Byte[] rawAssembly, Byte[] rawSymbolStore) at System.Reflection.Assembly.Load(Byte[] rawAssembly) at Emby.Server.Implementations.ApplicationHost.LoadAssembly(String file) Source: System.Private.CoreLib TargetSite: System.Reflection.Assembly Load(Byte[], Byte[]) Link to comment Share on other sites More sharing options...
nuentes 30 Posted July 28, 2022 Share Posted July 28, 2022 @ShaneP I want to make a playlist of all my 4K movies. Would it be possible to include resolution as a query-able variable? Link to comment Share on other sites More sharing options...
koopa8840 23 Posted July 29, 2022 Share Posted July 29, 2022 @ShaneP I did more testing and found the error definitely occurs when moving files. I can disable the Live collection, move files, enable the Live collection and have no error. Also, when the error occurs you have to manually Refresh in order for Scheduled Refreshes to execute. Link to comment Share on other sites More sharing options...
Emmanueld 0 Posted August 11, 2022 Share Posted August 11, 2022 @ShanePA million thanks for this plugin!!! Is there any way Actor & Guest Star could be separate fields? Link to comment Share on other sites More sharing options...
chowbok 72 Posted August 13, 2022 Share Posted August 13, 2022 Is it just me, or is there no way to manually sort an existing smart playlist? If there is, how do I do it? Link to comment Share on other sites More sharing options...
Junglejim 338 Posted August 13, 2022 Share Posted August 13, 2022 (edited) 59 minutes ago, chowbok said: Is it just me, or is there no way to manually sort an existing smart playlist? If there is, how do I do it? Hi mate, by manually do you mean drag and drop like emby's standard playlist feature? I haven't tried it but there is a "Update type: manual" option at the top right. Maybe give that a go. Another thing you could try is delete the generated smartplaylist but select the "Keep generated Playlist/Collection ?" option, then manually edit it from there. Edited August 13, 2022 by Junglejim Link to comment Share on other sites More sharing options...
chowbok 72 Posted August 13, 2022 Share Posted August 13, 2022 No, I just mean invoke the sort on an existing playlist when I want to. Right now I only see how to do it on a timer. Link to comment Share on other sites More sharing options...
Junglejim 338 Posted August 13, 2022 Share Posted August 13, 2022 (edited) 16 minutes ago, chowbok said: No, I just mean invoke the sort on an existing playlist when I want to. Right now I only see how to do it on a timer. Ok yea I see what you mean, try the "Update type: manual" then select your "Sort by" and hit the save button hopefully that should work. From there on in you will have to enter the playlist settings and hit save to refresh it. Edited August 13, 2022 by Junglejim Link to comment Share on other sites More sharing options...
chowbok 72 Posted August 13, 2022 Share Posted August 13, 2022 It's not letting me change it: Link to comment Share on other sites More sharing options...
Junglejim 338 Posted August 13, 2022 Share Posted August 13, 2022 25 minutes ago, chowbok said: It's not letting me change it: That's strange, maybe don't sort on "newly added" and do the "Sort by" option, it's working for me just fine.. generates.. If I change to descending.. I get.. 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