Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-28-2017, 02:29 AM   #1
mtjj
Member
mtjj began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Oct 2017
Device: Android, Windows 10
Content Server on a home network

Long time user of calibre here, up until now I've been able to solve any issues I've had by searching the forum and documentation, but now I'm stumped, so created an account to ask a question :-)

I have a home server that is an Intel NUC running windows, plugged into to the TV. All my main media (ripped DVDs and CDs, etc.) is managed on that, running Emby. I would like to move all my ebooks to it as well, and as most of the media server applications are pretty poor at handling ebooks I'm looking to use calibre.

My objective is to have all the media on the server, and connect to it from mobile devices (mostly android). I can run calibre content server (or wireless connection) and connect devices with no issues, so that bit is fine.

But, I would also like to add new books from the calibre GUI, running on a different PC (my main laptop), *not* from the server. (Because I don't want to have to sit in front of the TV using a cheap wireless keyboard and squinting at the screen ).

I found the following options, but none of them seem great:
- Connect calibre (on my laptop) to the library on the server. This doesn't work if the content server is running, so I would need to remotely log in and terminate the content server, then start it again after quitting the GUI. This would be a pain, particularly if someone else is trying to watch something on the TV at the same time.
- Manage the library on my laptop and sync it to the server. This creates a duplicate library and is not great from a workflow perspective - I'm trying to avoid having lots of sync jobs running across the network.
- Not do any editing on the server at all - get new books and metadata the way I want on a separate calibre instance on the laptop, then upload to the server via the Web interface (and delete from the laptop). This would work OK, but it doesn't seem to be possible to upload books via the web interface?
- Give up on using calibre on the server and try to find another media server program that can handle ebook metadata?
- Something else I'm missing?

I'm thinking someone must have tackled this problem before, it seems a fairly common scenario for anyone with a home media server, so hoping someone will have some advice here! :-)

Many thanks!!
mtjj is offline   Reply With Quote
Old 10-28-2017, 06:38 AM   #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,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Simply manage your calibre library on your personal computer and use rsync to update the library on the server from your personal computer. The script that runs rsync should ssh into the server, stop the calibre-server process and then run rsync and then restart the calibre-server.


And it's on my TODO list to allow the calirbe GUI to conenct to a remote calibre-server instance as a device so you can manage the books on it comfortably.
kovidgoyal is offline   Reply With Quote
Advert
Old 10-28-2017, 09:31 AM   #3
mtjj
Member
mtjj began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Oct 2017
Device: Android, Windows 10
I appreciate the response, but more than that I appreciate the work you've put into calibre over the years! Calibre is a great program and the fact that it doesn't do everything (yet) is perfectly understandable - I'm sure the TODO list is quite long!

However, I do wish there were an easier way, as rsyncing into the sever is not "simple" from where I'm sitting :-) That means I need to:
- work out what service I need to setup on the (windows) server to accept incoming connections.
- set it up and configure it
- work out what I need on the (windows) laptop to run rysnc
- debug the inevitable connection issues caused by my lack of knowledge / mistakes
- work out how to script rsync
- work out how to script starting and stopping remote services
- put it all together
- hope I haven't created a security hole somewhere!
- (put up with having to have a separate full copy of the library on the laptop)

If this is the only way, I will spend tomorrow googling and work out how to do this, but isn't there any alternative? Anyone else tried this?
mtjj is offline   Reply With Quote
Old 10-28-2017, 10:44 AM   #4
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,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If you are running it on windwos server, simply run the main calibre GUI and put it in the system tray. Then when you want to make changes sonncet to the windows computer using rdesktop.
kovidgoyal is offline   Reply With Quote
Old 10-28-2017, 08:23 PM   #5
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
Can the automatic adding be used for this? Have calibre on the server configured to add books from a shared directory. Then maintain the books in a local copy and use save-to-disk to put it in the shared directory.

The problems I can think of are if the server has multiple libraries and updating books. But, I don't use the automatic adding, so there might be another reason not to do it this way.
davidfor is offline   Reply With Quote
Advert
Old 11-01-2017, 09:21 AM   #6
mtjj
Member
mtjj began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Oct 2017
Device: Android, Windows 10
Thumbs up

In the end it seemed the simplest way (for me) was to use the automatic adding. I edit the book on my laptop to get all the metadata correct and push it out to a directory on a network share. Calibre running (GUI, minimized) on the server picks it up and files it correctly into the library.

That's what I like about Calibre, it may not always be super simple, but you can generally get the result you want



(Captcha = "book worm", strangely appropriate!)
mtjj is offline   Reply With Quote
Old 11-03-2017, 04:00 PM   #7
CRussel
(he/him/his)
CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.
 
CRussel's Avatar
 
Posts: 12,160
Karma: 79742714
Join Date: Jul 2010
Location: Sunshine Coast, BC
Device: Oasis (Gen3),Paperwhite (Gen10), Voyage, Paperwhite(orig), Fire HD 8
Restart-myCalibreServer.ps1

I use a simple PowerShell script on my desktop to force a restart of the Calibre-Server process running on my network share. Works well, and I can run it from any one of several desktops/laptops in the house to trigger a restart of calibre-server.
Spoiler:

Code:
<#
.Synopsis
Restarts the calibre server process on a remote computer
.Description
Restart-myCalibreServer opens a PSSession to the remote computer (wss-200 by default) and then
stops and restarts the calibre-server process on that remote computer.
.Example
Restart-myCalibreServer

Opens a PSSession to wss-200 and stops any existing calibre-server process, and then starts a new one.
.Example
Restart-myCalibreServer -ComputerName SRV2

Opens a PSSession to SRV2 and stops any existing calibre-server process, and then starts a new one.
.Parameter ComputerName
The computer where the calibre-server is running.
.Inputs
[string]
.Notes
    Author: Charlie Russel
 Copyright: 2017 by Charlie Russel
          : Permission to use is granted but attribution is appreciated
   Initial: 10 July, 2017 (cpr)
   ModHist:
          :
#>
[CmdletBinding()]
Param(
     [Parameter(Mandatory=$False,Position=0)]
     [alias("Name","Computer")]
     [string]
     $ComputerName = "wss-200"
     )

If (! (Get-PSSession -ComputerName $ComputerName | Where-Object {$_.State -eq 'Opened'} )) {
   Write-Verbose "No existing open PSSession to wss-200 found, starting a new one"
   New-PSSession -ComputerName $ComputerName
} else {
   Write-Verbose "Found existing PSSession, reusing it..."
}
$session = Get-PSSession -ComputerName $ComputerName | Where-Object {$_.State -eq 'Opened'}
Invoke-Command -Session $session  `
               -ScriptBlock {
                  if (Get-Process -Name "Calibre*") {
                        Stop-Process -Name "calibre*"
                     }
                  Start-Process -WindowStyle Hidden `
                                -FilePath 'C:\Program Files\Calibre2\Calibre-Server.exe' `
                                -ArgumentList "D:\ServerFolders\Kindle"
                  Get-Process -Name "calibre*"
               }
CRussel is offline   Reply With Quote
Old 11-05-2017, 01:07 AM   #8
Verdigris
Junior Member
Verdigris began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Nov 2017
Device: Marvin3
Quote:
Originally Posted by kovidgoyal View Post
Simply manage your calibre library on your personal computer and use rsync to update the library on the server from your personal computer. The script that runs rsync should ssh into the server, stop the calibre-server process and then run rsync and then restart the calibre-server.


And it's on my TODO list to allow the calirbe GUI to conenct to a remote calibre-server instance as a device so you can manage the books on it comfortably.
This sounds like a good way to do it. It would also mean keeping 2 copies of the data, but I do a backup anyhow.

What I currently do is run calibre-server on my home linux server, but also export the ebook folder as a samba share.

When I want to edit the library I ssh into the server, stop the calibre-server, the run a local gui using the network directory.

Given there are only 2 of us using the server, probably I dont need to stop the calibre server as that isn't going to make any changes to the database.

I'm the only one likely to be making changes to the exported drive. And that can be controlled through permissions.

The only disadvantage of my method is that I need to ensure my ebook directory has opened on the client before running calibre. It takes a while to open and if this has not occurred Calibre offers to make a new library when it opens.
Verdigris is offline   Reply With Quote
Old 11-05-2017, 01:47 AM   #9
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,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by Verdigris View Post
The only disadvantage of my method is that I need to ensure my ebook directory has opened on the client before running calibre. It takes a while to open and if this has not occurred Calibre offers to make a new library when it opens.
Simply create a sript that checks for the opening before launching calibre and use that script to launch calibre.
kovidgoyal is offline   Reply With Quote
Old 11-08-2017, 07:49 AM   #10
mtjj
Member
mtjj began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Oct 2017
Device: Android, Windows 10
Quote:
Originally Posted by mtjj View Post
In the end it seemed the simplest way (for me) was to use the automatic adding. I edit the book on my laptop to get all the metadata correct and push it out to a directory on a network share. Calibre running (GUI, minimized) on the server picks it up and files it correctly into the library.

...
I may have spoken too soon, as I've noticed something odd with this. I think I've got a workaround but I mention it here in case someone else reads this and tries to use my method.

It seems that calibre's behaviour on "save to disk" is to make an identical copy of the file, then update it with metadata? What is happened is that some files were saved from the laptop but appearing on the server with incorrect tags (not cleaned). I tried it again paying attention and noticed errors on save: " IOError: [Errno 2] No such file or directory: ". But the file was appearing successfully in the calibre library on the server.

What I think is happening is that calibre-on-the-laptop is saving the file, then calibre-on-the-server is grabbing it from the directory before calibre-on-the-laptop has a chance to update the metadata. I might be wrong but I can't see another explanation for what is happening?

Now for epub I think I can get around this by polishing the book first, but this doesn't work for PDFs. Instead I need to save those to a different directory on the laptop, then once saved move them to my shared directory.....
mtjj is offline   Reply With Quote
Old 11-08-2017, 09:23 AM   #11
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,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Preferences->Toolbars Add the embed metadata button to your toolbar
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Content Server is using a wrong network card myki Devices 5 03-25-2015 01:02 PM
Content Server is using a wrong network card myki Related Tools 2 03-25-2015 09:02 AM
Calibre Content Server and Windows Home Server 2011 HughMcC Calibre 8 10-01-2014 07:26 AM
Link PE To Home Network w1ksz enTourage eDGe 4 10-11-2011 05:02 PM
Can't get my netbook on my home network taosaur Alternative Devices 5 05-24-2009 05:27 PM


All times are GMT -4. The time now is 02:52 PM.


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