View Single Post
Old 10-05-2018, 01:51 PM   #429
FlyGoneCrazy
Member
FlyGoneCrazy began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Apr 2008
Device: Kindle Oasis
Hey!

first of all pardon me for late replay.

Quote:
Originally Posted by davidfor View Post
if you make changes you think others will be interested in, post the change here and we can discuss including it.
Change #1 in 'worker.py':

lm = {
'eng': ('English', 'Englisch'),
'fra': ('French', 'Français'),
'ita': ('Italian', 'Italiano'),
'dut': ('Dutch',),
'deu': ('German', 'Deutsch'),
'spa': ('Spanish', 'Espa\xf1ol', 'Espaniol'),
'jpn': ('Japanese', u'日本語'),
'por': ('Portuguese', 'Português'),
'lt': ('Lithuanian',),
}

It simply recognizes and adds Lithuanian language to calibre. In case other users need other languages, this array should be expanded.

Change #2 in 'worker.py':

Instead of:

self.plugin.clean_downloaded_metadata(mi)

Use following:

if mi.language != 'lt':
self.plugin.clean_downloaded_metadata(mi)

As you've mentioned, maybe it would make sense to make it more generic, e.g. a possibility to select languages (or exceptions) in settings of the plugin.
FlyGoneCrazy is offline   Reply With Quote