Posts: 10
Joined: Jan 2015
Reputation:
0
BePov
Junior Member
Posts: 10
2015-01-22, 11:17
(This post was last modified: 2015-01-22, 12:05 by BePov.)
It's mostly missing 2 things :
- The refresh button is greyed out, so I can't update the movie/tvshow/file
- The choose art button only lets me browse through local art, and does not allow online art search as it would in the library mode
It's as if the info window didn't actually have the correct path/file-id/link to the video. I'm wondering if that's actually feasible... I would have to do something like XBMC.Action(Info, movieid) or something
I've checked your code, but, if i understand correctly, you link only to external files and so you probably don't need this refresh button (I can't test yet because I don't have any of the required accounts)
Posts: 14
Joined: Dec 2014
Reputation:
0
I will try the code. What is the best practice to retrieve metadata for addons? I'm worried about performance.
If my directory listing has 25 tv shows I don't want it to take like 25 seconds before showing the list to the user.
Do I need to add a scheduled background process which retrieves meta data? Can I retrieve meta data asynchronous?
Posts: 646
Joined: May 2009
Reputation:
30
It won't take that long, and as it grabs the meta data it stores it in a cache db so the next time you load the list it's much faster as it doesn't have to do any web calls
You need the meta data as you build each list item, so the process has to wait for it... ie. you can't show the list if you don't have the pieces to create it yet
Give it a try and test the speeds, on decent machines it would process 25 shows in just a couple seconds, there is a dependency on the response time from the scraper sites though
Posts: 14
Joined: Dec 2014
Reputation:
0
I'm trying to get decent speeds on a Raspberry Pi so I think I need to find a better friendly solution to grab meta data in the background.
I tried your meta data but bump to some problems/questions:
- get_matching_shows from a TheTVDB instance doesn't use the tvdb configured language. I've fixed it in my fork.
- How can I pass unicode show names to the get_meta function? I got the famous UnicodeDecodeError exception. After encoding the show name to utf-8 grabbing data works, BUT the unicode/utf? charcters in the show names aren't stored in the database. Tips? I'll wait for your answer before going deeper in your code.
Posts: 646
Joined: May 2009
Reputation:
30
I believe the current language option was only built for TMDB, but would gladly accept any changes that applies it to TVDB as well
You need to encode the name as you have done, the database stores them stripped of any special characters as I found it too difficult to handle, what is stored in the DB shouldn't affect you though as what you send in for the Title will be what's sent back to you, the title in the DB is only used to check for existing cache entries, I found this the simplest solution for more consistent matching
Not sure how you will be able to grab meta data in the background, unless you do something like build the list first, display, once meta data is retrieved re-build the list... but seems to be a waste to do this way
Also remember once it's cached, the response time is much faster