Issues around language and search
Reported by RDV | March 22nd, 2009 @ 07:08 AM
Thanks for adding episode data selection by language it works great! While testing I found out that the despite setting a language code for Tvdb, series searches still expect english series names. I suspect but did not test if episode name searches have the same issue. Is there any chance that multi-language support can be extended to searches? Here is an example: http://thetvdb.com/index.php?tab... Series name search "Tình Người Hiện Đại" fails but "Virtues Of Harmony II" works. Of course a search by SID also works.
Comments and changes to this ticket
-
dbr/Ben March 22nd, 2009 @ 01:10 PM
- → Tag changed from to bug tvdb_api
- → State changed from new to open
Hm, this is probably a unicode problem..
When it searches for "Tình Người Hiện Đại", the URL tvdb_api grabs is..
h_ttp://www.thetvdb.com/api/GetSeries.php?seriesname=t%C3%ACnh%20ng%C6%B0%E1%BB%9Di%20hi%E1%BB%87n%20%C4%90%E1%BA%A1i
..which returns nothing - I think it might be urllib.quote()'s fault, as searching for the show on thetvdb's site works, but escapes the unicode characters differently..
-

RDV April 17th, 2009 @ 03:37 AM
- → Title changed from Issues around language and search to SOLVED - Issues around language and search
Ben, Here is a patch that allows series searches to be language specific.
332c332 < self.config['url_getSeries'] = "%(base_url)s/api/GetSeries.php?seriesname=%%s" % self.config --- > self.config['url_getSeries'] = "%(base_url)s/api/GetSeries.php?seriesname=%%s&language=%%s" % self.config 430,431c430,431 < series = urllib.quote(series) < seriesEt = self._getetsrc(self.config['url_getSeries'] % (series)) --- > series = urllib.quote(series.encode("utf-8")) > seriesEt = self._getetsrc(self.config['url_getSeries'] % (series, self.config['language'])) -
dbr/Ben April 17th, 2009 @ 10:23 AM
- → State changed from open to resolved
- → Title changed from SOLVED - Issues around language and search to Issues around language and search
-
dbr/Ben April 17th, 2009 @ 10:25 AM
Commited as 0ae110764392a116d6a1e5117fd23f30454dff93, with a slight change - since config['language'] doesn't change after
__init__, you can simply do%(language)s(as is done with base_url in the same string). Should be functionally identical, just slightly tidier.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
