ebr 14913 Posted January 23, 2017 Share Posted January 23, 2017 https://github.com/MediaBrowser/Emby/blob/df5b74a4b25eca3157957303cebf06f31c9d9a65/MediaBrowser.Api/UserLibrary/PlaystateService.cs#L423 Link to comment Share on other sites More sharing options...
mutu310 70 Posted January 23, 2017 Author Share Posted January 23, 2017 https://github.com/MediaBrowser/Emby/blob/df5b74a4b25eca3157957303cebf06f31c9d9a65/MediaBrowser.Api/UserLibrary/PlaystateService.cs#L423 I don't have VS to test at the moment but this looks like it's related to the library rather than the channel items (?) Link to comment Share on other sites More sharing options...
ebr 14913 Posted January 23, 2017 Share Posted January 23, 2017 It should work with any item. Link to comment Share on other sites More sharing options...
mutu310 70 Posted January 23, 2017 Author Share Posted January 23, 2017 And how do I find out who is the current logged in user viewing the channel? Because I can fix this whole issue myself by, when building the channel items I compare to the library using the IMDb ID as key, check the played status in the library for the logged in user and then mark the item as played in the channel accordingly. Link to comment Share on other sites More sharing options...
ebr 14913 Posted January 23, 2017 Share Posted January 23, 2017 I don't believe your items are built on a per-user basis nor are they re-built every time someone asks for them. So I don't think you can handle this this way. I could be wrong though - been a while since I've been inside this process. Link to comment Share on other sites More sharing options...
mutu310 70 Posted January 23, 2017 Author Share Posted January 23, 2017 I don't believe your items are built on a per-user basis nor are they re-built every time someone asks for them. So I don't think you can handle this this way. I could be wrong though - been a while since I've been inside this process.This is getting really confusing. From one post I understand I can set the played status but in the next post it seems I can't. Who can provide me with what is and what isn't possible to do please so I can see if I can find a way around this? If I can get the logged in user I am positive/hopeful I can build a channel for a user that may look different to another user (eg hiding or marking played movies) Link to comment Share on other sites More sharing options...
ebr 14913 Posted January 23, 2017 Share Posted January 23, 2017 It is all about context. Given an item and user ID you can control the watched status of an item. However, in the context that your plug-in is delivering items, I'm not positive that is relevant. It is best to give Luke some time to see if there is an issue why the items aren't getting the user data properly in the first place. You may just have to be a little patient because, obviously, this isn't a high-frequency situation for the system overall. 1 Link to comment Share on other sites More sharing options...
mutu310 70 Posted January 23, 2017 Author Share Posted January 23, 2017 It is all about context. Given an item and user ID you can control the watched status of an item. However, in the context that your plug-in is delivering items, I'm not positive that is relevant. It is best to give Luke some time to see if there is an issue why the items aren't getting the user data properly in the first place. You may just have to be a little patient because, obviously, this isn't a high-frequency situation for the system overall. Cheers. Will wait for @@Luke then. In the meantime as I wrote earlier I made a scheduled task that checks whether the items in my plugin database exist in the movie library and if they are checks whether all users have played the item. If all users have played the movie then it removes the movie from my database so it won't show it as a suggestion. It's a workaround which works best in a single-user installation. Link to comment Share on other sites More sharing options...
mutu310 70 Posted January 23, 2017 Author Share Posted January 23, 2017 (edited) It is all about context. Given an item and user ID you can control the watched status of an item. However, in the context that your plug-in is delivering items, I'm not positive that is relevant. It is best to give Luke some time to see if there is an issue why the items aren't getting the user data properly in the first place. You may just have to be a little patient because, obviously, this isn't a high-frequency situation for the system overall. This thread can be discarded. I managed! I got the userid from query.userid, queried the library for played movies by that user and while building the channel item info I am skipping the ones in the played list. Haven't found a means to mark them as played instead, but hiding them completely is even more preferable. Edited January 24, 2017 by mutu310 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