08-16-2010, 03:26 PM | #1 |
Guru
Posts: 699
Karma: 1001556
Join Date: Jul 2008
Location: Texas
Device: Oasis 3, K4B(NT), K3/KK
|
Is it possible to exclude tags/titles in the default view?
By that I mean, whenever you launch Calibre, have titles with certain tags be NOT listed by default instead of having everything listed.
I'm trying to decide about managing all titles in one library versus having a second library. Let's say I have some files that I don't necessarily want people I may share my library with to see. Maybe it's personal files, maybe fanfiction or whatever that I've tagged. Is there a way to have Calibre launch and not show this files by default? |
08-16-2010, 03:36 PM | #2 |
Grand Sorcerer
Posts: 11,942
Karma: 7219261
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
You can do it in two clicks using a restriction. Click the restrictions combo box, select the saved search you want to use.
Unfortunately, it isn't currently possible to have a restriction automatically applied at start up. |
Advert | |
|
08-16-2010, 03:40 PM | #3 |
Guru
Posts: 699
Karma: 1001556
Join Date: Jul 2008
Location: Texas
Device: Oasis 3, K4B(NT), K3/KK
|
Yeah, I have several saved searches around but thought it would be cool to have those applied at start up. Thanks...I may have to play around with a 2nd library then.
|
08-16-2010, 03:41 PM | #4 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
|
|
08-16-2010, 03:46 PM | #5 |
Guru
Posts: 699
Karma: 1001556
Join Date: Jul 2008
Location: Texas
Device: Oasis 3, K4B(NT), K3/KK
|
|
Advert | |
|
08-16-2010, 05:55 PM | #6 |
Grand Sorcerer
Posts: 11,942
Karma: 7219261
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
I am adding a tweak that will specify the name of a saved search to apply at calibre startup and when libraries are changed.
In the process, I will fix problems with changing libraries when a restriction is in force (strange behavior of counts and displays). Adding the tweak while fixing these bugs is straightforward. Once I have it all coded (tomorrow), I will submit the change to Kovid for approval. |
08-16-2010, 06:15 PM | #7 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
08-16-2010, 06:55 PM | #8 | |
Guru
Posts: 699
Karma: 1001556
Join Date: Jul 2008
Location: Texas
Device: Oasis 3, K4B(NT), K3/KK
|
Quote:
|
|
08-17-2010, 08:41 AM | #9 | |
Grand Sorcerer
Posts: 11,942
Karma: 7219261
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
calibre-server --restriction=some_saved_search Restrictions are ignored if running from the GUI. Code submitted to Kovid. |
|
08-17-2010, 08:44 AM | #10 |
Grand Sorcerer
Posts: 11,942
Karma: 7219261
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
The fixes and tweak code have been submitted to Kovid.
Assuming approval, the tweak is: Code:
# Specify a restriction to apply when calibre starts or when change library is # used. Provide the name of a saved search. It is ignored if the saved search # does not exist in the library being opened. The value '' means no restriction. restrict_at_startup = '' |
08-17-2010, 09:06 AM | #11 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
08-17-2010, 09:55 AM | #12 |
Grand Sorcerer
Posts: 11,942
Karma: 7219261
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Surprisingly enough, it just works, at least on Win7. I am surprised because I thought that the content server would have the DB open and locked.
My experiment: 0. Calibre and library both on C:. No dropbox or other synchronizer. 1. Start calibre. add 'abook' to a custom column. One book has that value 2. Quit calibre. 3. Start content server with restriction 'abook'. I see one book. 4. Start calibre. No lock errors. 5. Refresh content server page. No lock errors. Still one book. 6. Add 'abook' to a second book in calibre. 7. Refresh content server. Now I see two books. 8. Added a new book with the abook tag. Now I see three books in the content server. 9. Deleted the new book. Now I see two books in the content server. I assume from the experiment that at least on Win7, SQLite does not set locks, which allows calibre and the content server to share the library. This is safe, because the content server does not change the DB. |
08-17-2010, 10:37 AM | #13 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
08-17-2010, 11:08 AM | #14 |
Grand Sorcerer
Posts: 11,942
Karma: 7219261
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
The fact that it worked bothered me. I know that calibre caches book data in memory. The cache should prevent the content server from seeing database changes, but it clearly does see them. After some poking around, I found that if the content server is running separately from the GUI, then it checks the modification time of the DB on each web request. If the DB has been changed, the content server refreshes its in-memory caches before processing the request.
Clearly Kovid anticipated running the content server on a DB that can change. It is nice knowing that something works by design instead of by accident. |
08-17-2010, 11:55 AM | #15 |
creator of calibre
Posts: 44,353
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I didn't actually anticipate it, someone complained and so I added the check
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Sony eReader] Create collection from Book Series, exclude tags | Craysh | Calibre | 2 | 06-23-2010 09:21 AM |
Possible to have default view as code view? | sherman | Sigil | 5 | 06-15-2010 01:47 AM |
Default sorting view | thafrogggg | Calibre | 10 | 05-24-2010 03:46 PM |
Exclude files from indexing? | HansTWN | iRex | 8 | 04-20-2010 05:02 AM |
Default view format | jedavis1 | Calibre | 3 | 09-02-2009 06:00 PM |