home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 2
Plugin Development
Trakt for MP2
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="aspik" data-source="post: 1153080" data-attributes="member: 72523"><p>As I don't know, if I'm on the right path, I'll post what I've done so far.</p><p>After replacing the whole content of the MP2 TraktAPI class with the Trakt for MP1 content, I've copied/fixed the new/existing DataStructures, so that the MP2 TraktAPI class doesn’t contained any errors.</p><p></p><p>Next I've started to fix syncing of movies. In the SyncMovies method:</p><p><a href="https://github.com/MediaPortal/MediaPortal-2/blob/1fcf783e56c55e96ae9c0e490a4b5b5b7be5487f/MediaPortal/Incubator/Trakt/Models/TraktSetupModel.cs#L211" target="_blank">https://github.com/MediaPortal/MediaPortal-2/blob/1fcf783e56c55e96ae9c0e490a4b5b5b7be5487f/MediaPortal/Incubator/Trakt/Models/TraktSetupModel.cs#L211</a></p><p>I've adjusted the sync logic according to the new API (this was taken from MovingPictures class). As a next step I wanted to go to the SyncSeries method:</p><p><a href="https://github.com/MediaPortal/MediaPortal-2/blob/1fcf783e56c55e96ae9c0e490a4b5b5b7be5487f/MediaPortal/Incubator/Trakt/Models/TraktSetupModel.cs#L250" target="_blank">https://github.com/MediaPortal/MediaPortal-2/blob/1fcf783e56c55e96ae9c0e490a4b5b5b7be5487f/MediaPortal/Incubator/Trakt/Models/TraktSetupModel.cs#L250</a></p><p>and do the same for series. But, before I'll try this, I have couple questions.</p><p></p><p>I think that to get the current version of Trakt working is not a matter of changing the login process, but the whole API has to be adjusted, as it changed since the first implementation.</p><p></p><p>First, there is now cache, which I suppose has to be done before do i.e syncing to Trakt? The cache in Trakt for MP1:</p><p><a href="https://github.com/trakt/Trakt-for-Mediaportal/blob/663a15b761ca3917b6e101838ed28d4dcdc0a276/TraktPlugin/TraktCache.cs" target="_blank">https://github.com/trakt/Trakt-for-Mediaportal/blob/663a15b761ca3917b6e101838ed28d4dcdc0a276/TraktPlugin/TraktCache.cs</a></p><p>The logic can be ported, but the paths to the files, need to be adjusted as this is MP1 specific. How should these paths look in MP2?</p><p></p><p>Logging in Trakt for MP1 is in a separate class TraktLogger. Is this class needed in MP2, or should the logging be done with the internal logger: ServiceRegistration.Get<ILogger>().Info… ?</p><p></p><p>Trakt settings changed. MP1 version:</p><p><a href="https://github.com/trakt/Trakt-for-Mediaportal/blob/74143f902b81b58f3de5703a438a1cea397e36b4/TraktPlugin/TraktSettings.cs" target="_blank">https://github.com/trakt/Trakt-for-Mediaportal/blob/74143f902b81b58f3de5703a438a1cea397e36b4/TraktPlugin/TraktSettings.cs</a></p><p>MP2 version:</p><p><a href="https://github.com/MediaPortal/MediaPortal-2/blob/1fcf783e56c55e96ae9c0e490a4b5b5b7be5487f/MediaPortal/Source/Extensions/MetadataExtractors/OnlineLibraries/Libraries/Trakt/TraktSettings.cs" target="_blank">https://github.com/MediaPortal/MediaPortal-2/blob/1fcf783e56c55e96ae9c0e490a4b5b5b7be5487f/MediaPortal/Source/Extensions/MetadataExtractors/OnlineLibraries/Libraries/Trakt/TraktSettings.cs</a></p><p>Additional the place where it is currently placed in MP2 interfere with MP2 Trakt settings:</p><p><a href="https://github.com/MediaPortal/MediaPortal-2/blob/1fcf783e56c55e96ae9c0e490a4b5b5b7be5487f/MediaPortal/Incubator/Trakt/Settings/TraktSettings.cs" target="_blank">https://github.com/MediaPortal/MediaPortal-2/blob/1fcf783e56c55e96ae9c0e490a4b5b5b7be5487f/MediaPortal/Incubator/Trakt/Settings/TraktSettings.cs</a></p><p>I.e. to reach the Methods from Trakt settings (not MP2 Trakt settings), I have to wrote the whole namespace path:</p><p>Extensions.OnlineLibraries.Libraries.Trakt.TraktSettings.SyncBatchSize;</p><p></p><p>I suppose the method TestAccount:</p><p><a href="https://github.com/MediaPortal/MediaPortal-2/blob/1fcf783e56c55e96ae9c0e490a4b5b5b7be5487f/MediaPortal/Incubator/Trakt/Models/TraktSetupModel.cs#L171" target="_blank">https://github.com/MediaPortal/MediaPortal-2/blob/1fcf783e56c55e96ae9c0e490a4b5b5b7be5487f/MediaPortal/Incubator/Trakt/Models/TraktSetupModel.cs#L171</a></p><p>is the old log-in method as the new API doesn’t contains the TestAccount() method? So, to new log-in process has to be done here?</p><p></p><p>The last thing is scrobbling, which in MP2 is in the TraktHandler class:</p><p><a href="https://github.com/MediaPortal/MediaPortal-2/blob/1fcf783e56c55e96ae9c0e490a4b5b5b7be5487f/MediaPortal/Incubator/Trakt/Service/TraktHandler.cs" target="_blank">https://github.com/MediaPortal/MediaPortal-2/blob/1fcf783e56c55e96ae9c0e490a4b5b5b7be5487f/MediaPortal/Incubator/Trakt/Service/TraktHandler.cs</a></p><p>right?</p><p></p><p>[USER=48495]@morpheus_xx[/USER] </p><p>Can you please take a look at the attached 'patch' and review the changes I've made so far? Especially at the TraktCache, TraktSettings classes and check if they are in the right place, if not the correct this? </p><p></p><p>Obviously the project doesn’t build, because syncing series (TraktSetupModel) and scrobbling (TraktHandler) has to be fixed.</p><p>Additionally I've errors in the LoginModel class:</p><p><a href="https://github.com/MediaPortal/MediaPortal-2/blob/1fcf783e56c55e96ae9c0e490a4b5b5b7be5487f/MediaPortal/Incubator/Login/LoginModel.cs" target="_blank">https://github.com/MediaPortal/MediaPortal-2/blob/1fcf783e56c55e96ae9c0e490a4b5b5b7be5487f/MediaPortal/Incubator/Login/LoginModel.cs</a></p><p>because of missing the MediaPortal.UI.UserManagement namesapce. I don't know how this has something to do with Trakt?</p><p></p><p>Thank you!</p></blockquote><p></p>
[QUOTE="aspik, post: 1153080, member: 72523"] As I don't know, if I'm on the right path, I'll post what I've done so far. After replacing the whole content of the MP2 TraktAPI class with the Trakt for MP1 content, I've copied/fixed the new/existing DataStructures, so that the MP2 TraktAPI class doesn’t contained any errors. Next I've started to fix syncing of movies. In the SyncMovies method: [URL]https://github.com/MediaPortal/MediaPortal-2/blob/1fcf783e56c55e96ae9c0e490a4b5b5b7be5487f/MediaPortal/Incubator/Trakt/Models/TraktSetupModel.cs#L211[/URL] I've adjusted the sync logic according to the new API (this was taken from MovingPictures class). As a next step I wanted to go to the SyncSeries method: [URL]https://github.com/MediaPortal/MediaPortal-2/blob/1fcf783e56c55e96ae9c0e490a4b5b5b7be5487f/MediaPortal/Incubator/Trakt/Models/TraktSetupModel.cs#L250[/URL] and do the same for series. But, before I'll try this, I have couple questions. I think that to get the current version of Trakt working is not a matter of changing the login process, but the whole API has to be adjusted, as it changed since the first implementation. First, there is now cache, which I suppose has to be done before do i.e syncing to Trakt? The cache in Trakt for MP1: [URL]https://github.com/trakt/Trakt-for-Mediaportal/blob/663a15b761ca3917b6e101838ed28d4dcdc0a276/TraktPlugin/TraktCache.cs[/URL] The logic can be ported, but the paths to the files, need to be adjusted as this is MP1 specific. How should these paths look in MP2? Logging in Trakt for MP1 is in a separate class TraktLogger. Is this class needed in MP2, or should the logging be done with the internal logger: ServiceRegistration.Get<ILogger>().Info… ? Trakt settings changed. MP1 version: [URL]https://github.com/trakt/Trakt-for-Mediaportal/blob/74143f902b81b58f3de5703a438a1cea397e36b4/TraktPlugin/TraktSettings.cs[/URL] MP2 version: [URL]https://github.com/MediaPortal/MediaPortal-2/blob/1fcf783e56c55e96ae9c0e490a4b5b5b7be5487f/MediaPortal/Source/Extensions/MetadataExtractors/OnlineLibraries/Libraries/Trakt/TraktSettings.cs[/URL] Additional the place where it is currently placed in MP2 interfere with MP2 Trakt settings: [URL]https://github.com/MediaPortal/MediaPortal-2/blob/1fcf783e56c55e96ae9c0e490a4b5b5b7be5487f/MediaPortal/Incubator/Trakt/Settings/TraktSettings.cs[/URL] I.e. to reach the Methods from Trakt settings (not MP2 Trakt settings), I have to wrote the whole namespace path: Extensions.OnlineLibraries.Libraries.Trakt.TraktSettings.SyncBatchSize; I suppose the method TestAccount: [URL]https://github.com/MediaPortal/MediaPortal-2/blob/1fcf783e56c55e96ae9c0e490a4b5b5b7be5487f/MediaPortal/Incubator/Trakt/Models/TraktSetupModel.cs#L171[/URL] is the old log-in method as the new API doesn’t contains the TestAccount() method? So, to new log-in process has to be done here? The last thing is scrobbling, which in MP2 is in the TraktHandler class: [URL]https://github.com/MediaPortal/MediaPortal-2/blob/1fcf783e56c55e96ae9c0e490a4b5b5b7be5487f/MediaPortal/Incubator/Trakt/Service/TraktHandler.cs[/URL] right? [USER=48495]@morpheus_xx[/USER] Can you please take a look at the attached 'patch' and review the changes I've made so far? Especially at the TraktCache, TraktSettings classes and check if they are in the right place, if not the correct this? Obviously the project doesn’t build, because syncing series (TraktSetupModel) and scrobbling (TraktHandler) has to be fixed. Additionally I've errors in the LoginModel class: [URL]https://github.com/MediaPortal/MediaPortal-2/blob/1fcf783e56c55e96ae9c0e490a4b5b5b7be5487f/MediaPortal/Incubator/Login/LoginModel.cs[/URL] because of missing the MediaPortal.UI.UserManagement namesapce. I don't know how this has something to do with Trakt? Thank you! [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
Trakt for MP2
Contact us
RSS
Top
Bottom