From 84e4ef6ab8817730db70aeac4932d041c983dbbb Mon Sep 17 00:00:00 2001 From: JoeLametta Date: Wed, 31 Mar 2021 10:03:04 +0000 Subject: [PATCH] offset find: fail early and inform the user with CDs having less than 3 tracks Fixes #532 Signed-off-by: JoeLametta --- whipper/command/offset.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/whipper/command/offset.py b/whipper/command/offset.py index f66d50b..81752fe 100644 --- a/whipper/command/offset.py +++ b/whipper/command/offset.py @@ -89,6 +89,11 @@ CD in the AccurateRip database.""" runner.run(t) table = t.toc.table + if len(table.tracks) < 3: + logger.error("whipper offset find needs a CD with at least 3 " + "tracks on it to do its job") + return None + logger.debug("CDDB disc id: %r", table.getCDDBDiscId()) try: responses = accurip.get_db_entry(table.accuraterip_path())