Jump to content

Emby Server - Implement daily usage time limit


Recommended Posts

yocker
Posted (edited)

@feerlessleadr @Arthessia @Pankookis

I added a time limit to playback for specified users to a Plugin i made (was easier and faster than making a new one).
You can try it if you want.

Besides the normal settings the plugin had it has, what users should have a limit, what that limit should be in minutes and when it should reset.

A reset of the server currently resets the limit, will look into make it persist after a reset if the feature has any interest.

image.thumb.png.aeba25000fec7b793cc4c0cf6bad5b82.png

TranscodeNotifier.dll

Edited by yocker
  • Like 2
feerlessleadr
Posted (edited)
36 minutes ago, yocker said:

@feerlessleadr @Arthessia @Pankookis

I added a time limit to playback for specified users to a Plugin i made (was easier and faster than making a new one).
You can try it if you want.

Besides the normal settings the plugin had it has, what users should have a limit, what that limit should be in minutes and when it should reset.

A reset of the server currently resets the limit, will look into make it persist after a reset if the feature has any interest.

image.thumb.png.aeba25000fec7b793cc4c0cf6bad5b82.png

TranscodeNotifier.dll 67 kB · 0 downloads

This is awesome, thanks. Even you say server reset, do you mean a server restart? If so, I'm definitely interested! 

I'll test this out tonight when I'm home.

Also just thinking about this, I'd love for a way to give bonus time, and have that be an option. So for example, I set the timer for 1 hour, but my kids do more chores, so I'd be able to give them an extra hour or something, without resetting the timer.

Edited by feerlessleadr
Another idea
yocker
Posted
3 minutes ago, feerlessleadr said:

This is awesome, thanks. Even you say server reset, do you mean a server restart? If so, I'm definitely interested! 

 

I'll test this out tonight when I'm home.

No problem. :)

Yes, if you reset Emby the timer resets.
I will look into making it remember the time later, this was just a fast patch job to see if people want it.

feerlessleadr
Posted
36 minutes ago, yocker said:

No problem. :)

Yes, if you reset Emby the timer resets.
I will look into making it remember the time later, this was just a fast patch job to see if people want it.

Thanks - not sure you saw my edit, but another idea I had was I'd love for a way to give bonus time, and have that be an option. So for example, I set the timer for 1 hour, but my kids do more chores, so I'd be able to give them an extra hour or something, without resetting the timer.

yocker
Posted
26 minutes ago, feerlessleadr said:

Thanks - not sure you saw my edit, but another idea I had was I'd love for a way to give bonus time, and have that be an option. So for example, I set the timer for 1 hour, but my kids do more chores, so I'd be able to give them an extra hour or something, without resetting the timer.

I will see if i can add something like that but you should be able to just up the timer for now.

  • Agree 1
yocker
Posted (edited)

@feerlessleadr

Would something like this work for you?

image.jpeg.11d5cd5c2f169ca7c99b74d44c68905e.jpeg

Still good amount of work to be done so might as well ask before i get too deep into it. :)

Plan is that you can add and remove users.
it will stop any playback after a specified time has elapsed for any specified user and refuse to start any new videos.

It will be possible to see how much time a user has left.
The time can be extended by a specified number of minutes.
The timer will reset after a specified number of minutes or at a specific time of day.
The user limit can be enabled or disabled easily with a single button if someone should have limitless time for what ever reason.
Everything will persist after a reset of Emby so no timer is reset because of that.
Lastly it will still be part of the original plugin but i will have to change the name to something else though.

Edited by yocker
  • Like 1
feerlessleadr
Posted

Holy crap, yeah that's exactly what I was thinking. I was going to ask about a person user option, but didn't want to get greedy. 

Thanks so much, really looking forward to testing this when it's done. 

  • Like 1
yocker
Posted
14 hours ago, feerlessleadr said:

Holy crap, yeah that's exactly what I was thinking. I was going to ask about a person user option, but didn't want to get greedy. 

Thanks so much, really looking forward to testing this when it's done. 

There is still a little work to be done but all the features should work if you want to try it.
If something doesn't work then please report back to me so i can look at it.

WatchingEye.dll

  • Like 1
feerlessleadr
Posted
8 minutes ago, yocker said:

There is still a little work to be done but all the features should work if you want to try it.
If something doesn't work then please report back to me so i can look at it.

WatchingEye.dll 293.5 kB · 0 downloads

Trying now

feerlessleadr
Posted
10 minutes ago, yocker said:

There is still a little work to be done but all the features should work if you want to try it.
If something doesn't work then please report back to me so i can look at it.

WatchingEye.dll 293.5 kB · 0 downloads

Maybe I'm being obtuse, but I've put the dll in the plugins folder on windows, restarted the server, but I don't see where I can configure the plug-in.

yocker
Posted
4 minutes ago, feerlessleadr said:

Maybe I'm being obtuse, but I've put the dll in the plugins folder on windows, restarted the server, but I don't see where I can configure the plug-in.

image.png.cc790fa826c60b08808aebb1e395083c.png
image.png.d92b23fe2b1abcd130f1bb53197e935c.png

:)

 

feerlessleadr
Posted

Sorry, took my kiddos to a movie today. I'm going to be testing tonight. 

feerlessleadr
Posted

@yockerOk, just got home and was able to test it. It worked perfectly, exactly as expected. thank you! I don't see a way to edit the time limit for existing users, so I just needed to delete and re-add the user (not sure if that was intentional or not). 

