From 585acda8cbafc2642f1ec6bc103a50215af9cf4c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 13 Feb 2016 15:17:19 +0530 Subject: [PATCH] Replaces spaces with underscores in library ids to make them more url friendly --- src/calibre/srv/handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/srv/handler.py b/src/calibre/srv/handler.py index e25c74f566..ea5c63e507 100644 --- a/src/calibre/srv/handler.py +++ b/src/calibre/srv/handler.py @@ -36,7 +36,7 @@ class LibraryBroker(object): seen.add(path) if not LibraryDatabase.exists_at(path): continue - bname = library_id = force_unicode(os.path.basename(path), filesystem_encoding) + bname = library_id = force_unicode(os.path.basename(path), filesystem_encoding).replace(' ', '_') c = 0 while library_id in self.lmap: c += 1