Fix OSError on resetting the database
This commit is contained in:
parent
d198808cfc
commit
1864adf151
1 changed files with 4 additions and 1 deletions
|
@ -90,7 +90,10 @@ def reset_cached_images():
|
||||||
'Video', 'plex')
|
'Video', 'plex')
|
||||||
for path in paths:
|
for path in paths:
|
||||||
new_path = path_ops.translate_path('special://thumbnails/%s' % path)
|
new_path = path_ops.translate_path('special://thumbnails/%s' % path)
|
||||||
path_ops.makedirs(path_ops.encode_path(new_path))
|
try:
|
||||||
|
path_ops.makedirs(path_ops.encode_path(new_path))
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
with KodiTextureDB() as kodidb:
|
with KodiTextureDB() as kodidb:
|
||||||
for row in kodidb.cursor.execute('SELECT tbl_name FROM sqlite_master WHERE type=?',
|
for row in kodidb.cursor.execute('SELECT tbl_name FROM sqlite_master WHERE type=?',
|
||||||
('table', )):
|
('table', )):
|
||||||
|
|
Loading…
Reference in a new issue