saladin 41 Posted February 19, 2020 Share Posted February 19, 2020 (edited) Hi, I created emby plugin that gives ability to create smart playlists. It works just like iTunes smart playlists -> based on specified rules, playlists will be automatically updated during library changes. to set rules user must have rights to manage the server rules are specified inside plugin configuration section(in current logged user context): "Manage Emby Server" -> "Advanced" -> "SmartPlaylist". name of smart playlist determines which playlist will be updated playlist will be created automatically if did not exist before playlist will always be updated after saving rules user can set 3 types of update:Live -> update playlist if library changes with conditions -> update after 1000 changed items or update after 2 minutes of inactivity or update after 5 minutes Manual -> update playlist only after saving rules ShuffleDaily/ShuffleWeekly/ShuffleMonthly -> update playlist daily/weekly/monthly rules can be grouped groups can be nested strings are compared in case insensitive manner tested on Windows/Linux with Emby 4.4.0.16 beta Feel free to test. v1.3.0.0(v0.9.1.0 - for emby 4.3.1.0): filter by: Actor\GuestStar, Director, Path, Tags, ReleaseDate, ParentalRating, CommunityRating, Runtime sort by: SortName, ReleaseDate, ParentalRating, CommunityRating, Runtime, Episode(combination of SeriesName and SortName) fix setting proper MediaType for new playlists fix Random sort removed Series MediaType -> use Series criteria instead v1.2.0.0: filter by series -> add "MediaType: Series" and criteria: "Episode Name", "Series" filter by movie name Source code: https://github.com/ppankiewicz/Emby.SmartPlaylist.Plugin SmartPlaylist v0.9.0.0 - for emby 4.3.1.0.zip SmartPlaylistv1.2.0.0.zip SmartPlaylist v1.3.0.0.zip SmartPlaylist v0.9.1.0-foremby4.3.1.0.zip Edited February 29, 2020 by saladin 18 1 Link to comment Share on other sites More sharing options...
Dibbes 436 Posted February 19, 2020 Share Posted February 19, 2020 (edited) This is something I just have to try!!! EDIT: @@saladin A few questions: Is there a possibility to create a Library out of the Smart Playlist? Will users (eventually) be able to create their own personal playlists without needing admin rights, which they can share (or not) with other users? -------------------------------------------- EDIT2: I have to say, though it works pretty well! I created a simple music play-list for the 1990s and this was done quite rapidly. Great work!!!! I really like this! The config page does need some work. though. It's not very easy to figure out and I cannot select any sort options. It just says random. Also, I tried to make a DC Universe List with Series and Movies, sorted by release date and I have not yet been able to... Next to the fact that I cannot set the sorting options, it's very involved to select a complete series and separate movies. -------------------------------------------- EDIT3: I really love this plugin! I have no idea where the list "Most Active Movies (last 14 days)", Test and X-Men come from, but my lists run properly. What I noticed it that it takes a very long time before the list contents are displayed. We're talking minutes... I don't know if this because of the plugin or Emby itself... funnily enough it's faster on the Android TV than on the Webpage -------------------------------------------- EDIT4: Seems I've run into a bit of an issue. I have various libraries that have multiple locations for their content. It seems that only the first location is scanned for content and content in a second location (or 3rd or 4th) within the same library is not added to the list, even though the criteria matches. The same goes for different libraries with the same content type. Only content from the first library it finds will be added. Also, I miss a few options for setting up rules. For me it would really make sense if under Date Added there would be an option that says "Today" or "Yesterday" so that whenever I click the list, I get stuff that was added the day I click that list and not have a static date. It would also make sense to me to be able to directly add a specific series, or tag or even a Live TV channel or any of the options you have for library content types and not having to set 2 separate criteria for that. Edited February 19, 2020 by Dibbes Link to comment Share on other sites More sharing options...
webpostkastl 4 Posted February 19, 2020 Share Posted February 19, 2020 Hi saladin, if this really works you are my hero unfortunately I failed while copying your dll file to my emby server plugin directory I'm running Emby on a Synology NAS and tried to copy it to path /var/packages/EmbyServer/target/plugins/SmartPlaylist.dll but WinSCP just tells me: permission denied and I was not able to change permissions for the plugins folder any idea how I can solve this? Link to comment Share on other sites More sharing options...
Dibbes 436 Posted February 19, 2020 Share Posted February 19, 2020 Hi saladin, if this really works you are my hero unfortunately I failed while copying your dll file to my emby server plugin directory I'm running Emby on a Synology NAS and tried to copy it to path /var/packages/EmbyServer/target/plugins/SmartPlaylist.dll but WinSCP just tells me: permission denied and I was not able to change permissions for the plugins folder any idea how I can solve this? Can you copy any other file to the plugin folder? Are you using an account that has rights on that folder? If not, then you're going to have to ssh with a sudo enabled user, then change permissions with chmod and try again Link to comment Share on other sites More sharing options...
Spaceboy 2557 Posted February 19, 2020 Share Posted February 19, 2020 Yes please. I will download and orovide feedback in time. Well done! Link to comment Share on other sites More sharing options...
webpostkastl 4 Posted February 19, 2020 Share Posted February 19, 2020 Can you copy any other file to the plugin folder? Are you using an account that has rights on that folder? If not, then you're going to have to ssh with a sudo enabled user, then change permissions with chmod and try again no, I can't copy anything else as well. I tried to access with my main Synology admin user and noticed that embysvr is the owner of the plugin folder but unfortunately I can't connect with this user, because I don't know the password (which is set automatically during the installation as far as I know) and I'm not sure what will happen if I change the user password ...? any hints on how I could connect with a sudo enabled user? shouldn't the admin user be a sudo enabled one? appreciate your help, Dibbes! Link to comment Share on other sites More sharing options...
Dibbes 436 Posted February 19, 2020 Share Posted February 19, 2020 no, I can't copy anything else as well. I tried to access with my main Synology admin user and noticed that embysvr is the owner of the plugin folder but unfortunately I can't connect with this user, because I don't know the password (which is set automatically during the installation as far as I know) and I'm not sure what will happen if I change the user password ...? any hints on how I could connect with a sudo enabled user? shouldn't the admin user be a sudo enabled one? appreciate your help, Dibbes! You set the password for the embysvr account during setup... you should be able to just reset the password for it without causing any issues. I just tried on my box and now problems whatsoever Link to comment Share on other sites More sharing options...
seanbuff 956 Posted February 19, 2020 Share Posted February 19, 2020 ...I have no idea where the list "Most Active Movies (last 14 days)" I believe that one comes from the Playback Reporting plugin Link to comment Share on other sites More sharing options...
pünktchen 1289 Posted February 19, 2020 Share Posted February 19, 2020 Really great @@saladin! Same question as @@Dibbes. How would i create a rule to include only episodes of a named tv show? Probably it's just missing the MediaType TVShow filter, then we could filter by Name after this. Also please add a filter for actors (includes guest stars of tv episodes) and directors. Small typo in the config start screen: "Add new samrtplaylist" 1 Link to comment Share on other sites More sharing options...
chef 3763 Posted February 19, 2020 Share Posted February 19, 2020 Excellent work! Well done sir! Link to comment Share on other sites More sharing options...
mhendu 0 Posted February 20, 2020 Share Posted February 20, 2020 (edited) Nice! Thank you for putting this together, this is great! Took me a minute to figure out how to get it to work on Windows but got it functioning correctly now. A few improvements come to mind: 1. Missing a few fields that are visible in Reports that would be helpful (Runtime, CommunityRating, ParentalRating, Resolution, ReleaseDate) 2. Missing fields that are not visible in Reports that are in my nfo files - but not sure which of these are actually imported into Emby (Country, Audio Language, Studio, Credits, Director, Actor, Languages) EDIT - Audio Language, Director, Actor must be accessible somehow since they appear on the movie's page. Really hoping Country is available also as this is one of my main use cases for smart playlists in Kodi EDIT - This post seems to indicate that Emby does import Country into the database, but I guess it's just not visible anywhere 3. Sorting is also missing some fields that would be nice (Year, CommunityRating, ParentalRating, Runtime) Edited February 20, 2020 by mhendu Link to comment Share on other sites More sharing options...
bgx 17 Posted February 20, 2020 Share Posted February 20, 2020 (edited) Sounds great and I want it to try. I made a test playlist but where I can found the playlist? When I go to playlists it is empty... EDIT: Found it... was a typo in path Edited February 20, 2020 by bgx Link to comment Share on other sites More sharing options...
PenkethBoy 2066 Posted February 20, 2020 Share Posted February 20, 2020 Just tried this out and Generally a great addition to Emby we do need some way of filtering by a named tv series and a TVShow media type as currently can only get episodes by number or name (but that does not include the series name as not stored like that in Emby) Good Start Link to comment Share on other sites More sharing options...
N3RO815 5 Posted February 20, 2020 Share Posted February 20, 2020 (edited) Wow great. It's a feature I've been waiting for. So far works well.I created a playlist called Randomly Unseen Movies.Rules:Media Type is movieplay count is 0limit: 30sort by: randomWhat I would still like to see would be that the playlist shows different films each time it is called up. Now the same 30 films are always available. So that it is really randomly. Edited February 20, 2020 by OOmatrixOO Link to comment Share on other sites More sharing options...
hstamas 154 Posted February 20, 2020 Share Posted February 20, 2020 EDIT4: Seems I've run into a bit of an issue. I have various libraries that have multiple locations for their content. It seems that only the first location is scanned for content and content in a second location (or 3rd or 4th) within the same library is not added to the list, even though the criteria matches. The same goes for different libraries with the same content type. Only content from the first library it finds will be added. Im seeing the same issue. I have TV shows that span 2 different drive locations and the plugin seems to only be picking up one location. Link to comment Share on other sites More sharing options...
gillmacca01 153 Posted February 21, 2020 Share Posted February 21, 2020 (edited) Looking forward to testing this out, but having an issue. I am running latest beta on QNAP. I have copied the dll to my plugins, and restarted Emby. I can see it under plugins and under Advanced in the dashboard, but access from the menu or settings under plugins, all I get is a blank screen ignore this: working now Edited February 21, 2020 by gillmacca01 Link to comment Share on other sites More sharing options...
gillmacca01 153 Posted February 21, 2020 Share Posted February 21, 2020 (edited) @Dibbes Reference DC Universe: If you tick limit, then it unlocks 'sort by'. Can you tell me how you did DC Universe, as I have a collection that I have marked as a favourite, and cannot get it to create a playlist Edited February 21, 2020 by gillmacca01 1 Link to comment Share on other sites More sharing options...
Dibbes 436 Posted February 21, 2020 Share Posted February 21, 2020 (edited) Reference DC Universe: If you tick limit, then it unlocks 'sort by'. Yes, it does, until you make changes, then it jumps back to random and it's locked again and doesn't unlock anymore, unless you play with the zoom function of the browser and add and remove numbers in the max items box... Can you tell me how you did DC Universe, as I have a collection that I have marked as a favourite, and cannot get it to create a playlist I haven't Been able to get it to work properly yet, as I've been running into this issue: EDIT4: Seems I've run into a bit of an issue. I have various libraries that have multiple locations for their content. It seems that only the first location is scanned for content and content in a second location (or 3rd or 4th) within the same library is not added to the list, even though the criteria matches. The same goes for different libraries with the same content type. Only content from the first library it finds will be added. So once I ran into that, I didn't continue... sorry. If you're interested, this is what I entered till now. Unfortunately I don't get any returns... Edited February 21, 2020 by Dibbes Link to comment Share on other sites More sharing options...
PenkethBoy 2066 Posted February 21, 2020 Share Posted February 21, 2020 you wont get any results using a series name against an episode - as Episode are not named with a prefix of series name They may be on your file system - but once emby matches up with online metadata the series name is removed Link to comment Share on other sites More sharing options...
Dibbes 436 Posted February 22, 2020 Share Posted February 22, 2020 you wont get any results using a series name against an episode - as Episode are not named with a prefix of series name They may be on your file system - but once emby matches up with online metadata the series name is removed Which, though irritating for a plugin like this, should still give me a few results... Link to comment Share on other sites More sharing options...
PenkethBoy 2066 Posted February 22, 2020 Share Posted February 22, 2020 Name = Name of Episode or name of movie Not name of Series so no those options wont work as the plugin is now Link to comment Share on other sites More sharing options...
Dibbes 436 Posted February 22, 2020 Share Posted February 22, 2020 Name = Name of Episode or name of movie Not name of Series so no those options wont work as the plugin is now Yes, I got that... but there's also a movie named in it... it should at least give me that... it doesn't Link to comment Share on other sites More sharing options...
PenkethBoy 2066 Posted February 22, 2020 Share Posted February 22, 2020 it would - probably if it was - a less complicated series of search options try a new smartplaylist and just do a single condition although .16 has goosed the plugin interface - so i cant show you some of my tests at the moment Link to comment Share on other sites More sharing options...
PenkethBoy 2066 Posted February 22, 2020 Share Posted February 22, 2020 ok some working examples - from my playing around so far Name-contains-episode - as in the name of the episode as "known" by Emby = gives a list of episodes from random series where the Episode is in the name which is great but needs a Series option or this plugin is only half useful list of unplayed movies - might be useful - just me messing around list of movies with Harry in the name I have not played with the nested condition option yet as waiting on having more control to get what i want in a playlist Hopefully the OP will comeback with an update Link to comment Share on other sites More sharing options...
Dibbes 436 Posted February 22, 2020 Share Posted February 22, 2020 (edited) I have a few that work as well.. Music released in 1985, Music released in the decade 90-99, Movies added in the last 2 weeks and more of that... the simple queries work and work well... it's the more complicated ones that have issues displaying stuff... Emby takes a long time displaying the list of items added when there's a large list though Edited February 22, 2020 by Dibbes Link to comment Share on other sites More sharing options...
Recommended Posts