current_library_name shows previous library after switching

Bug #1011674 reported by Rui Hanazawa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Charles Haley

Bug Description

I have a custom column "#sendtopath" with either of the two values:

{:'current_library_name()'}/{publisher:||/}{tags:sublist(0,1,\,)||/}{authors:sublist(0,1,&)}/{series:||/}{series_index:0>4.1f|[|] }{title}

{:'current_library_name()'}/{authors:sublist(0,1,&)}/{series:||/}{series_index:0>4.1f|[|] }{title}

This way, I can have the Sending books to devices > Save template set to {#sendtopath} and I don't have to keep changing the preferences when I switch libraries.

The current library name is displayed correctly when starting Calibre. However, it displays the previous library name instead of the current library name after switching libraries. I have to restart Calibre for it to display the correct library name.

I've also tried creating a template function devicePath which calls current_library_name and basically does the same thing as the two templates above and used that function for the #sendtopath column but it gave me the same issue.

This is with calibre 0.8.54 tested on both 32-bit Windows XP and 7. I haven't tried 0.8.55 yet. I'm currently on cellular data so download's gonna take a while. However, I checked the changelog and I don't think any changes were made to the current_library_name function so I'm guessing behavior on 0.8.55 would be the same as 0.8.54.

Thanks!

Related branches

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1011674

Changing the component for this bug.

 assignee cbhaley
 status triaged

Changed in calibre:
assignee: nobody → Charles Haley (cbhaley)
status: New → Triaged
Revision history for this message
Charles Haley (cbhaley) wrote :

Fix submitted.

Workaround, at least for the value displayed in a custom column: select two or more books, press E for edit metadata (bulk), then press OK without changing anything.

Changed in calibre:
status: Triaged → Fix Committed
Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in lp:calibre

Fixed in branch lp:calibre. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Kovid Goyal (kovid)
Changed in calibre:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.