Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TraktUtilities - Improved integration #11

Closed
othrayte opened this issue Jul 28, 2011 · 22 comments
Closed

TraktUtilities - Improved integration #11

othrayte opened this issue Jul 28, 2011 · 22 comments

Comments

@othrayte
Copy link

Hey,

I have decided to take up the challenge of adding some of the skin integration we have been talking about with TU for a while and thought of doing things with your skin first both because we love your skin and because we would like a skin that integrates with TU to best show how it can be done.

One thing I was trying to hack together was a 'watch-list' indicator in the video library. But I came upon a dead end in my understanding of your skin, so there goes my attempt at that. I was hoping you might be able to help with this a little. The way I think I'll try to do it (correct me if there is a better way) would be to allow you to call XBMC.RunScript(script.TraktUtilities,movieId=XXXXXX) and then to have a Window(Home).Property(TraktUtilities.Latest.WatchlistStatus) call to get a bool to turn the idicator on or off. That method would only work for one at a time, I'm not sure if this is even possible but I thought maybe the 'TraktUtilities.Latest.WatchlistStatus' could be replaced with 'TraktUtilities.XXXXXX.WatchlistStatus' to get the correct movie. Then you would call XBMC.RunScript(script.TraktUtilities,movieId=XXXXXX) for each movie that was visible (don't know if this is possible either) and each item would use the corresponding 'TraktUtilities.XXXXXX.WatchlistStatus'. I'm hoping there is a better way 'cos that all seems wrong to me.

One thing that might be easier would be to call a 'rate' or 'add to watchlist' function from the library, possibly from the context menu (not sure if you even have access to the context menu).

Any other ideas that you might have would be greatly appreciated, especially ones that are easier to implement on the skin side of things.

@BigNoid
Copy link
Owner

BigNoid commented Jul 28, 2011

First off, thx for considering implementing this in Aeon Nox first!
I think the easiest way for the watchlist indicator, without slowing things down or having to do a million visibility conditions is to integrate it in the info dialog. I can add a invisible button that runs the script every time the dialog is opened. The best way for that would be if the script can have an input from the available infolabels in XBMC or some other way so that it would automatically know the movie id upon opening the dialog.
I don't have control over the context menu. It is automatically populated through XBMC. I can add the rate/watchlist buttons to the shutdown menu (S menu), although that doesn't seem intuitive, or to the media menu or to the info dialog.

@othrayte
Copy link
Author

Ok, I hack out the commands for what you suggested for watch-list indicator, and probably some rating functions, up to you where you choose to call them from.

Is it possible to pass the id like XBMC.RunScript(script.TraktUtilities,movieId=$INFO[ListItem.LibraryID]) ? That is how I would expect to handle it.

Anyway when I have the functions i'll report back.

@BigNoid
Copy link
Owner

BigNoid commented Jul 28, 2011

there is no infolabel that passes the movieid. I know the scripts logo downloader and tvtunes have a solo mode which graps the correct tv show without skin input. I don't know much about python though.

@othrayte
Copy link
Author

We'll need to look into what info we can use to identify the item (for now movies).
I've created a new branch in my repo called skin_inte to hold my experiments.
To call it you use:
XBMC.RunScript(script.TraktUtilities,movie,summary,tt1285016,The Social Network,2010)
or
XBMC.RunScript(script.TraktUtilities,movie,summary, ,The Social Network,2010)
or
XBMC.RunScript(script.TraktUtilities,movie,summary,tt1285016, , )

And to use the data:
substring(Window(Home).Property(TraktUtilities.Movie.Recent.Seen),true)
I'll add more of these when we know they are working.

@BigNoid
Copy link
Owner

BigNoid commented Jul 29, 2011

I get a script error. Debug is here: http://pastebin.com/yfg5YJm2

@othrayte othrayte reopened this Jul 30, 2011
@othrayte
Copy link
Author

Fixed in repo

@BigNoid
Copy link
Owner

BigNoid commented Jul 30, 2011

Okay, it works now. I don't see the point in having trakt utilities running a script to show watched status? This is native in XBMC and trakt utilities syncs with trakt, so the two are always the same? (please correct me if I'm wrong) Having a watchlist indicator is something else of course and also the rating would be nice. Do you have access to the love/hate indicator that the trakt website uses to show on the posters? Would be nice to use a hig res version of that ribbon to show how you rated the movie/tv show/episode.

