Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 06-04-2014, 04:59 AM   #1
Ramblurr
Member
Ramblurr began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Apr 2010
Device: Kindle
Avoiding metadata identify results merge

My metadata source plugin is creating identical results that differ only on the publisher field (so title, authors, id, are the same). But the ISBNMerge algorithm in identify.py is merging them all into one result with only the first publisher added getting chosen.

Can I affect this algorithm somehow? Is there some hijinx I can play with my Metadata object to get this algorithm not to perform the merge? It seems changing the title, author, or identifiers field would work, but, naturally, I want these to remain the same, correct, values.

This is because the webservice I'm writing a metadata source plugin for unfortunately conflates the various publishers for all editions of an item.

Example:
See this entry: http://rpggeek.com/rpgitem/44383/trail-of-cthulhu (XML)

The primary publisher is Pelgrane Press, and the two other publishers are responsible for other language translations.

In my metadata source plugin I'm adding three results, one for each publisher. The idea is the user can choose which publisher matches the version they have.

Any advice?
Ramblurr is offline   Reply With Quote
Old 06-05-2014, 01:10 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 33,619
Karma: 10209576
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No there's no way a plugin can influence that algorithm. That algorthm exists so that a user with a lot of plugins enabled is not overwhelmed by lots of very similar results. Generally speaking, the metadata download process is not really conducive to allowing a user to pick and choose between slighlty differing individual results as that would be a mess for the most common use cases.

If you really want to allow users to choose individual publishers and the like, your best bet is to to create a user interface plugin that bypasses the normal metadata download process altogether and has its own UI for browsing results. The downside to this approach is that your plugin will not be useable from the edit metadata dialog.
kovidgoyal is offline   Reply With Quote
Reply

Tags
metadata, plugin development

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bulk metadata download and merge tags and select larger cover(s) hiperlink Calibre 2 03-26-2014 04:58 AM
Download metadata merge result ? abuck Library Management 1 10-11-2013 09:49 AM
Merge books with Edit Metadata bulk option? Nialls Calibre 1 02-07-2013 12:35 PM
Merge Formats library into Metadata library? Or, Add Format in bulk? Sabardeyn Library Management 5 01-23-2013 07:00 AM
Merge metadata from other lib drMerry Library Management 6 05-04-2011 07:41 PM


All times are GMT -4. The time now is 04:15 AM.


MobileRead.com is a privately owned, operated and funded community.