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 06-17-2018, 11:31 AM   #1
dnjmama
Junior Member
dnjmama began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2012
Device: nook
Main viewer showing inaccurate "Formats" Info

NOTE: If I have posted in the wrong location, I apologize--please educate me on the correct location and I will comply.

PROBLEM DESCRIPTION
The main viewer in calibre is showing inaccurate information in the "Formats" column. Specifically, I am seeing EPUB as format when there is no such format available for a given book. Moreover, when there are 2 or more formats for a given book, only "EPUB" shows, even when Mobi and PDF are the only 2 actual file formats in the calibre library for the book (e.g there is no EPUB version of the book).

I am running 3.26.1 calibre on a Win 10 system, and I do NOT have calibre set to do any "automatic adding"--all boxes in that tab under "control the adding of books" under "Add Books" are empty.

EXAMPLE
I use the "Add Books" button to "add books from a single directory", specifically, a PDF format book, such as this one, that i downloaded to my PC:
https://manual.calibre-ebook.com/calibre.pdf

The book itself is added to calibre correctly from the download loaction (e.g. When I view the book, the PDF viewer opens the book and the book is fine).

HOWEVER, the calibre main viewer shows the format as being EPUB--this is incorrect (I opened the path and there is only one file for the book, and that has a PDF extension). Moreover, for books where I have two formats, only one format shows in the main view, and it is EPUB for everything. I know it used to show all formats for the book and accurately--I do not know exactly when this changed.

MORE DETAILS:
In the small book details below the main viewer, the format shows as PDF(e.g. the correct format). When I click on the book to see the expanded detail screen, there are two lines called "Formats:" on the screen:

The first one appears below "Authors:" and shows the correct format (in this case, PDF), the second one appears below "Size:" shows the incorrect format (in this case, EPUB).

WHAT I TRIED
Since ALL books were showing EPUB format, even when no EPUB version existed, I thought my library might be sick, so used the library maintenance feature to restore the entire library. This changed nothing.

