SchizoDuckie / DuckieTV

A web application built with AngularJS to track your favorite tv-shows with semi-automagic torrent integration
http://schizoduckie.github.io/DuckieTV/
Other
1.13k stars 274 forks source link

Trakt.tv import #233

Closed IRCxB0T closed 10 years ago

IRCxB0T commented 10 years ago

It looks like there is a bug with the import from trakt.tv feature. For users that have their profile protected (like me), you must include HTTP basic auth with the HTTP request as well in order to return results.

garfield69 commented 10 years ago

according to what I can find on trakTV API doc http://trakt.tv/api-docs/user-library-shows-all

if you have set Protect on your account, then the only way DuckieTV can fetch your shows is for you to make Schizoduckie a friend. Returns all shows in a user's library. Each show will indicate how many plays it has. Protected users won't return any data unless you are friends.

http://support.trakt.tv/knowledgebase/articles/159072-how-do-i-add-friends To follow a user, navigate to their user profile page and click the +Follow button. If the user has a public profile, you will be immediately following them. If they are private, they will need to approve your request to follow them.

@SchizoDuckie, please validate my research, thanks.

garfield69 commented 10 years ago

Or maybe once you have signed in, we fetch that users API key and then use that instead of DuckieTV's API key, to do the fetch all shows ?

SchizoDuckie commented 10 years ago

I'll look into this over the weekend On Aug 8, 2014 10:32 PM, "garfield69" notifications@github.com wrote:

Or maybe once you have signed in, we fetch that users API key and then use that instead of DuckieTV's API key, to do the fetch all shows ?

— Reply to this email directly or view it on GitHub https://github.com/SchizoDuckie/DuckieTV/issues/233#issuecomment-51653765 .

SchizoDuckie commented 10 years ago

Okay, i've just been able to fetch user details after friending a newly made DuckieTV account.

I've swapped the api keys out and refactored the Trakt.TV service to solve some bugs and use http posts with authentication by default for the trakt.tv import calls.

This seems to work well, I just need to figure out exactly now how the friending works. Wether or not the user needs to just follow the DuckieTV account, or if I need to confirm the friend requests from that account and follow them back.

More on this later.

garfield69 commented 10 years ago

As far as I ascertained earlier, this would depend on who actually needs to do the following: if DuckieTV needs to follow the user, then if that user is private they will need to approve the request. But if it's the user that is following DuckieTV, then as long as DuckieTV is not private, their follow request will get auto-accepted.

IRCxB0T commented 10 years ago

It looks like this commit https://github.com/SchizoDuckie/DuckieTV/commit/b185e80465c822a9e0b84f236fbd42720131b2b9 will fix things. Thanks guys!!

Js41637 commented 10 years ago

Is this still an open or in progress issue?

garfield69 commented 10 years ago

I created a test user on trakt.tv, gave it protected status, then used duckietv 0.75 to push and pull watched series/episodes without having to 'follow' anybody or make additional config changes. So either Trakt.tv have changed their server code, or the changes made by Schizoduckie are working.