Kodi Community Forum

Full Version: [WIP] The Paper Street Soap Company (mockups and development of a new skin concept)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i don't understand what you wanna do with this clock !
ppic Wrote:i don't understand what you wanna do with this clock !

I got lost on that one too.... Huh
Fair enough Big Grin I'll post a mockup later tonight and you'll see what I mean.
can scripts be called every time the selection changes in a list? if so, a three-line python script could look something like this:
Code:
watched = float(xbmc.getInfoLabel("ListItem.Property(WatchedEpisodes)"))
totalEps = float(xbmc.getInfoLabel("ListItem.Property(TotalEpisodes)"))
window.setProperty("ClockHandAngle", "%d" % (watchedEps / totalEps * 180))

A little off-topic: Actually tried this a bit, nice and easy way to start learning xbmc scripting. My first idea was to append a property to every item in the list at once, but "getComponent(id)" just returned an empty ControlList-object, not sure if this is a bug or not. I get the component itself (I can move it etc), but in python it seems empty.
I have been following this thread and I understand what you are talking about but I thought this might be a better idea cause it would hold up to 360 episodes.

Image
tomeirik Wrote:can scripts be called every time the selection changes in a list? if so, a three-line python script could look something like this:
Code:
watched = float(xbmc.getInfoLabel("ListItem.Property(WatchedEpisodes)"))
totalEps = float(xbmc.getInfoLabel("ListItem.Property(TotalEpisodes)"))
window.setProperty("ClockHandAngle", "%d" % (watchedEps / totalEps * 180))

A little off-topic: Actually tried this a bit, nice and easy way to start learning xbmc scripting. My first idea was to append a property to every item in the list at once, but "getComponent(id)" just returned an empty ControlList-object, not sure if this is a bug or not. I get the component itself (I can move it etc), but in python it seems empty.

i believe that the first focused item ".." isn't in the container.
blacklist Wrote:How about this idea.

Of all the House episodes, I have just the last 2 seasons (the rest are archived on DVD, external hard drive, etc.) so you see an idling tachometer:

Image

South Park, on the other hand, has a ton of episodes and I have roughly 95% of them on my xbmc box, so you see the full throttle version:

Image

If you like this idea, it's yours...

Now that I think about it, an empty/full gas tank gauge would be a more obvious choice Laugh
Now you guys are getting the spirit! I had actually thought about fuel gauges or a tachometer, but the pocket watch seemed like the best way to keep in with the theme of the skin.

To answer the previous question, I believe the you should be able to call the python with each call of the viewtype for the page.

So, for the Buffy mockup

Image

I have 132 episodes of Buffy, with lets say 10 of them watched. I'm planning to drop in a pocket watch image instead of the "new episode" (although I still want that, not sure where it will end up).

Ideally, what I would like to see is three things

1.Total Episodes (might be wishful thinking, I don't think XBMC stores this info ie. the total number of episodes create, Sickbeard does however),
2. Total Episodes I Have
3. Number of Episodes Watched.

So basically we would use the 3 hands (probably in corresponding colors to make them stand out) to represent these values on the clock. To play on Shorty's idea, maybe we could do something special if any of the 3 values align.

Cases:
1. If there are 132 episodes and I have all 132
2. If there are 132 episodes and I have all 132 and I have WATCHED all 132!

If we can make this work, I think I can expand this sort of visual refrence to other areas of the skin, including plans for the OSD!
sorry but i still don't understand Sad
ppic Wrote:sorry but i still don't understand Sad

Say, for example, you have a show with 180 episodes.

Instead of a stopwatch (for now), picture representing that show with a pie chart.

If you had watched 90 episodes of this series (that has 180 episodes), you would have seen 50% of the show. The pie chart would be half watched and half unwatched.

Since a pie chart is a circle, it represents 360 degrees of rotation. For 180 episodes, each episode is 2 degrees in this example (if the show had 90 episodes, each one would be 4 degrees, etc). To construct a pie chart showing how much of a given show you've watched, you sub in whatever math is relevant, but for the sake of this example, stick with a show that has 180 or 90 episodes.

If you had watched 10 shows of the 180, you would be 18% done with the series. To show this as a pie chart, you would fill in a slice from 0 to 20 degrees (of 360 degrees to fill the circle), and you would have a visual representation of the 18%. (18% of 360 = 20)

Now, instead of a pie chart, picture a clock face. Same circle. Take a clock hand and rotate it 20 degrees from 12 o'clock, and you've moved 18% of the way around the clock. If you watch 80 more shows, you get to the halfway point (10 + 80 = 90 = 180/2) and the clock's hand is at 6 o'clock. Same concept, same math, different visual representation.

For bonus points, rotate different clock hands of different colors around the clock face (pie chart) to represent different bits of information (number of episodes watched out of the total; number of episodes in the library out of the total; etc).

Extra bonus points for different metrics (100% watched makes the watch gold instead of silver, etc).

Will just require pulling in the variables of: number of episodes total for a show, number in the library, number watched, etc. Then do the applicable math to work out a percentage into rotating a visual element the applicable degrees to fit into whichever visual representation Blacklist decides on....

Make more sense?

PS: Blacklist, I fear I may be in love with you.
ppic Wrote:i believe that the first focused item ".." isn't in the container.

Continuing off-topic: I'm not really sure what you mean. The code I posted will work with a try/except-block, but the script will have to be run every time the selection changes. What I couldn't get working was altering the properties of every item in the video-list (can't get the listitems from within the script). Wasn't planning on releasing anything, just thought is was a fun place to start, so never mind. Guess this is what the script development subforum is for Smile

On-topic: Extremely nice skin, checking in on this thread daily...
ok, but i would stick with numbers in db, don't really think that get total episode of the show will be a pleasure to grab.
ppic Wrote:ok, but i would stick with numbers in db, don't really think that get total episode of the show will be a pleasure to grab.

he is after how many episodes are out there in total for a show right?

could this page over at thetvdb.com be of help?
http://www.thetvdb.com/?tab=seasonall&id=78261&lid=7

omitting the "Specials" section and counting lines would at least give a number of added episodes. (Perhaps possible to ask thetvdb.com blokes to add it to the API to fetch total amount of episodes?)
Rad_ Wrote:PS: Blacklist, I fear I may be in love with you.

I'm a saggatarius who likes long walks on the beach...
wimpy Wrote:he is after how many episodes are out there in total for a show right?

could this page over at thetvdb.com be of help?
http://www.thetvdb.com/?tab=seasonall&id=78261&lid=7

omitting the "Specials" section and counting lines would at least give a number of added episodes. (Perhaps possible to ask thetvdb.com blokes to add it to the API to fetch total amount of episodes?)

If any of you use Sickbeard, its getting its info from somewhere. Now, it may be since it scrapes the full episode list when you add a show, that it is calculating the total number of episodes that it scraped - so not technically finding that information directly from thetvdb.

And, to my previous point - that is really nice-to-have information, not critical for the idea. What is critical is total number of episodes, and total watched episodes.