|  09-21-2011, 12:44 PM | #1 | 
| hopeless n00b            Posts: 5,126 Karma: 19597086 Join Date: Jan 2009 Location: in the middle of nowhere Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9 | 
				
				calibre-server --restriction
			 
			
			Help, please! Couldn't quite figure out the syntax for the --restriction option in calibre-server command line. I've tried all of the following and I get the same WARNING: Content server: search restriction does not exist message: --restriction *formats:"=MOBI" --restriction formats:"=MOBI" --restriction format:"=MOBI" --restriction "formats:=MOBI" --restriction "format:=MOBI" --restriction formats:mobi --restriction format:mobi --restriction="formats:mobi" --restriction="format:mobi" Help? | 
|   |   | 
|  09-21-2011, 12:50 PM | #2 | 
| Grand Sorcerer            Posts: 12,525 Karma: 8065948 Join Date: Jan 2010 Location: Notts, England Device: Kobo Libra 2 | 
			
			The argument to restriction must be an already-existing saved search, not the search query itself.  The easiest way to create a saved search is to use the GUI, but you can also create a saved search with the calibredb saved_searches command | 
|   |   | 
| Advert | |
|  | 
|  09-21-2011, 01:08 PM | #3 | 
| hopeless n00b            Posts: 5,126 Karma: 19597086 Join Date: Jan 2009 Location: in the middle of nowhere Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9 | 
			
			Gotcha. Thanks! Looks like that actually makes my life easier. I can use easier naming for the restrictions (e.g. kindle, stanza, unread, etc). Hmm, is it possible to use more than one saved search at the same time? Thanks again! | 
|   |   | 
|  09-21-2011, 01:13 PM | #4 | |
| Grand Sorcerer            Posts: 12,525 Karma: 8065948 Join Date: Jan 2010 Location: Notts, England Device: Kobo Libra 2 | Quote: 
 If you are talking about the GUI, then "sort of". You can use one saved search as the restriction and another in the search box. | |
|   |   | 
|  09-21-2011, 01:43 PM | #5 | 
| Wizard            Posts: 4,553 Karma: 950151 Join Date: Nov 2008 Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader) | 
			
			The saved search used as a restriction is not limited in complexity so you can apply a compund set of criteria.   Not sure if that was what you were looking for?
		 | 
|   |   | 
| Advert | |
|  | 
|  09-21-2011, 01:56 PM | #6 | ||
| hopeless n00b            Posts: 5,126 Karma: 19597086 Join Date: Jan 2009 Location: in the middle of nowhere Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9 | Quote: 
 Anyway, thanks for the help! By the way, I noticed a bug with calibre-server when using the --url-prefix option. If there's only one item in the Authors, Languages, Publishers and Tags categories, clicking on the links would result in a 404 error due to the duplication of the url-prefix: e.g. Quote: 
 | ||
|   |   | 
|  09-21-2011, 04:21 PM | #7 | |
| creator of calibre            Posts: 45,604 Karma: 28548974 Join Date: Oct 2006 Location: Mumbai, India Device: Various | Quote: 
 | |
|   |   | 
|  09-21-2011, 05:40 PM | #8 | |
| hopeless n00b            Posts: 5,126 Karma: 19597086 Join Date: Jan 2009 Location: in the middle of nowhere Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9 | 
			
			Thanks! Quote: 
  What's the syntax for that? Assuming I have the following saved searches: kindle stanza favorites unread Can I just use the following command-line to launch the content server: Code: calibre-server.exe -p 8081 --max-opds-items 30 --restriction "stanza AND favorites AND unread" calibre-server.exe -p 8082 --max-opds-items 30 --restriction "kindle AND favorites AND unread" | |
|   |   | 
|  09-21-2011, 06:10 PM | #9 | 
| creator of calibre            Posts: 45,604 Karma: 28548974 Join Date: Oct 2006 Location: Mumbai, India Device: Various | 
			
			Save the search kindle and favorites as something and then use that saved search. | 
|   |   | 
|  09-21-2011, 08:03 PM | #10 | 
| hopeless n00b            Posts: 5,126 Karma: 19597086 Join Date: Jan 2009 Location: in the middle of nowhere Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9 | 
			
			So it's exactly as chaley described. I was wondering if I can use multiple saved searches instead of creating a saved search for each combination I might want. No matter, it's a minor inconvenience.
		 | 
|   |   | 
|  | 
| Thread Tools | Search this Thread | 
| 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Calibre Content Server and Windows Home Server 2011 | HughMcC | Calibre | 8 | 10-01-2014 07:26 AM | 
| Calibre-server port not open issue on Fedora server | stueyboy | Devices | 0 | 08-17-2011 04:57 PM | 
| Calibre-server | jlutes | Library Management | 4 | 08-11-2011 04:44 PM | 
| calibre Server | TonytheBookworm | Calibre | 3 | 01-20-2011 05:33 AM | 
| Calibre server | zzmijarevic | Calibre | 10 | 08-21-2010 06:40 AM |