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 1
MediaPortal 1 Plugins
Popular Plugins
Trakt
[Issue] Localized EPG and Trakt MyTV Plugin.
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="Alberto83" data-source="post: 1204878" data-attributes="member: 128278"><p>You're right about full size vs small modal dialog. I implemented it today using a customized GUIDialogMenu, now there's a new setting users can enable to switch from full GUI to the dialog gui. The dialog is less intrusive but cannot show OSD details while open, which means sometimes it's not that easy to see the current right show, especially with shows without episode or season numbers in the EPG. I still need to fix the manual search keyboard popup. when it returns back to the dialog, it loses focus and remains on top. I think i'll probably have to fall back to full GUI for that.</p><p></p><p></p><p>The problem about wrong type detection was one of the first i tried to address. It's obviously not 100% perfect, and incredible to say, works better with localized titles than original titles. When you query trakt for a localized title infact, it usually returns one single original title, meaning there's really no need for manual intervention. However, there's still a chance the code gets the wrong scrobble, hence the successful scrobble dialog with 5 secs timeout. Interacting will stop the scrobble and fall back to manual GUI.</p><p>Anyways i handled it this way. There's a big big IF statement now on the scrobble thread</p><ol> <li data-xf-list-type="ol">It first checks cached results. cached results are of the type TraktEPGCacheRecord, a new Class<span style="font-family: 'Courier New'"> {"movie":{TraktMovieSummary},"show":{TraktShowSummary},"type":"TYPE"}.</span> They are considered safe, because i cache only shows and movies matched manually with user intervetion, so it's supposed to be correct. I scrobble using the data from there, overriding the videoinfo.</li> <li data-xf-list-type="ol">If there's no match from cache, it tries scrobbling with the original title from the EPG. I had to do that because some shows in the EPG might not be translated. This follows the very logic already in your MyTVLive class. If the scrobble returns a response code of "0" it's successful and pops up a dialog with a 3sec timeout that eventually allows to override it.</li> <li data-xf-list-type="ol">If i get a response code other that "0", it assumes it's a localized title and tries to search its original title by querying trakt with this URI:[code]https://api-v2launch.trakt.tv/search/movie,show?query=$TITLEFROMEPG$&fields=title,translations,aliases. [/code]If the search returns one single match, it uses that to scrobble (i'm still thinking if it should cache that, i'd rather keep cache for manual scrobble, so 100% safe matches). Otherwise manual intervention is needed and launches a dialog to ask the user if he wants to start manual GUI.</li> </ol><p>So whenever it scrobbles something wrong, the user can stop the scrobble and trigger the manual match. Given that the manual match is cached, the more you manual match, the less you'll have to do that in the future.</p><p>NB: if the user dismiss the dialog about the manual GUI match it caches the result with a special TraktEPGCacheRecord with type:"nullType" which prevents from scrobbling that again. This is useful for those shows or programs that don't have a record on trakt. See regional programs, or news or whatever.</p><p></p><p>The logic behind it is actually very simple, unfortunately i had to debug the whole thing using logs instead of the visual studio debugger, because it crashes every time on my desktop. This means every time i find something wrong, i have to check the logs and see the variables content printed on traktplugin.log, very time consuming. If i have time after christmas i'll try to fix this debug crashing thing.</p></blockquote><p></p>
[QUOTE="Alberto83, post: 1204878, member: 128278"] You're right about full size vs small modal dialog. I implemented it today using a customized GUIDialogMenu, now there's a new setting users can enable to switch from full GUI to the dialog gui. The dialog is less intrusive but cannot show OSD details while open, which means sometimes it's not that easy to see the current right show, especially with shows without episode or season numbers in the EPG. I still need to fix the manual search keyboard popup. when it returns back to the dialog, it loses focus and remains on top. I think i'll probably have to fall back to full GUI for that. The problem about wrong type detection was one of the first i tried to address. It's obviously not 100% perfect, and incredible to say, works better with localized titles than original titles. When you query trakt for a localized title infact, it usually returns one single original title, meaning there's really no need for manual intervention. However, there's still a chance the code gets the wrong scrobble, hence the successful scrobble dialog with 5 secs timeout. Interacting will stop the scrobble and fall back to manual GUI. Anyways i handled it this way. There's a big big IF statement now on the scrobble thread [LIST=1] [*]It first checks cached results. cached results are of the type TraktEPGCacheRecord, a new Class[FONT=Courier New] {"movie":{TraktMovieSummary},"show":{TraktShowSummary},"type":"TYPE"}.[/FONT] They are considered safe, because i cache only shows and movies matched manually with user intervetion, so it's supposed to be correct. I scrobble using the data from there, overriding the videoinfo. [*]If there's no match from cache, it tries scrobbling with the original title from the EPG. I had to do that because some shows in the EPG might not be translated. This follows the very logic already in your MyTVLive class. If the scrobble returns a response code of "0" it's successful and pops up a dialog with a 3sec timeout that eventually allows to override it. [*]If i get a response code other that "0", it assumes it's a localized title and tries to search its original title by querying trakt with this URI:[code]https://api-v2launch.trakt.tv/search/movie,show?query=$TITLEFROMEPG$&fields=title,translations,aliases. [/code]If the search returns one single match, it uses that to scrobble (i'm still thinking if it should cache that, i'd rather keep cache for manual scrobble, so 100% safe matches). Otherwise manual intervention is needed and launches a dialog to ask the user if he wants to start manual GUI. [/LIST] So whenever it scrobbles something wrong, the user can stop the scrobble and trigger the manual match. Given that the manual match is cached, the more you manual match, the less you'll have to do that in the future. NB: if the user dismiss the dialog about the manual GUI match it caches the result with a special TraktEPGCacheRecord with type:"nullType" which prevents from scrobbling that again. This is useful for those shows or programs that don't have a record on trakt. See regional programs, or news or whatever. The logic behind it is actually very simple, unfortunately i had to debug the whole thing using logs instead of the visual studio debugger, because it crashes every time on my desktop. This means every time i find something wrong, i have to check the logs and see the variables content printed on traktplugin.log, very time consuming. If i have time after christmas i'll try to fix this debug crashing thing. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
Trakt
[Issue] Localized EPG and Trakt MyTV Plugin.
Contact us
RSS
Top
Bottom