Jump to content

New Plugin: Smart Playlists 2.0


Recommended Posts

ShaneP

Hey All,

 

Firstly, excellent work! secondly, I noticed that this has stopped working in Emby 4.6.4.0, I have forked the repo and fixed if anyone is interested. (Have PR out for main repo)

https://github.com/ShanePe/Emby.SmartPlaylist.Plugin/tree/fix_4-6-4-0_update

Sorry also, I have made an update, if the playlist has NOT yet been generated, it will generate it, regardless of the playlist schedule trigger. So one no longer need to 'manually' run first to initialize the playlist if it falls outside of playlist generation schedule. (Make sense !?!?!?!)

 

Version 2.0.0.1 Ready for testing

  • Added Support for 'Smart' Collections
  • Fixed minor bugs around scheduling
  • Revamped UI to be more inline with Emby and Themes

Releases Here ->

 

SmartPlaylist-2.0.0.1.zip

Edited by ShaneP
Vew version 2.0.0.1
  • Thanks 6
Link to post
Share on other sites
koopa8840

Do you have a link for the dll file? I have never dealt with github. Thanks for updating this. 🥳

Link to post
Share on other sites
koopa8840

This typo is located in Emby.SmartPlaylist.Plugin-develop\frontend\src\app\components\App.tsx.  I'll report back, in a few days, after I have had time to play with it.

image.png.383605c94800ec586a2a403310c9f3ba.png

Link to post
Share on other sites
ShaneP
Posted (edited)
13 minutes ago, koopa8840 said:

This typo is located in Emby.SmartPlaylist.Plugin-develop\frontend\src\app\components\App.tsx.  I'll report back, in a few days, after I have had time to play with it.

image.png.383605c94800ec586a2a403310c9f3ba.png

Yea, saw this on the original repo and fixed it, this has been checked into my master branch on my forked repo, if you want to grab it. Or ... here's the DLL. I see from the thread that there are a few calls for smart collections, so investigating this and trying to understand the code base more... so watch this space :D

 

SmartPlaylist.2.0.0.0.zip

Edited by ShaneP
  • Like 1
Link to post
Share on other sites
koopa8840

Download and extract the dll from the zip file. Place dll file in Emby\programdata\plugins\ folder and restart Emby server. You will find the settings in the server dashboard under Advanced.

image.png.534f2de9c2197d9c24e4614525128cf8.png

Edited by koopa8840
  • Like 1
Link to post
Share on other sites
Bazzu85
11 hours ago, ShaneP said:

Yea, saw this on the original repo and fixed it, this has been checked into my master branch on my forked repo, if you want to grab it. Or ... here's the DLL. I see from the thread that there are a few calls for smart collections, so investigating this and trying to understand the code base more... so watch this space :D

 

SmartPlaylist.2.0.0.0.zip 98.79 kB · 2 downloads

thx a lot for the new release! I putted a star on the github page..

a couple of suggestion if you want to mantain it for the future:

  1. when releasing a new dll add it to the github release section..so the users can download it with searching the forum..
  2. Make a new forum post so your work is never lost..

BTW just tested new and is working again like a charm..

Link to post
Share on other sites
Happy2Play

Split topic and closed previous topic.

@ShanePcan maintain updated dll in first post.

Link to post
Share on other sites
crashnash86

Thanks ShaneP for this update, I have installed the .dll file and restarted the server. The SmartPlaylist option is appearing in the left menu under advanced but when I click it to configure nothing happens. The screen just stays the same, I have also tried clicking smart playlists from the plugin section but again nothing happens.

Does anyone know why this is not loading?

Thanks in advance

Link to post
Share on other sites
crashnash86

Sure when I click SmartPlaylist here nothing happens.

y0JIHs.thumb.png.710d67cb9e4e667372254f7aa36dd4e3.png

Link to post
Share on other sites
PenkethBoy

Same as Crashnash

but error in log

