Jump to content

Percent Played Indicator - Request


Angelblue05

Recommended Posts

Angelblue05

The way Percent Played indicator currently is a bit of a cache nightmare. Can we create a static link with the logic of a simple: Enable Percent Played indicator [true/false]

 

Because the image link changes with the PercentPlayed:

A percent played overlay can be added onto the image using PercentPlayed=47

It makes the cache create a new reference because the link is not static. I actually like this feature a lot. It's quite emby! Just can't afford implementing it. Is it possible to change this behavior? :)

 

Edit:

I was also expecting AddPlayedIndicator=false to nullify PercentPlayed is 100. Is there a way to make it work this way - I just don't want to see the green checkmark at all.

Edited by Angelblue05
Link to comment
Share on other sites

i don't really follow what you're saying but in regards to the image indicators, it will do whatever you tell it to with the params

Link to comment
Share on other sites

Angelblue05

Ok sorry I will try to be clearer :)

 

Is there a way to get the image via Users/userId. So this way, the played percentage can be automatically applied to the image if the played percentage is enabled?

 

Kodi cache image based off the url. If it changes, then its a whole new image cached instead of just replacing existing one (the url changes due to the played percentage value changing).

 

So in a few moment of testing it had already cached a couple extra images of the same poster - with the indicator slightly changed each time. I hope this makes sense? Would it not be possible to have a static url (like for backdrops)? Basically the image would change but not the url - by having playedpercent indicator [true/false] via Users so it can access userdata (where played percentage is located)

 

 

Sent from my iPhone using Tapatalk

Edited by Angelblue05
Link to comment
Share on other sites

No because then it's not cacheable because the URL will not be unique. That's why you build the params client side

  • Like 1
Link to comment
Share on other sites

To avoid this, you could pretty easily overlay your own pct indicator in Kodi.  That way you don't have the cache issue as the image and url stay the same and you just overlay the proper indicator.

Link to comment
Share on other sites

Angelblue05

Kodi has it's own caching system. So no matter what, it will cache the posters, banners, backdrops and all the many versions of the percentage variation. The only time it caches the image is if it's a new url, otherwise it will simply refresh said cached image.

 

There is no way to overlay our own indicator. I believe it would be impossible unless a specific skin is created for it. This used to work with Media browser add-on, however it was because we didn't use Kodi's database. Now we do, with Emby for Kodi, so artwork getting cached is controlled by Kodi.

 

I just find the feature awkward to work with. Everything else is static, so it's working great except for the Played Percentage option which you need to enter a value for some unknown reason. I mean why would you want to generate a percentage unrelated to the actual value? It's odd thinking. :) We already refresh the image on basis if the lastmodified field is different. It would be great if the url could remain the same when enabling Played Percentage, and then the indicator would be updated server side, using the userdata info of the item.

 

Anyway, I guess it's just not something we can have in Kodi. Sucks because I really like the Played Percentage indicator.

Edited by Angelblue05
Link to comment
Share on other sites

im85288

You can (unless I understand things wrong) do as ebr states and made it a skin overlay. I've done this with Arctic specifically to avoid needing to use the server to generate the overlay for me.

 

For example in this post: http://emby.media/community/index.php?/topic/19594-arctic-zephyr-skin-custom-version/?p=219637

 

I've placed it at the top of the poster and it's in the Orange, that could easily have been placed at the bottom and have a different colour. The same sort of things can be done to get for example the number of unwatched overlayed on posters etc.

  • Like 1
Link to comment
Share on other sites

Angelblue05

Oh, well my apologies ebr, I was sure it wasn't something that could be done, without modifying the skin. 

@@im85288

 

Where in your arctic skin is the relevant code for this? :)

Edited by Angelblue05
Link to comment
Share on other sites

im85288

You can use a "progress" indicator for this. eg:

                              <control type="progress">
					<top>-7</top>
					<width>320</width>
					<height>4</height>
					<info>ListItem.PercentPlayed</info>
					<overlaytexture>-</overlaytexture>
					<visible>ListItem.IsResumable</visible>
				</control>
  • Like 1
Link to comment
Share on other sites

Angelblue05

Ok, I get this, but how do you make it work in Kodi. Let's say we wanted to implement that option. How would you overlay with this progress indicator, every image displayed on screen? - I'm still learning.... :)

Link to comment
Share on other sites

I believe it probably would have to be a modification to the skin - unless, like MBC, there is a common image button that is used by all the skins (or most of them anyway).

 

However, what you are requesting won't work.  The reason the percentage value is a part of the url is exactly because of caching.  If the value were not a part of the url, you would end up caching the very first one you got and always show that one out of the cache instead of getting an updated image with the correct pct bar.

  • Like 1
Link to comment
Share on other sites

marcelveldt

This must be done skinside... Almost every kodi skin does it this way. Just draw a texture with label on top of the poster

Link to comment
Share on other sites

Angelblue05

@@marcelveldt Ok so I couldn't add an option in Emby for Kodi to display this? Or I can? I'm just not fully grasping how Kodi sees the xml I make? :) how would it know to load the progress bar. Please explain the texture label to me, with a bit more details - I'm not a skinner like you :)

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

Angelblue05

@@ebr that's the thing, with the websocket we can easily know the item to update. Then it's possible to just refresh images for said item. Anyway, we'll see how the overlay goes, I'm very much a noob when it comes to this stuff. :)

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

im85288

@@Angelblue05 - did you look at the code piece I copied above? The key field there was ListItem.PercentPlayed

 

Have a play with different skins and you'll see it used in many different ways. As you saw with the question you asked about skinning in the dev thread there's many ways to do different things so finding the answer is not always possible. More once you get used to the fundamentals the rest starts to fall into place.

Link to comment
Share on other sites

Angelblue05

Yes I did look at the code you copied above. However I do not know what to do with it. That's why I keep asking how to use it? Or how to apply it in the context that I want to be able to display the percent played over any skins. Skinning is like such an abstract concept. Coding is much easier to understand than skinning. >.> 

 

I might just give up... I understand your code, which is basically creating a progress layout and the value is the ListItem.PercentPlayed. I also understand that if you add the visible tag as ListItem.IsResumable then it will only display when the item listed has a bookmark. Bahh.... I just don't know how to insert it so Kodi displays it.

 

Edit: Can I do something similar to your user preferences?

Edited by Angelblue05
Link to comment
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...