chiark
/
gitweb
/
~mdw
/
epls
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cfb7e85
)
mkm3u: Add (commented-out) debugging machinery for video parser.
author
Mark Wooding
<mdw@distorted.org.uk>
Mon, 14 Mar 2022 18:28:41 +0000
(18:28 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Mon, 14 Mar 2022 20:06:40 +0000
(20:06 +0000)
mkm3u
patch
|
blob
|
blame
|
history
diff --git
a/mkm3u
b/mkm3u
index 1bccdebec67efc7c663105ff779336820cb2f57a..bcc3536a4ab7457bc7805f27123b93df2c97b828 100755
(executable)
--- a/
mkm3u
+++ b/
mkm3u
@@
-161,7
+161,9
@@
class VideoDir (object):
path = OS.path.join(dir, fn)
if not fn.endswith(".iso"): continue
m = me._R_ISO_PRE.match(fn)
path = OS.path.join(dir, fn)
if not fn.endswith(".iso"): continue
m = me._R_ISO_PRE.match(fn)
- if not m: continue
+ if not m:
+ #print(";; `%s' ignored" % path, file = SYS.stderr)
+ continue
i = filter(m.group("si"), int)
stitle = m.group("st")
i = filter(m.group("si"), int)
stitle = m.group("st")
@@
-184,6
+186,9
@@
class VideoDir (object):
for eprange in m.group("eps").split(", "):
mm = me._R_ISO_EP.match(eprange)
if mm is None: bad = True; continue
for eprange in m.group("eps").split(", "):
mm = me._R_ISO_EP.match(eprange)
if mm is None: bad = True; continue
+ if not any:
+ #print(";; `%s'" % path, file = SYS.stderr)
+ any = True
i = filter(mm.group("si"), int)
if i is not None:
try: ts = seasons[i]
i = filter(mm.group("si"), int)
if i is not None:
try: ts = seasons[i]
@@
-194,9
+199,9
@@
class VideoDir (object):
end = filter(mm.group("ej"), int, start)
for k in range(start, end + 1):
ts.set_episode_disc(k, disc)
end = filter(mm.group("ej"), int, start)
for k in range(start, end + 1):
ts.set_episode_disc(k, disc)
- any = True
- if
bad and any:
-
raise ExpectedError("bad ep list in `%s'", fn)
+ #print(";;\tepisode %d.%d" % (ts.i, k), file = SYS.stderr)
+ if
not any: pass #print(";; `%s' ignored" % path, file = SYS.stderr)
+
elif bad:
raise ExpectedError("bad ep list in `%s'", fn)
me.seasons = seasons
class AudioDisc (Source):
me.seasons = seasons
class AudioDisc (Source):