diff --git a/src/calibre/devices/prs505/books.py b/src/calibre/devices/prs505/books.py index 40a98913be..20fed3e2ed 100644 --- a/src/calibre/devices/prs505/books.py +++ b/src/calibre/devices/prs505/books.py @@ -357,6 +357,11 @@ def fix_ids(main, carda, cardb): item.parentNode.removeChild(item) item.unlink() db.reorder_playlists() + db.sony_id_cache = {} + for child in db.root_element.childNodes: + if child.nodeType == child.ELEMENT_NODE and child.hasAttribute("id"): + db.sony_id_cache[child.getAttribute('id')] = child.getAttribute('path') + regen_ids(main) regen_ids(carda)