I was running calibre version 3.something(sorry, didn't note it), so I upgraded to the most recent version, rebooted windows, added a book per the above example. This changed nothing.

I tried converting the book to create an EPUB version to see if that would force a second format to show in the main viewer. This changed nothing, except that in the book details the "Format:" field correctly showed two formats, PDF and EPUB.

IN CASE IT HELPS:
When I convert, I generally convert to EPUB, so my default output in conversion is EPUB...I wonder if somehow the main view is somehow showing that instead of accurate data from the book? Just a thought...

MANY THANKS for any help on this.
dnjmama is offline   Reply With Quote
Old 06-17-2018, 12:15 PM   #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: 43,872
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If you have two formats lines, it means you have created a custom formats column. Delete it and you will be fine. Preferences->add your own columns
kovidgoyal is offline   Reply With Quote
Advert
Old 06-17-2018, 02:30 PM   #3
dnjmama
Junior Member
dnjmama began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2012
Device: nook
Thank you for responding. The column was custom, but I used calibre to populate it--I did not manually fill in data, so something lurking somewhere un-did that population and did not let new books data populate the field correctly.

FYI: I deleted the column, then added it again (restarting calibre as needed).
NOW newly added books populate with the correct book format (PDF from earlier example) and all books are showing corrected.

Just letting you know something is un-doing the calibre population of the field, and restore does not correct it, but I am a happy camper to have things working again!

Thank You for your help. I did not remember the field as , else I would have mentioned it. Sorry for that.
dnjmama is offline   Reply With Quote
Old 06-17-2018, 06:01 PM   #4
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,590
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@Kovid - a long time ago something like this happened to me, i.e. the custom column somehow lost touch with reality, no idea why. I fixed it by deleting and recreating the custom column.

FWIW: when I recreated the column I used "#bookfiles/Book Files" as the Lookup and Header names to avoid having two "Formats" columns in Book Details.

BR
BetterRed is offline   Reply With Quote
Old 06-17-2018, 10:10 PM   #5
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,872
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
What template do you use for the formats column? The default templates for that column, either {formats} or {'approximate_formats()'} can only get out of sync witht he data if calibre itself is out of sync with the data, which should be reflected in the builtin formats field as well. And re-creating a template based column should not make any difference since template values are re-calculated on every use. But there could be some subtlety of the template system caching I am missing, chaley might know.
kovidgoyal is offline   Reply With Quote
Advert
Old 06-17-2018, 11:35 PM   #6
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,590
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Currently it's {'approximate_formats'}. IIRC chaley introduced that function because the {formats} function is/was slow, my problem may have occurred before he did that. It was in my early days of using calibre, perhaps when I was still adding the initial 30+K 'books'. Because it was easily fixed, and hasn't recurred since I assumed it must have been something I did.

@chaley - if you happen to see this, and you're looking at the approximate_formats code, could you put a space after the commas, i.e. so we get DOCX, EPUB, ONE rather than DOCX,EPUB,ONE. IMO it's not a worthy of a bug report

BR
BetterRed is offline   Reply With Quote
Old 06-18-2018, 05:24 AM   #7
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,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by BetterRed View Post
@chaley - if you happen to see this, and you're looking at the approximate_formats code, could you put a space after the commas, i.e. so we get DOCX, EPUB, ONE rather than DOCX,EPUB,ONE. IMO it's not a worthy of a bug report

BR
The function approximate_formats() returns a comma-separated list that is often further used in other list functions. I am unwilling to change the separator because I don't know what I will break. However, you can easily add that space yourself with
Code:
{:'re(approximate_formats(), ',', ', ')'}
chaley is offline   Reply With Quote
Old 06-18-2018, 05:30 AM   #8
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,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by kovidgoyal View Post
But there could be some subtlety of the template system caching I am missing, chaley might know.
I know of no reason why a template wouldn't be recalculated on use. One subtlety is that on the GUI a book line is calculated once when it is displayed. It is not calculated again until line is removed then redisplayed, the book list is regenerated (sort, search, etc), or if the book itself is "refreshed" because of metadata editing.
chaley is offline   Reply With Quote
Old 06-18-2018, 05:56 AM   #9
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,590
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by chaley View Post
However, you can easily add that space yourself with
Code:
{:'re(approximate_formats(), ',', ', ')'}
Aaah, that's better. Clearly it never bothered me much, otherwise I would have thought about reformatting it. Thanks.

I can't recall much about the circumstances when the original custom column went awry, but the symptoms were similar to dnjmama's. Pretty sure it was pre version 1.0. I suspect I would have removed the column, rebuilt the database, ran check library and corrected any anomalies, and then reinstated the custom column as "#bookfiles/Book Files".

I also recall changing the template from {'formats'} to {'approximate-formats'}, but that was at a later date.

Added:
Quote:
Originally Posted by chaley View Post
One subtlety is that on the GUI a book line is calculated once when it is displayed. It is not calculated again until line is removed then redisplayed, the book list is regenerated (sort, search, etc), or if the book itself is "refreshed" because of metadata editing.
FTR : if you delete formats via Book Details context menu or Alt+Del the book line is refreshed.

BR

Last edited by BetterRed; 06-18-2018 at 06:41 AM.
BetterRed is offline   Reply With Quote
Reply

Tags
format, main viewer


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help quick - Calibre not showing checkmark and "Main" next to all books loaded? NuMystic Barnes & Noble NOOK 0 05-17-2014 08:54 AM
"Send to Main Memory" greyed out after "Connect to folder" myce Calibre 16 01-15-2014 04:03 PM
Recipes for "Dnevnik" and "+info" dasp Recipes 3 01-23-2012 06:22 AM
Convert "Section Menu" in "Main Menu" zeener Recipes 2 11-23-2010 10:33 AM


All times are GMT -4. The time now is 02:17 AM.


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