mkm3u: Check that movie seasons have explicit ISOs.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 17 Mar 2022 16:16:11 +0000 (16:16 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 17 Mar 2022 16:16:11 +0000 (16:16 +0000)
mkm3u

diff --git a/mkm3u b/mkm3u
index 5fd2196..9051c26 100755 (executable)
--- a/mkm3u
+++ b/mkm3u
@@ -322,6 +322,8 @@ class Season (BaseSeason):
     return label
 
 class MovieSeason (BaseSeason):
+  def __init__(me, series, *args, **kw):
+    me.i = None
   def add_episode(me, j, neps, title, src, tno, startch):
     if title is None: raise ExpectedError("movie must have a title")
     return super().add_episode(j, neps, title, src, tno, startch)
@@ -534,6 +536,7 @@ class EpisodeListParser (object):
     else:
       try: src = me._isos[sname]
       except KeyError:
+        check(season.i is not None, "must use explicit iso for movies")
         dir = lookup(me._vdirs, sname,
                      "title, but no iso or video directory")
         vseason = lookup(dir.seasons, season.i,