Replaces spaces with underscores in library ids to make them more url friendly

This commit is contained in:
Kovid Goyal 2016-02-13 15:17:19 +05:30
parent 914c58d107
commit 585acda8cb

View File

@ -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