@othrayte
Copy link
Author

Yeah, :P, I was just using it to prove that I can get the method to work. I'll fill in the ones for rating and watchlist etc soon. What I'm looking into at the moment is modifying the list from within python, but I'm having trouble, I can get window 10025, I can get the lists, ids in the 500's but they all appear empty and when I add an item to them all the original items disappear. If i can get this to work then one request at the window load would be able to fill all of the listitems with extra tags like 'ListItem.WatchlistStatus', with only a small delay. But I'm temporarily stumped on that one.

@othrayte
Copy link
Author

Lol, just looked at the code I've been working on for hours, and noticed that you can already use 'TraktUtilities.Movie.Recent.WatchlistStatus' and 'TraktUtilities.Movie.Recent.CollectionStatus'. So I'll just add rating, it'll be a string either 'love', 'hate' or ''.

@othrayte
Copy link
Author

ok, I've added TraktUtilities.Movie.Recent.Rating, but also the others now return "True" or "False" instead of "true" or "false", but I'm not sure whether the substr command is case sensitive.

@BigNoid
Copy link
Owner

BigNoid commented Jul 30, 2011

It's not case sensitive. Everything is working fine, now to get some high res images of the badges trakt.tv uses and I can get this nicely working.

@othrayte
Copy link
Author

Badges, I'm not sure what you call the badges but I've done some trakt images as svgs in https://github.com/othrayte/script.TraktUtilities-media-originals

@BigNoid
Copy link
Owner

BigNoid commented Jul 30, 2011

Yeah of course. I can use those. I'll let you know when I'm done.
Op 30 jul. 2011 10:39 schreef "othrayte" <
reply@reply.github.com>
het volgende:

Badges, I'm not sure what you call the badges but I've done some of them
as svgs in https://github.com/othrayte/script.TraktUtilities-media-originals

Reply to this email directly or view it on GitHub:
#11 (comment)

@BigNoid
Copy link
Owner

BigNoid commented Jul 30, 2011

it seems titles with ":" don't work.
http://pastebin.com/QTabkKiy

@othrayte
Copy link
Author

Should have just fixed some cases with odd symbols

@BigNoid
Copy link
Owner

BigNoid commented Jul 30, 2011

I created a branch called TraktUtilities. First enable in genereal skin settings "Enable Trakt Utilities integration". Then in video info you should see the rating, watched and watchlist badges in trakt.tv style.

@BigNoid
Copy link
Owner

BigNoid commented Aug 16, 2011

How's this going?

@othrayte
Copy link
Author

It's on hold until I get some to work on it, I'm busy at uni preparing for
some presentations, I should be able to work on it from monday.
On Aug 16, 2011 10:59 PM, "BigNoid" <
reply@reply.github.com>
wrote:

How's this going?

Reply to this email directly or view it on GitHub:
#11 (comment)

@BigNoid
Copy link
Owner

BigNoid commented Aug 16, 2011

No pressure, was just wondering since the branch was removed and hadn't been merged as far as I could tell. Good luck with the presentations.

@othrayte
Copy link
Author

I don't think the branch has been removed, it should still be in my TU
repository, if it is missing I'll just restore out from my local copy.
On Aug 17, 2011 12:05 AM, "BigNoid" <
reply@reply.github.com>
wrote:

No pressure, was just wondering since the branch was removed and hadn't
been merged as far as I could tell. Good luck with the presentations.

Reply to this email directly or view it on GitHub:
#11 (comment)

@BigNoid
Copy link
Owner

BigNoid commented Aug 16, 2011

My bad, I was looking in manromen's repo...

@phil65
Copy link
Collaborator

phil65 commented Aug 14, 2012

closed.

@phil65 phil65 closed this as completed Aug 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants