From 1a55ff8eaa3baae6ba74f03b63b6906851355c93 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Sat, 16 May 2009 09:01:37 +0000 Subject: [PATCH] * examples/readdisc.py: Get our metadata only from the toc. --- ChangeLog | 5 +++++ examples/readdisc.py | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c1fdb74..a87fdf5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-05-16 Thomas Vander Stichele + + * examples/readdisc.py: + Get our metadata only from the toc. + 2009-05-16 Thomas Vander Stichele * examples/readdisc.py: 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