The only thing that I would like (not even sure it's possible) is to somehow expose the enable/disable time limit and extend time for each user on the main interface/emby settings somehow, since the plugin settings are not available when using the android emby app on my phone. 

  • Like 1
yocker
Posted
1 hour ago, feerlessleadr said:

@yockerOk, just got home and was able to test it. It worked perfectly, exactly as expected. thank you! I don't see a way to edit the time limit for existing users, so I just needed to delete and re-add the user (not sure if that was intentional or not). 

The only thing that I would like (not even sure it's possible) is to somehow expose the enable/disable time limit and extend time for each user on the main interface/emby settings somehow, since the plugin settings are not available when using the android emby app on my phone. 

Love to hear it working! :)

That's an oversight on my part, i will look into making it so the time limit can be changed.

Sadly it's not possible to make it so it can be edited on a phone unless you use a browser.
The Emby apps are hardcoded with all the buttons and options they have so impossible to change that via a plugin unless the Emby team specifically adds the plugin to the apps.
 

feerlessleadr
Posted
Just now, yocker said:

Love to hear it working! :)

That's an oversight on my part, i will look into making it so the time limit can be changed.

Sadly it's not possible to make it so it can be edited on a phone unless you use a browser.
The Emby apps are hardcoded with all the buttons and options they have so impossible to change that via a plugin unless the Emby team specifically adds the plugin to the apps.
 

Understood, thanks!

  • Like 1
yocker
Posted
4 hours ago, feerlessleadr said:

Understood, thanks!

Added a way to edit the amount of time a user has been given.

Enjoy! :)

 

WatchingEye.dll

  • Like 1
bakes82
Posted
On 8/2/2025 at 5:52 PM, yocker said:

Love to hear it working! :)

That's an oversight on my part, i will look into making it so the time limit can be changed.

Sadly it's not possible to make it so it can be edited on a phone unless you use a browser.
The Emby apps are hardcoded with all the buttons and options they have so impossible to change that via a plugin unless the Emby team specifically adds the plugin to the apps.
 

you need to stop using the old html/js way and use the new C# only way and they dictate the layout for the screens, which should make it more mobile friendly.

yocker
Posted
On 8/4/2025 at 1:48 AM, bakes82 said:

you need to stop using the old html/js way and use the new C# only way and they dictate the layout for the screens, which should make it more mobile friendly.

If you mean Embys SimpleUI then that won't fit the plugin.

bakes82
Posted (edited)
1 hour ago, yocker said:

If you mean Embys SimpleUI then that won't fit the plugin.

Why wont it fit the plugin? Youre not doing anything special that I can see, I do the same things in my codec killer. I find it 10000% easier to manage everything with c# instead of the mix match of js/cs. Plus then if you want to use claude code it seems to handle it better since everything is c# and server side. Its just a little harder to setup since you need to write your own save/load json functions, or just pull their demo app and use that as starting point.
image.png.98da2bb98e466142f882ead1a283e40e.png
image.thumb.png.e490ca695fa555ecc84500afb5e157af.png

 

You can store stuff in grids too and then use modals if you want to keep things cleaner, i might do that for the user transcodes above but I just want to test the concept first.
image.thumb.png.4d782654061b4e76f34c6607d3badcc9.png

Edited by bakes82
yocker
Posted (edited)

I was too fast on the keyboard.
What i meant was that it wouldn't make the settings work in the Emby app anyway AFAIK.
Also i might be wrong but the live time remaining and loggin might not be possible, i haven't used looked into SimpleUI much so might be wrong.

Maybe i will use SimpleUI in the future.

Edited by yocker
feerlessleadr
Posted

I ran into my first quirk with the plugin. 

Does the reset timer only kick in once the time limit for the user has been reached? If not, what's the starting point for the reset timer?

2 of my users reached their limit at different times yesterday, but when they woke up today, their timer wasn't reset. 

Is it possible to add in an option for a specific time for the timer to reset, rather than using a set number of minutes? This way, I could specify that everyone's timer resets at midnight, regardless of the user used up all of their time from the previous day or not. 

Thanks!

yocker
Posted
2 hours ago, feerlessleadr said:

I ran into my first quirk with the plugin. 

Does the reset timer only kick in once the time limit for the user has been reached? If not, what's the starting point for the reset timer?

2 of my users reached their limit at different times yesterday, but when they woke up today, their timer wasn't reset. 

Is it possible to add in an option for a specific time for the timer to reset, rather than using a set number of minutes? This way, I could specify that everyone's timer resets at midnight, regardless of the user used up all of their time from the previous day or not. 

Thanks!

Sorry about that.
It should be fixed in the version you can get on:

If not then please notify me and i will look at it ASAP.

bakes82
Posted
10 hours ago, yocker said:

I was too fast on the keyboard.
What i meant was that it wouldn't make the settings work in the Emby app anyway AFAIK.
Also i might be wrong but the live time remaining and loggin might not be possible, i haven't used looked into SimpleUI much so might be wrong.

Maybe i will use SimpleUI in the future.

I think you’re confusing their one example called “simple” which handles all the saving and etc for you. But the framework itself does more once you go beyond that. The simple is more for quick schedule task configs. My GitHub updater has references for you. https://github.com/bakes82/Emby.GitHubRepoPluginInstall/tree/master/Emby.GitHubRepoPluginInstall You also seem to publish dlls as releases so people could use it to auto update, I added a repo concept so they could point to one json on your repo and it will add the plugins as drop down choices.

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