Angelblue05 4130 Posted May 12, 2015 Share Posted May 12, 2015 (edited) I'm trying to implement parental control with Emby for Kodi add-on - the access schedule restriction but it's not working like I thought? Currently, I'm looking for the status code 401 and headers['X-Application-Error-Code'] being ParentalControl like it says here: https://github.com/MediaBrowser/MediaBrowser/wiki/Parental-Control It seems to be working a little too well. The only time the user can gain access is if there's no access schedule at all? I've tried schedule for the present time and it's not working...That can't be right. I thought it worked on basis that 401 response and header would be returned only when the access is disabled. I'm on beta version 3.0.5607.1 @@Luke or @@ebr any ideas? Are you able to reproduce this? Maybe I'm doing something wrong. Edit: I should mention that I've picked a specific day in my settings. Every day/week days/weekend seem to work fine. Edited May 12, 2015 by Angelblue05 Link to comment Share on other sites More sharing options...
ebr 14930 Posted May 12, 2015 Share Posted May 12, 2015 I have access control restrictions on my kids' accounts and they have been working fine. So, unless there is a new bug, it should be doing what you expect. Link to comment Share on other sites More sharing options...
Angelblue05 4130 Posted May 12, 2015 Author Share Posted May 12, 2015 (edited) Well this doesn't answer my question . I'm just asking in the specific context where you select to enable access for a specific day only, it seems to return 401 parental control even when access should be enabled. As I mentioned, using Every day, weekdays and weekends works correctly. Sent from my iPhone using Tapatalk Edited May 12, 2015 by Angelblue05 Link to comment Share on other sites More sharing options...
ebr 14930 Posted May 12, 2015 Share Posted May 12, 2015 What I'm saying is that is working fine for me. I've had my kids setup that way for quite a while. Here are the settings for one of my kid profiles. I don't use the "Weekday" and "Weekend" versions because they don't really work well for this purpose because Friday night should be a weekend night and Sunday night should not. 1 Link to comment Share on other sites More sharing options...
Angelblue05 4130 Posted May 12, 2015 Author Share Posted May 12, 2015 Ty ebr i will have to test some more and report back if it still happens. Sent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
Angelblue05 4130 Posted May 12, 2015 Author Share Posted May 12, 2015 (edited) @@ebr Something is wrong with it. It seems to be using the wrong days? Today is Tuesday, May 12 and it's 5:50ishPM my server's time. This should work right? Response I get: 17:44:11 T:11020 NOTICE: {'date': 'Tue, 12 May 2015 22:44:11 GMT', 'transfer-encoding': 'chunked', 'x-application-error-code': 'ParentalControl', 'content-type': 'text/html', 'server': 'Mono-HTTPAPI/1.0'} 17:44:11 T:11020 NOTICE: EMBY UserClient -> Access is restricted. But if I set it to Monday 7am to 8pm, it works. If I set it to Wednesday 7am to 8pm it doesn't work. So it works, just not with the correct week day set (seems to follow schedule of the week day before today). I hope this helps you replicate the issue. Edited May 12, 2015 by Angelblue05 Link to comment Share on other sites More sharing options...
ebr 14930 Posted May 13, 2015 Share Posted May 13, 2015 Are you sure you aren't dealing with the fact that, in java (and maybe some other languages) the day numbers aren't what you'd necessarily expect. For instance, month '0' is January. Link to comment Share on other sites More sharing options...
Angelblue05 4130 Posted May 13, 2015 Author Share Posted May 13, 2015 (edited) @@ebr Sorry I don't understand... I hope I'm not being daft. Is the access restriction based off the server's date/time or the client's date/time? What would cause the server to return this 401 response: 17:44:11 T:11020 NOTICE: {'date': 'Tue, 12 May 2015 22:44:11 GMT', 'transfer-encoding': 'chunked', 'x-application-error-code': 'ParentalControl', 'content-type': 'text/html', 'server': 'Mono-HTTPAPI/1.0'} It is Tuesday, the response clearly says Tuesday. My setting is set to allow Tuesday, yet the server returns this 401 response. If I select Monday instead of Tuesday, the server allows access and does not return this 401 response. Do I need to do something different, because I built the code base off the server response, not the actual 'date'. I basically did, if the server returns 401 response with ParentalControl then this means access is restricted.... I didn't think the client had any affect on parental control or else it would seem people would just change their local date and bypass admin settings. I hope I'm making sense hehe. I should say in this situation, both Kodi and Emby server are located on the same machine. Edit: maybe what you are talking about is what's happening server side or something is not being taken into account in my server settings.... Is there a place to set date/time? Edited May 13, 2015 by Angelblue05 Link to comment Share on other sites More sharing options...
ebr 14930 Posted May 13, 2015 Share Posted May 13, 2015 No, you're right - the client side shouldn't have to worry about it. Maybe a new bug has slipped in. I'll test with my accounts. Link to comment Share on other sites More sharing options...
ebr 14930 Posted May 13, 2015 Share Posted May 13, 2015 I just tested by removing all the access schedules for one of my users except for one set for Weekends. Tried to log in and properly got the access denied at this time message. Then I added a schedule for Wed 9am - 11pm and re-logged in and it let me in no problem. What version of the server are you on? This was done on my test server which is on 5610 atm. Link to comment Share on other sites More sharing options...
Angelblue05 4130 Posted May 13, 2015 Author Share Posted May 13, 2015 I'm on beta version 3.0.5607.1 well .2 now. I have restarted Kodi between attempts and restarted Emby as well to no avail. Maybe this only happens for new accounts? I have never set up a schedule before this. To test on my side, I had created a new account, added the schedule restarted Emby to make sure. The server just keeps returning the 401 parental control. What I did notice while testing is that the hours seem correct, it's just the set week day that seems to be off, somehow. What can I provide you to help replicate this issue? Sent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
ebr 14930 Posted May 13, 2015 Share Posted May 13, 2015 I'll try it with a new account. Also, does your account have a pw? The one I tested with does not. Link to comment Share on other sites More sharing options...
Angelblue05 4130 Posted May 13, 2015 Author Share Posted May 13, 2015 Or I can try to update to the same version as yours and test. Give me a few minutes. Sent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
ebr 14930 Posted May 13, 2015 Share Posted May 13, 2015 I'm stumped. I don't know what is different. Here is what I just did: Created new user Confirmed I could access fine with app Added schedule for only Tuesday Confirmed the app reported access restricted Added schedule for Wed Confirmed app let me in no problem Deleted schedule for Tuesday Confirmed app still let me in no problem 1 Link to comment Share on other sites More sharing options...
Angelblue05 4130 Posted May 13, 2015 Author Share Posted May 13, 2015 (edited) @@ebr Ok....I've just retried today with Wednesday and it worked too. I don't know why this happened yesterday, and it's not like I tried one time. I tried at least 15 different settings and it just wouldn't work, including restarting Kodi, Emby server and the machine itself. I will keep you posted if it happens again, sorry - Maybe Tuesday is cursed or something, I'll have to retry next Tuesday just to make sure. Thanks for looking into this anyway, really appreciate it! Edited May 13, 2015 by Angelblue05 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