Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-16-2018, 08:22 AM   #1
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 907
Karma: 1803094
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2, Nxtpaper 11
Metadata plugboards question

I'm using metadata plugboards to adjust the title field.
Currently I have 1 definition:
anyformat:any device = <some template> -> title

For a particular device, say KOBO, I want to make a different definition:
anyformat:KOBO = <some other template> -> title

Both definitions are saved, but "anyformat:any device" is always the first one and during saving I get a message that there is already some existing definition. This is possible due to the fact of "any device" in the existing definition.

What I want to do is to have 1 definition for, say, KOBO, and 1 definition for any other device.

My question: What is the order in which the definitions are applied? Will the KOBO definition ever be used/found as the very first definition found for "any device" applies already for any possible device including KOBO?

How to accomplish this?
DrChiper is offline   Reply With Quote
Old 01-16-2018, 09:59 AM   #2
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Ups.

My work around was to setup each device separate as there is no "any device except defined ones".

Maybe it's worth for a enhancement request to Kovid
Divingduck is offline   Reply With Quote
Advert
Old 01-16-2018, 10:13 AM   #3
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 907
Karma: 1803094
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2, Nxtpaper 11
I have currently solved it by adding definitions for "anyformat" plus explicitly mentioning each device I have.

It would have been nice to define 1 definition for "everything" and then just add all the exceptions (can be just a few) you need.
DrChiper is offline   Reply With Quote
Old 01-16-2018, 10:43 AM   #4
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: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
This isn't my code, but IIRC any individual device definitions should take priority over anydevice.
kovidgoyal is offline   Reply With Quote
Old 01-16-2018, 10:51 AM   #5
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 907
Karma: 1803094
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2, Nxtpaper 11
I tested it, but unfortunately, "any device" takes priority.
DrChiper is offline   Reply With Quote
Advert
Old 01-16-2018, 11:01 AM   #6
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 907
Karma: 1803094
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2, Nxtpaper 11
There is also a strange behavior: the new definitions seem to disappear after closing calibre. I investigate.
DrChiper is offline   Reply With Quote
Old 01-16-2018, 11:39 AM   #7
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 907
Karma: 1803094
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2, Nxtpaper 11
Ok, this is what happened:
I made new definitions (save, apply) and tested them. They worked. I did closed calibre. On reopening calibre and reusing the definitions they did not seem to work anymore.
I checked the new definitions, but on reopening the Metadata plugboards editing window, I discovered that somehow those new definitions all disappeared and my original single definition "anyformat:any device" reappeared, but not with its original template, but with a template of one of the new definitions.

I tried to recreate the problem by defining the new definitions again from scratch, but no luck so far.
Go figure.
DrChiper is offline   Reply With Quote
Old 01-16-2018, 10:33 PM   #8
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: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by DrChiper View Post
I tested it, but unfortunately, "any device" takes priority.
Open a bug report about it, should be easy to fix.
kovidgoyal is offline   Reply With Quote
Old 01-17-2018, 03:25 AM   #9
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 907
Karma: 1803094
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2, Nxtpaper 11
Priority bug submitted https://bugs.launchpad.net/calibre/+bug/1743716

For the case of the disappearing definition I did not submit a bug, as it is not reproduceable at the moment. It still can be a handling mistake on my account, but it is still odd that the template part of the missing definition was present in the reappearing original definition.
DrChiper is offline   Reply With Quote
Old 01-17-2018, 06:46 AM   #10
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 907
Karma: 1803094
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2, Nxtpaper 11
Mystery solved:

There is 1 metadata plugboards PER library!

I have several libraries, hence each one seem to have its own, different definition in its according metadata plugboards.
Not at all what you might expect, but there is some logic to it.

So what probably happened was that I created a definition in a library, switched to another library and uploaded ebooks, which failed to comply to the intended definition (because it was not defined in THIS current library), then switched to another library, only to find that all my definitions had disappeared (as no definitions where made for THIS current library).

The only thing I still do not get is why calibre complains that a definition is already in place + whether I still want to save it?
DrChiper is offline   Reply With Quote
Old 01-17-2018, 07:36 AM   #11
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 907
Karma: 1803094
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2, Nxtpaper 11
But ...
Now having the correct definitions in place, still the "any device" takes priority over the "KOBO" device definition. So the priority solving "seems" to be:
1) any format, any device
2) any format, specific device
3) specific format, any device
4) specific format, specific device



I get it only to work by removing the "any device" definition.
DrChiper is offline   Reply With Quote
Old 01-17-2018, 08:50 AM   #12
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by DrChiper View Post
But ...
Now having the correct definitions in place, still the "any device" takes priority over the "KOBO" device definition. So the priority solving "seems" to be:
1) any format, any device
2) any format, specific device
3) specific format, any device
4) specific format, specific device



I get it only to work by removing the "any device" definition.
As I said in the bug report, the priority is
  1. specific format, specific device
  2. specific format, any device
  3. any format, specific device
  4. any format, any device
I suggest that you run calibre in debug mode so you can see which format and device names are being used, and which plugboard is selected.

It would also be helpful if you posted your plugboard definitions. You can get these in Preferences / Plugboards by selecting the lines (one by one), copying the line, then pasting the line in a post.
chaley is offline   Reply With Quote
Old 01-17-2018, 10:46 AM   #13
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 907
Karma: 1803094
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2, Nxtpaper 11
It is solved:
My kobo device uses a kobotouch driver, while I made a definition for "kobo", and the plugboard expected "kobotouch", so it defaulted to "any device".

The debug log does not mentioned it, but is was obvious from the used template definition.

So in the end I was to blame
DrChiper is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Metadata Plugboards - Question about title sort lealla Kobo Reader 6 08-27-2017 08:06 AM
Metadata plugboards and PDF issue on K5 pookakitten Library Management 0 09-25-2012 04:10 AM
Plugboards help & Updating metadata from device to Library femgeek Library Management 6 07-26-2012 02:05 AM
emailing books and 'On Device' / series / metadata plugboards affa Library Management 10 06-18-2012 12:45 AM
Metadata Plugboards and send to Storage Card A ejacevich Devices 0 05-25-2011 11:10 AM


All times are GMT -4. The time now is 12:29 PM.


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