mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Disabled code to change single section periodical indexing on SONYs.
This commit is contained in:
parent
af246ff350
commit
dff342fc32
@ -116,9 +116,22 @@ def sony_metadata(oeb):
|
||||
except:
|
||||
base_id = str(uuid4())
|
||||
|
||||
toc = oeb.toc
|
||||
|
||||
if False and toc.depth() < 3:
|
||||
# Single section periodical
|
||||
# Disabled since I prefer the current behavior
|
||||
from calibre.ebooks.oeb.base import TOC
|
||||
section = TOC(klass='section', title=_('All articles'),
|
||||
href=oeb.spine[2].href)
|
||||
for x in toc: section.nodes.append(x)
|
||||
toc = TOC(klass='periodical', href=oeb.spine[2].href,
|
||||
title=unicode(oeb.metadata.title[0]))
|
||||
toc.nodes.append(section)
|
||||
|
||||
entries = []
|
||||
seen_titles = set([])
|
||||
for i, section in enumerate(oeb.toc):
|
||||
for i, section in enumerate(toc):
|
||||
if not section.href:
|
||||
continue
|
||||
secid = 'section%d'%i
|
||||
|
Loading…
x
Reference in New Issue
Block a user