mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #2540 (Internal collections showing as on memory stick (MS))
This commit is contained in:
parent
03fd7f164e
commit
8e64f31eed
@ -403,7 +403,8 @@ def fix_ids(main, carda, cardb):
|
|||||||
for child in db.root_element.childNodes:
|
for child in db.root_element.childNodes:
|
||||||
if child.nodeType == child.ELEMENT_NODE and child.hasAttribute('id'):
|
if child.nodeType == child.ELEMENT_NODE and child.hasAttribute('id'):
|
||||||
id_map[child.getAttribute('id')] = str(cid)
|
id_map[child.getAttribute('id')] = str(cid)
|
||||||
child.setAttribute("sourceid", '1')
|
child.setAttribute("sourceid",
|
||||||
|
'0' if getattr(child, 'tagName', '').endswith('playlist') else '1')
|
||||||
child.setAttribute('id', str(cid))
|
child.setAttribute('id', str(cid))
|
||||||
cid += 1
|
cid += 1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user