move icons.db into library folder
This commit is contained in:
parent
37a45bdad9
commit
02c61c6350
3 changed files with 26 additions and 5 deletions
|
|
@ -210,6 +210,14 @@ def run_scan():
|
|||
logger.debug('%s items in library without a record', len(missing))
|
||||
|
||||
def change_path(old, new):
|
||||
old_icons = os.path.join(old, 'Metadata', 'icons.db')
|
||||
new_icons = os.path.join(new, 'Metadata', 'icons.db')
|
||||
if os.path.exists(old_icons) and not os.path.exists(new_icons):
|
||||
ox.makedirs(os.path.dirname(new_icons))
|
||||
shutil.move(old_icons, new_icons)
|
||||
import item.icons
|
||||
item.icons.icons = item.icons.Icons(new_icons)
|
||||
|
||||
new_books = os.path.join(new, 'Books')
|
||||
if not os.path.exists(new_books):
|
||||
ox.makedirs(new)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue