Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 03-09-2021, 05:20 AM   #1
mr_abomination
Junior Member
mr_abomination began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2020
Device: Kobo aura
[Kobo] Author plugboard gets overwritten on subsequent metadata syncs

To try and better explain the title, here is my situation:

I have a Kobo Aura (the original one) which splits multiple authors by the comma ',' delimiter. Calibre on the other hand splits authors by the ampersand '&' delimiter.

So what I did was add a simple metadata plugboard as follows:
Code:
epub:KOBOTOUCHEXTENDED = ([{authors:'re($, ' & ', ', ')'}] -> authors)
which replaces any '&' with ',' easily enough.

Everything works when I initially transfer the book, authors are separated. However, when I plug my kobo back in a second time to sync series data, the author tag gets set back to the version with the & and breaks everything again.

I'm not sure why this is happening, but it happens every time. I would like some help fixing it.

I am currently using KoboTouchExtended as my interface and I also have Kobo Utilities installed, however the problem showed up prior to having KU as well.

Calibre Version 5.12
mr_abomination is offline   Reply With Quote
Old 03-09-2021, 07:57 AM   #2
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Firstly, unless you are using the metadata update function of the Kobo Utilities plugin, it is not involved here. And if you are using that function, check the options when you do the update.

The KoboTouch and KoboTouchExtended driver can both update the metadata on the device when you connect it. This can be turned off if you want. But, it does this using the plugboard. You should get the same results when the book is sent and when the device is connected the next time.

To see what is happening, I need to see a debug log. Firstly, go into the driver configuration and on the third tab, in the "Title to test when debugging" field, put the title of a book on the device that is showing the problem. Then, restart calibre in debug mode (from the preferences menu) and then connect the device. When the connection jobs finish, close calibre and the debug log will be displayed. Post the full log, or upload it somewhere and PM me the link. Hopefully I'll be able to see the problem.
davidfor is offline   Reply With Quote
Old 03-10-2021, 03:49 AM   #3
mr_abomination
Junior Member
mr_abomination began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2020
Device: Kobo aura
I've attached my log file as a zip as the uncompressed version was too large.

The book I used to test was The Gathering Storm by Robert Jordan and Brandon Sanderson.

Here is the book after the initial sync

and here is after the second sync for metadata

Notice how the ampersand replaces the comma in the second.
Attached Files
File Type: zip tmp2xn827yg.zip (88.7 KB, 101 views)
mr_abomination is offline   Reply With Quote
Old 03-10-2021, 08:20 AM   #4
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Looking at the logs, the issue is related to epub and kepub.

The log shows two metadata plugboards:

Code:
Device using plugboard epub KOBOTOUCHEXTENDED [["{authors:'re($, ' & ', ', ')'}", 'authors']]
Device using plugboard kepub KOBOTOUCHEXTENDED [["{title}{#endvol:'test($, strcat(' [', re(field('series_index'), '\\.?0*$', ''), ' - ', re($, '\\.?0*$', ''), ']'), '')'}", 'title']]
The first is for epubs and has the authors being set. The first is for kepubs and does not set the author. When it is used, the authors will be set to whatever is in the library.

Your problem is caused by how the KoboTouchExtended driver works. When you send an epub to the device, calibre sees it as an epub and applies the epub metadata plugboard. The KoboTouchExtended driver does the transformation to kepub after this.

When the device is connected again, the driver sees kepubs. It doesn't know whether book was an epub or a kepub when it was sent to the device. When it updates the metadata, the metadata plugboard used is the kepub metadata plugboard. And your kepub metadata plugboard does not set the author, so it becomes the value that is in the library.

There is an exception to this. When I coded the metadata update, I knew about this. If the book on the device is a kepub, it will look for a kepub plugboard. But, if there is none, it will look for an epub plugboard.

What you can do is one of:
  • Add the author code to the kepub plugboard.
  • Remove the kepub plugboard. And decide if you want the title setting code on the epubs.
  • Use an "any_format" plugboard. That will be used with all formats both when sending the book and updating the metadata. Again, you need to device what to do about the title.
davidfor is offline   Reply With Quote
Old 03-10-2021, 05:36 PM   #5
mr_abomination
Junior Member
mr_abomination began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2020
Device: Kobo aura
How funny, I specifically got KoboTouchExtended for the keypub conversion, didn't even consider that it wouldn't be a epub anymore.

Sure enough, that was the problem. I changed the plugboard to any format while keeping it on KoboTouchExtended. Though interestingly enough I don't see the option for a specific keypub keyboard. The second plugboard is set for any format and is used for adding details for omnibuses.

Thanks for your help and for developing kobo utilities.
mr_abomination is offline   Reply With Quote
Old 03-10-2021, 07:13 PM   #6
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
To have the kepub specific plugboard, you probably need to have the Kepub Metadata Writer plugin installed. But, it isn't really needed unless you are keeping kepubs in the library. You might have had it installed in the past and have removed it for some reason. Or it didn't update when you moved to calibre v5.
davidfor is offline   Reply With Quote
Reply

Tags
help calbire, kobo, plugboard


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Metadata plugboard not sending to kobo Aura 2 Justy Calibre 3 04-22-2018 06:35 PM
Metadata Plugboard Plugin and Kobo darryl Plugins 14 04-25-2015 10:18 AM
Need Help with PW2 Metadata Plugboard and author sort PLUS series name drakebelisarius Amazon Kindle 3 02-26-2014 07:12 PM
metadata plugboard not doing anything on kobo touch SonjaD Library Management 2 07-13-2013 11:10 AM
Metadata tag dc:title overwritten on transfer to Kobo Touch Npnth Devices 3 08-31-2012 12:38 PM


All times are GMT -4. The time now is 11:24 AM.


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