[SCM] morituri/master: * examples/readdisc.py: Get our metadata only from the toc.

js at users.alioth.debian.org js at users.alioth.debian.org
Sun Oct 19 20:08:59 UTC 2014


The following commit has been merged in the master branch:
commit 1a55ff8eaa3baae6ba74f03b63b6906851355c93
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Sat May 16 09:01:37 2009 +0000

    	* examples/readdisc.py:
    	  Get our metadata only from the toc.

diff --git a/ChangeLog b/ChangeLog
index c1fdb74..a87fdf5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
 2009-05-16  Thomas Vander Stichele  <thomas at apestaart dot org>
 
 	* examples/readdisc.py:
+	  Get our metadata only from the toc.
+
+2009-05-16  Thomas Vander Stichele  <thomas at apestaart dot org>
+
+	* examples/readdisc.py:
 	  Also work for discs without htoa.
 
 2009-05-16  Thomas Vander Stichele  <thomas at apestaart dot org>
diff --git a/examples/readdisc.py b/examples/readdisc.py
index ec8dc2b..0b172e4 100644
--- a/examples/readdisc.py
+++ b/examples/readdisc.py
@@ -219,14 +219,19 @@ def main(argv):
         runner = taskgtk.GtkProgressRunner()
         function = gtkmain
 
-    # first, read the normal TOC and full index table
+    # first, read the normal TOC, which is fast
     ptoc = common.Persister(options.toc_pickle or None)
     if not ptoc.object:
         t = cdrdao.ReadTOCTask()
         function(runner, t)
         ptoc.persist(t.table)
     ittoc = ptoc.object
+    assert ittoc.hasTOC()
 
+    # already show us some info based on this
+    metadata = musicbrainz(ittoc.getMusicBrainzDiscId())
+
+    # now, read the complete index table, which is slower
     ptable = common.Persister(options.table_pickle or None)
     if not ptable.object:
         t = cdrdao.ReadIndexTableTask()
@@ -238,8 +243,6 @@ def main(argv):
 
     lastTrackStart = 0
 
-    metadata = musicbrainz(itable.getMusicBrainzDiscId())
-
     # check for hidden track one audio
     htoapath = None
     index = None

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list