Notalib / LYT

m.e17.dk
GNU Lesser General Public License v3.0
10 stars 12 forks source link

Erroneous section/segment ordering for specific titles #496

Closed simmoe closed 11 years ago

simmoe commented 11 years ago

Book 37312 is tha starting point for this issue

Start playing the book and forward to chapter 4 - the text is now double on the text screen, and the speak does not resume from chapter 4 as expected, but somewhere in chapter 3. Forward again and the "real" chapter 4 begins.

Same thing repeats in chapter 12

mzedeler commented 11 years ago

Related to issue #275.

mzedeler commented 11 years ago

I have debugged this and found that this is actually a completely new bug triggered by chapter 4 in this book.

dtb_008.smil has the following structure:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<smil>
    <head>
    ...
    </head_
    <body>
        <seq dur="1971.866s" id="sfe_seq_0008_0001">
            <par endsync="last" id="rgn_par_0008_0001">
                <text src="ncc.html#rgn_cnt_0008" id="rgn_txt_0008_0001" />
                <seq id="sfe_seq_0008_0002">
                    <audio src="dtb_0005.mp3" clip-begin="npt=5307.860s" clip-end="npt=5313.960s" id="rgn_aud_0008_0001" />
                    <audio src="dtb_0005.mp3" clip-begin="npt=5313.960s" clip-end="npt=5323.077s" id="rgn_aud_0008_0002" />
                    ...
                    <audio src="dtb_0005.mp3" clip-begin="npt=6923.873s" clip-end="npt=6941.428s" id="rgn_aud_0008_0141" />
                    <audio src="dtb_0006.mp3" clip-begin="npt=2.776s" clip-end="npt=12.284s" id="rgn_aud_0008_0142" />
                    <audio src="dtb_0006.mp3" clip-begin="npt=12.284s" clip-end="npt=25.659s" id="rgn_aud_0008_0143" />
                    ...
                    <audio src="dtb_0006.mp3" clip-begin="npt=316.572s" clip-end="npt=341.074s" id="rgn_aud_0008_0173" />
                </seq>
            </par>
        </seq>
    </body>
</smil>

As far as I can tell right now, it seems that our code uses the time stamps to order the segments in stead of document order, but this doesn't seem to be related to issue #275.

mzedeler commented 11 years ago

As expected, the audio clips are sorted according to their start time. This was introduced as a large bug fix of issue #36.

mzedeler commented 11 years ago

I have removed one line that did the sorting which seems to have fixed this issue.

Besides this, I have verified that issue #275 is still fixed.