From 3cfb28f0fff303b7f44aeacbce6d12343049b332 Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Sat, 15 May 2010 21:06:11 +0100 Subject: [PATCH] Regenerate sony_id_cache in fix_ids, because it changes all the values. --- src/calibre/devices/prs505/books.py | 5 +++++ 1 file changed, 5 insertions(+) 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)