2021-07-11 16:29:01.746 Info Server: http/1.1 Response 200 to ::1. Time: 0ms. http://localhost:8096/emby/web/configurationpages?Name=smartplaylist.html&X-Emby-Client=Emby Web&X-Emby-Device-Name=Google Chrome Windows&X-Emby-Device-Id=d9a27c48-0767-4197-880a-fc4bf91a09b8&X-Emby-Client-Version=4.7.0.3
2021-07-11 16:29:01.756 Error Server: Error processing request
	*** Error Report ***
	Version: 4.7.0.3
	Command line: F:\EmbyCore\system\EmbyServer.dll
	Operating system: Microsoft Windows 10.0.19043
	Framework: .NET Core 3.1.13
	OS/Process: x64/x64
	Runtime: F:/EmbyCore/system/System.Private.CoreLib.dll
	Processor count: 8
	Data path: F:\EmbyCore\programdata
	Application path: F:\EmbyCore\system
	System.IO.FileNotFoundException: System.IO.FileNotFoundException: Could not find file 'F:\EmbyCore\system\dashboard-ui\scrollHelper.js'.
	File name: 'F:\EmbyCore\system\dashboard-ui\scrollHelper.js'
	   at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
	   at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
	   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
	   at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileStream(String path, FileOpenMode mode, FileAccessMode access, FileShareMode share, Int32 bufferSize, FileOpenOptions fileOpenOptions)
	   at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileStream(String path, FileOpenMode mode, FileAccessMode access, FileShareMode share, FileOpenOptions fileOpenOptions)
	   at Emby.Server.Implementations.IO.IOManager.GetResponse(HttpRequestOptions options, MediaProtocol protocol)
	   at Emby.Server.Implementations.IO.IOManager.GetResponse(HttpRequestOptions options)
	   at Emby.Server.Implementations.HttpServer.HttpResultFactory.GetContent(StaticFileResultOptions options, Int64 offset, Int64 length, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.HttpServer.FileWriter.SetContentResponseHeaders(Nullable`1 reportedTotalContentLength, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.HttpServer.HttpResultFactory.GetStaticResult(IRequest requestContext, StaticResultOptions options)
	   at Emby.Web.Api.DashboardService.Get(GetDashboardResource request)
	   at Emby.Server.Implementations.Services.ServiceController.GetTaskResult(Task task)
	   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.Private.CoreLib
	TargetSite: Microsoft.Win32.SafeHandles.SafeFileHandle ValidateFileHandle(Microsoft.Win32.SafeHandles.SafeFileHandle)
	

'F:\EmbyCore\system\dashboard-ui\scrollHelper.js'. which is not part of emby?

 

this is with beta server .3

Edited by PenkethBoy
Link to post
Share on other sites
Happy2Play

Looks like scrollhelper was removed in beta 4.7.  So another divide between stable and beta.

So it work fine in 4.6.4.0 but is broken in beta 4.7.

Link to post
Share on other sites
GrumpyTrucker

Couple of quick questions if that's OK?

1) When would the playlist Shuffle if Daily/Weekly etc is selected? Midnight? 8am? Sunday? Monday?

2) For some reason, on my server anyway, running a Scheduled Task to generate a new playlist seems to have stopped working since installing this version of the plugin. Any tips on kickstarting it again? Because I work through the night I had a scheduled task to shuffle the playlists at 9am, since shuffling at midnight (if that's what "Shuffle Daily" does would mean my playlist would probably shuffle while I was listening to it.

Link to post
Share on other sites
ShaneP
On 7/14/2021 at 1:28 PM, GrumpyTrucker said:

Couple of quick questions if that's OK?

1) When would the playlist Shuffle if Daily/Weekly etc is selected? Midnight? 8am? Sunday? Monday?

2) For some reason, on my server anyway, running a Scheduled Task to generate a new playlist seems to have stopped working since installing this version of the plugin. Any tips on kickstarting it again? Because I work through the night I had a scheduled task to shuffle the playlists at 9am, since shuffling at midnight (if that's what "Shuffle Daily" does would mean my playlist would probably shuffle while I was listening to it.

Hey Gumpy

1) So, looking through the code. say you have it set to daily. any run after midnight UTC would regenerate the playlist.

2) I've have fixed a few bugs around this, and added "Smart" Collections in the new version, All the codinig is done, just doing some tests and clean up and should be ready for testing really soon.

Link to post
Share on other sites
ShaneP
Posted (edited)

Version 2.0.0.1 Ready for testing

  • Added Support for 'Smart' Collections
  • Fixed minor bugs around scheduling
  • Revamped UI to be more inline with Emby and Themes

Releases Here ->

Let me know if you have any issues... and as always...  enter at your own peril :D

Edited by ShaneP
Link to post
Share on other sites
crashnash86

Hey @ShaneP

This is great thanks for the update. I was wondering if its normal for it to take around 10 seconds to load the things in the playlists.

For example, I have set it up to create a playlist based on movies from a certain date range (80's Movies) from 1980 - 1989. When I click this section all is working great however its takes 5- 10 seconds for anything to appear.

It might be because of the amount of movies its added which I think is around 1200.

Is there anyway to improve this so that it can be speeded up at all?

Its a fantastic plugin and a feature I have wanted in EMBY for a long time. 

Thanks for all the work on this :)

 

Link to post
Share on other sites
ShaneP
5 hours ago, crashnash86 said:

Hey @ShaneP

This is great thanks for the update. I was wondering if its normal for it to take around 10 seconds to load the things in the playlists.

For example, I have set it up to create a playlist based on movies from a certain date range (80's Movies) from 1980 - 1989. When I click this section all is working great however its takes 5- 10 seconds for anything to appear.

It might be because of the amount of movies its added which I think is around 1200.

Is there anyway to improve this so that it can be speeded up at all?

Its a fantastic plugin and a feature I have wanted in EMBY for a long time. 

Thanks for all the work on this :)

 

Hey @crashnash86, is this when you open the generated playlist?

If so, this is a normal Emby playlist and the 'opening' is handled by Emby themselves (not sure if there is much I can do here), maybe one of the guy from Emby could take a look, alternatively you could break down your playlists into smaller playlists?

I could try see if I could created Embedded Playlists.

So you could have:

  • Playlist 1980-1989
    • Playlist 1980-1981
      • Movie 1
      • Movie 2
    • Playlist 1981-1982
      • Movie 1
      • Movie 2
    • Playlist (etc)
Link to post
Share on other sites
koopa8840
7 hours ago, crashnash86 said:

Hey @ShaneP

This is great thanks for the update. I was wondering if its normal for it to take around 10 seconds to load the things in the playlists.

 

I experience this, anywhere, within Emby and not just on the playlists. 🤷‍♂️

Link to post
Share on other sites
richardyu301
On 7/12/2021 at 1:05 AM, Happy2Play said:

Looks like scrollhelper was removed in beta 4.7.  So another divide between stable and beta.

So it work fine in 4.6.4.0 but is broken in beta 4.7.

So does it mean that down the road after upgrade we won't be able to use this plugin?    

Link to post
Share on other sites
Bazzu85
49 minutes ago, richardyu301 said:

So does it mean that down the road after upgrade we won't be able to use this plugin?    

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

Link to post
Share on other sites
Happy2Play
1 hour ago, richardyu301 said:

So does it mean that down the road after upgrade we won't be able to use this plugin?    

 

37 minutes ago, 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

Correct, if the dev does not maintain two separate branches then the plugin will only function on stable branch and has to be updated when 4.7 is released.  There are a couple plugin devs that only maintain one branch.

Link to post
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...