View Single Post
Old 07-23-2014, 08:50 AM   #7
DaltonST
Deviser
DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.
 
DaltonST's Avatar
 
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
Now nothing is updated, or perhaps a null was updated. mi.set_user_metadata('#genre', custcol) at least updates the unicode literal, as undesirable as that may be. This is the exact code as of this moment:

for book, genre in book_new_genre_final.items(): #dictionary utf-8
mi = Metadata(_('Unknown'))
u_book = book #still in utf8
u_genre = genre #still in utf8
n_book = int(u_book)
if u_book > 0 and u_genre > ' ':
custcol = custom_columns['#genre']
custcol['#value#'] = u_genre
mi.set('#genre', [u_genre])
# mi.set_user_metadata('#genre', custcol)
books_updated.append(n_book)
id_map[n_book] = mi
payload = books_updated
edit_metadata_action = self.gui.iactions['Edit Metadata']
edit_metadata_action.apply_metadata_changes(id_map , callback=self._finish_displaying_results(payload))
else:
xxxxxxxx

Last edited by DaltonST; 07-23-2014 at 08:57 AM.
DaltonST is offline   Reply With Quote