@alvaro wrote:
Hi,
For those interested in getting the movie or series information (mainly the title, the score and the number of votes) from imdb or tvdb in a language different than english, I've found where to modify the python code to make it possible. I am not good at python programming, but it would be great that those plugins could be configured to get the information in a desired language (so you can correctly parse a rss input for spanish movies or series, for instance, and then match it with your trakt.tv lists).
The problem with this modification is that you have to re-modify the files when you upgrade flexget. But it is a solution that some of you may find interesting while the plugins become more versatile.
These are the files to modify and where to make the modifications to get the information in spanish (changes are marked in bold)
imdb.py >>> sudo nano /usr/local/lib/python2.7/dist-packages/flexget/utils/imdb.py
Line 25:
requests.headers.update({'Accept-Language': 'es-ES,es;q=0.8'})
Line 314:
self.votes = str_to_int(votes_elem.text.replace('.', ','))
Line 320:
self.score = float(score_elem.text.replace(',', '.'))api_tvdb.py >>> sudo nano /usr/local/lib/python2.7/dist-packages/flexget/plugins/internal/api_tvdb.py
Line 61:
language = params.pop('language', 'es')
Line 178:
self.language = language or 'es'tvdb_lookup.py >>> sudo nano /usr/local/lib/python2.7/dist-packages/flexget/api/plugins/tvdb_lookup.py
Line 91:
base_parser.add_argument('language', default='es', help='Language abbreviation string for different language support')thetvdb_lookup.py >>> sudo nano /usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/thetvdb_lookup.py
Line 106:
'language': {'type': 'string', 'default': 'es'}
Line 169:
language = config['language'] if not isinstance(config, bool) else 'es'Some of the changes may be unnecessary but it works. If this could be made by plugin settings, it would not be necessary to change manually those files any time flexget is upgraded. I would be really grateful that it could be implemented as a new feature request. Could that be possible?
Thanks!
Posts: 3
Participants: 2