Fix for Publisher and Language metadata for Anthologies.

This commit is contained in:
Jim Miller
2016-08-14 11:22:32 -05:00
parent 2e6a1ef65d
commit 1887cf2cb9
+5 -2
View File
@@ -1891,7 +1891,8 @@ class FanFicFarePlugin(InterfaceAction):
#print("mi.tags:%s"%mi.tags)
if book['all_metadata']['langcode']:
mi.languages=[book['all_metadata']['langcode']]
# split due to anthologies. Gives list of one for non-anth.
mi.languages=book['all_metadata']['langcode'].split(', ')
else:
# Set language english, but only if not already set.
if not oldmi.languages:
@@ -2410,7 +2411,9 @@ class FanFicFarePlugin(InterfaceAction):
#print("book series:%s"%serieslist[-1])
if b['publisher']:
if 'publisher' not in book:
if not book['publisher']:
## not set in all_metadata because it's not one of
## the permitted metadata--use site instead.
book['publisher']=b['publisher']
elif book['publisher']!=b['publisher']:
book['publisher']=None # if any are different, don't use.