mkm3u, *.epls: Check that episode lengths are within expected bounds.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 19 Mar 2022 21:52:12 +0000 (21:52 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 19 Mar 2022 22:19:29 +0000 (22:19 +0000)
This provides a useful check on the supplied title numbers.

80 files changed:
24.epls
a-team.epls
agent-carter.epls
agents-of-shield.epls
allo-allo.epls
andromeda.epls
arrowverse.epls
babylon-5.epls
batman-1966.epls
between-the-lines.epls
blackadder.epls
blakes-7.epls
brass-eye.epls
bsg-1978.epls
bsg-1980.epls
bsg-2003.epls
buffyverse.epls
caprica.epls
cracker.epls
crow-stairway.epls
danger-mouse.epls
dark-angel.epls
dexter.epls
dollhouse.epls
drwho-crusade.epls
drwho-highlanders.epls
drwho-invasion.epls
drwho-marco-polo.epls
drwho-massacre.epls
drwho-masterplan.epls
drwho-pirates.epls
drwho-savages.epls
drwho-silurians.epls
drwho-smugglers.epls
drwho-snowmen.epls
drwho-toymaker.epls
drwho-war-games.epls
drwho-wheel.epls
engrenages.epls
equalizer.epls
fawlty-towers.epls
firefly.epls
flying-circus-restored.epls
flying-circus-sketches.epls
fry-and-laurie.epls
game-of-thrones.epls
george-smiley.epls
gotham.epls
hannibal.epls
hhgttg.epls
house-of-cards.epls
i-claudius.epls
into-the-labyrinth.epls
knight-rider.epls
lexx.epls
lois-and-clark.epls
macgyver.epls
mkm3u
morse.epls
person-of-interest.epls
robin-of-sherwood.epls
rome.epls
sanctuary.epls
sapphire-and-steel.epls
shark.epls
sherlock-holmes.epls
smallville.epls
spartacus.epls
spooks.epls
stargate.epls
terminator-scc.epls
the-americans.epls
the-bridge.epls
the-day-today.epls
the-killing.epls
the-night-manager.epls
the-shield.epls
the-wire.epls
v-2009.epls
waking-the-dead.epls

diff --git a/24.epls b/24.epls
index 974f54c..4d33dec 100644 (file)
--- a/24.epls
+++ b/24.epls
@@ -3,6 +3,7 @@
 ;; (defun insert-clock (start &optional end) (do ((i start (mod (1+ i) 24)) (any nil t)) ((and any (= i (or end start)))) (insert (format "%d:00%s–%d:00%s\n" (1+ (mod (1- i) 12)) (if (< i 12) "am" "pm") (1+ (mod i 12)) (if (or (< i 11) (= i 23)) "am" "pm")))))
 
 !vdir #/24
+!explen 42:00/10%
 
 !season 1
 1      12:00am–1:00am
@@ -31,7 +32,7 @@
 4      11:00pm–12:00am
 
 !season 2
-1      8:00am–9:00am
+1,l=49:00 8:00am–9:00am
 2      9:00am–10:00am
 3      10:00am–11:00am
 4      11:00am–12:00pm
@@ -57,7 +58,7 @@
 4      7:00am–8:00am
 
 !season 3
-1      1:00pm–2:00pm
+1,l=49:00 1:00pm–2:00pm
 2      2:00pm–3:00pm
 3      3:00pm–4:00pm
 4      4:00pm–5:00pm
 
 !season -
 !iso #/24—Redemption/Extended version.iso
-1      24—Redemption
+1,l=1:37:00 24—Redemption
 !iso -
 
 !season 7
index 33a3296..04a3c33 100644 (file)
@@ -1,9 +1,10 @@
 ;;; -*-fundamental-*-
 
 !vdir A/The A-Team
+!explen 45:00
 
 !season 1
-1      Mexican Slayride (Pilot)
+1,l=2x Mexican Slayride (Pilot)
 2      Children of Jamestown
 1      Pros and Cons
 2      A Small and Deadly War
@@ -22,7 +23,7 @@
 2      Recipe for Heavy Bread
 3      The Only Church in Town
 1      Bad Time on the Border
-2      When You Comin' Back, Range Rider?
+2,l=2x When You Comin' Back, Range Rider?
 3      The Taxicab Wars
 1      Labor Pains
 2      There's Always a Catch
@@ -61,7 +62,7 @@
 8      Skins
 5      Road Games
 6      Moving Targets
-7      Knights of the Road
+7,l=47:00 Knights of the Road
 8      Waste 'Em!
 5      Bounty
 6      Beverly Hills Assault
@@ -69,7 +70,7 @@
 8      Incident at Crystal Lake
 
 !season 4
-5      Judgment Day
+5,l=2x Judgment Day
 6      Where Is the Monster When You Need Him?
 7      Lease with an Option to Die
 8      The Road to Hope
index 8757999..fceccf3 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir A/Agent Carter
+!explen 40:00
 
 !season 1
 6      Now Is Not the End
index 28a20c4..d3a49a6 100644 (file)
@@ -1,9 +1,10 @@
 ;;; -*-fundamental-*-
 
 !vdir A/Agents of SHIELD
+!explen 40:00
 
 !season 1
-5      Pilot
+5,l=42:00 Pilot
 6      0-8-4
 7      The Asset
 8      Eye-Spy
index 4358d73..e7d88cd 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir A/'Allo 'Allo!
+!explen 36:00/40%
 
 !season 1
 !epno 0
@@ -20,7 +21,7 @@
 9      Swiftly and with Style
 10     The Duel
 11     Herr Flick's Revenge
-7      Christmas Special—The Gateau from the Chateau
+7,l=47:53 Christmas Special—The Gateau from the Chateau
 
 !season 3
 8      The Nicked Knockwurst
index 151f9a6..c10a4a8 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir A/Andromeda
+!explen 42:30
 
 !season 1
 1      Under the Night
index bf35ed8..b7ed613 100644 (file)
@@ -31,6 +31,8 @@
 ;!series:sal Superman & Lois
 ;!vdir:sal S/Superman & Lois
 
+!explen 41:00/6%
+
 ;;;--------------------------------------------------------------------------
 !season:arr 1
 
@@ -742,7 +744,7 @@ fls,3       Growing Pains
 spg,5  Phantom Menaces
 bwm,3  Arrive Alive
 ;blt,0 The Book of Ruin, Chapter Three: Things Fall Apart
-spg,6  Lost Souls
+spg,6,l=36:57 Lost Souls
 ;blt,0 The Book of Ruin, Chapter Four: Lyding
 spg,7  Prom Night!
 bwm,4  Initiate Self-Destruct
@@ -834,7 +836,7 @@ spg,5       Truth or Consequences
 ;bwm,0 Antifreeze
 ;lot,  Speakeasy Does It
 spg,6  The Last Gauntlet
-spg,7  Kara
+spg,7,l=45:00 Kara
 ;bwm,0 A Lesson from Professor Pyg
 ;lot,  It's a Mad, Mad, Mad, Mad Scientist
 ;fls,0 Armageddon (part 1)
index 1c52313..ecce3e6 100644 (file)
@@ -2,11 +2,13 @@
 
 !vdir B/Babylon 5
 
+!explen 42:00/8%
+
 !season -
 !iso B/Babylon 5—In the Beginning.iso
-1      In the Beginning
+1,l=1:30:00    In the Beginning
 !iso B/Babylon 5—The Gathering.iso
-1      The Gathering
+1,l=1:30:00    The Gathering
 !iso -
 
 !season 1
 
 !season -
 !iso B/Babylon 5—Thirdspace.iso
-1      Thirdspace
+1,l=1:30:00    Thirdspace
 !iso B/Babylon 5—The River of Souls.iso
-1      The River of Souls
+1,l=1:30:00    The River of Souls
 !iso B/Babylon 5—A Call to Arms.iso
-1      A Call to Arms
+1,l=1:30:00    A Call to Arms
 !iso -
index 391ef1d..b2f1e02 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir B/Batman (1966 series)
+!explen 24:00
 
 !season 1
 3      Hi Diddle Riddle
@@ -40,7 +41,7 @@
 
 !season -
 !iso B/Batman (1966).iso
-1      Batman
+1,l=1:40:00 Batman
 !iso -
 
 !season 2
index a67d3bc..635ced5 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir B/Between the Lines
+!explen 51:00/20%
 
 !season 1
 4      Private Enterprise
index a450944..71a5e54 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir B/Blackadder
+!explen 30:00/13%
 
 !season 1 The Black Adder
 2      The Foretelling
 
 !season -
 !iso B/Blackadder—Back and Forth.iso
-3      The Cavalier Years
+3,l=15:00/5% The Cavalier Years
 
 !iso B/Blackadder's Christmas Carol.iso
-1      Blackadder's Christmas Carol
+1,l=43:00/5% Blackadder's Christmas Carol
 
 !iso B/Blackadder—Back and Forth.iso
 1      Back and Forth
index 7b714e5..48512ec 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir B/Blake's 7
+!explen 51:00/6%
 
 !season 1
 3      The Way Back
index 717e544..8c6861f 100644 (file)
@@ -4,6 +4,7 @@
 !iso B/Brass Eye.iso
 
 ;; Episodes.
+!explen 24:30/12%
 24     Animals
 67     Drugs
 78     Science
 46     Pædophilia special
 
 ;; Extras.
+!explen 1:02/60%
 25     Hippo interview
 26     Extended elephant
 29     Science 30"
 28     Special 24"
-27     Special 10"
+27,l=16        Special 10"
 
 49     JLb-8: Little White Butt
 51     Funny Eyed Guy
index bfcb0cb..c292d70 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir B/Battlestar Galactica (1978)
+!explen 46:00
 
 1,n=3  Saga of a Star World
 2      The Lost Planet of the Gods (part 1)
index 4fbf2d2..7526322 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir B/Battlestar Galactica 1980
+!explen 46:00
 
 3      Galactica Discovers Earth (part 1)
 4      Galactica Discovers Earth (part 2)
index 00f7e0c..0423c86 100644 (file)
@@ -1,10 +1,11 @@
 ;;; -*-fundamental-*-
 
 !vdir B/Battlestar Galactica (2003)
+!explen 42:00/10%
 
 !season -
 !iso B/Battlestar Galactica (2003)/S00. Miniseries.iso
-1      Miniseries
+1,l=3:00:00 Miniseries
 !iso -
 
 !season 1
@@ -32,7 +33,7 @@
 4      Home (part 2)
 5      Final Cut
 2      Flight of the Phoenix
-3      Pegasus
+3,l=56:00 Pegasus
 4      Resurrection Ship (part 1)
 5      Resurrection Ship (part 2)
 2      Epiphanies
@@ -42,7 +43,7 @@
 2      The Captain's Hand
 3      Downloaded
 4      Lay Down Your Burdens (part 1)
-5      Lay Down Your Burdens (part 2)
+5,l=1:05:00 Lay Down Your Burdens (part 2)
 
 !season 3
 3      Occupation
 3      Maelstrom
 4      The Son Also Rises
 5      Crossroads (part 1)
-6      Crossroads (part 2)
+6,l=45:55 Crossroads (part 2)
 
 !season -
 !iso B/Battlestar Galactica (2003)/S04D01. Razor.iso
-2      Razor
+2,l=1:40:00 Razor
 
 !season - Razor Flashbacks
+!explen 2:30/25%
 21
 22
 23
 24
 25
 26
-27
+27,l=4:21
 
 !iso -
+!explen 42:00/10%
 
 !season 4
 3      He that Believeth in Me
 16     Sometimes a Great Notion
 !displaced 1
 !iso B/Battlestar Galactica (2003)/S05D04. Extras.iso
-17     A Disquiet Follows My Soul
+17,l=50:00 A Disquiet Follows My Soul
 !iso -
 18     The Oath
 19     Blood on the Scales
 18     Someone to Watch over Me
 19     Islanded in a Stream of Stars
 17     Daybreak (part 1)
-18     Daybreak (parts 2&3)
+18,l=1:30:00 Daybreak (parts 2&3)
index 8c209ea..3cb9c59 100644 (file)
@@ -6,6 +6,8 @@
 !series:a Angel
 !vdir:a A/Angel
 
+!explen 41:00/8%
+
 ;;;--------------------------------------------------------------------------
 !season:b 1
 
@@ -236,7 +238,7 @@ a,2 Billy
 b,2    All the Way
 
 a,3    Offspring
-b,3    Once More, with Feeling
+b,3,l=48:30 Once More, with Feeling
 
 a,4    Quickening
 b,4    Tabula rasa
index 1f36efa..787e737 100644 (file)
@@ -1,11 +1,12 @@
 ;;; -*-fundamental-*-
 
 !vdir C/Caprica
+!explen 43:00
 
 !season 1
 !displaced 1
 !iso C/Caprica/S01D01. Extended pilot.iso
-4      Pilot
+4,l=2x Pilot
 !iso -
 4      Rebirth
 5      Reins of a Waterfall
index df6d5b9..edb2be0 100644 (file)
@@ -2,13 +2,14 @@
 
 !vdir C/Cracker
 
-1      The Mad Woman in the Attic
-1      To Say I Love You
-1      One Day a Lemming Will Fly
-1      To Be a Somebody
-1      The Big Crunch
-1      Men Should Weep
-1      Brotherly Love
-1      Best Boys
-1      True Romance
-1      White Ghost
+!explen 50:00
+1,l=2x The Mad Woman in the Attic
+1,l=3x To Say I Love You
+1,l=2x One Day a Lemming Will Fly
+1,l=3x To Be a Somebody
+1,l=3x The Big Crunch
+1,l=3x Men Should Weep
+1,l=3x Brotherly Love
+1,l=2x Best Boys
+1,l=2x True Romance
+1,l=2x White Ghost
index 176ff52..c676d57 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir C/The Crow—Stairway to Heaven
+!explen 43:00
 
 5      The Soul Can't Rest
 6      Souled Out
index 43bf88b..f4073e5 100644 (file)
@@ -1,20 +1,22 @@
 ;;; -*-fundamental-*-
 
+!explen 10:00/20%
+
 !iso D/Danger Mouse/Close Encounters of the Absurd Kind!.iso
-2,ch=1-2       Custard
-2,ch=3-3       Close Encounters of the Absurd Kind
-2,ch=4-4       The Duel
-2,ch=5-5       Day of the Suds
-2,ch=6-6       The Bad Luck Eye of the Little Yellow God
-2,ch=7-7       The Four Tasks of Danger Mouse
+2,ch=1-2,l=2x  Custard
+2,ch=3-3,l=2x  Close Encounters of the Absurd Kind
+2,ch=4-4,l=2x  The Duel
+2,ch=5-5,l=2x  Day of the Suds
+2,ch=6-6,l=2x  The Bad Luck Eye of the Little Yellow God
+2,ch=7-7,l=2x  The Four Tasks of Danger Mouse
 
 !iso D/Danger Mouse/Danger Mouse Saves the World… Again!.iso
-2,ch=1-1        The Invasion of Colonel K
-2,ch=2-2        Danger Mouse Saves the World
-2,ch=3-3        The Odd Ball Run-a-Round
-2,ch=4-4        Wild, Wild, Goose Chase
-2,ch=5-5        The Return of Count Duckula
-2,ch=6-6        Demons Aren't Dull
+2,ch=1-1,l=2x   The Invasion of Colonel K
+2,ch=2-2,l=2x   Danger Mouse Saves the World
+2,ch=3-3,l=2x   The Odd Ball Run-a-Round
+2,ch=4-4,l=2x   Wild, Wild, Goose Chase
+2,ch=5-5,l=2x   The Return of Count Duckula
+2,ch=6-6,l=2x   Demons Aren't Dull
 
 !iso D/Danger Mouse/Project Moon.iso
 2,ch=1-1       The Long Lost Crown Affair
 2,ch=8-8       The Clock Strikes Back
 
 !iso D/Danger Mouse/The Great Bone Idol.iso
-2,ch=1-1       150 Million Years Lost
-2,ch=2-2       Planet of the Cats
-2,ch=3-3       Four Heads Are Better than Two
-2,ch=4-4       Tower of Terror
-2,ch=5-5       The Great Bone Idol
-2,ch=6-6       Public Enemy No. 1
+2,ch=1-1,l=2x  150 Million Years Lost
+2,ch=2-2,l=2x  Planet of the Cats
+2,ch=3-3,l=2x  Four Heads Are Better than Two
+2,ch=4-4,l=2x  Tower of Terror
+2,ch=5-5,l=2x  The Great Bone Idol
+2,ch=6-6,l=2x  Public Enemy No. 1
 
 !iso D/Danger Mouse/Viva Danger Mouse.iso
 2,ch=1-1       Viva Danger Mouse
@@ -55,4 +57,4 @@
 2,ch=8-8       Alping Is Snow Easy Matter
 
 !iso D/Danger Mouse/Close Encounters of the Absurd Kind!.iso
-3              Count Duckula—No Sax Please We're Egyptian
+3,l=22:30      Count Duckula—No Sax Please We're Egyptian
index c03c30b..32d94b4 100644 (file)
@@ -1,9 +1,10 @@
 ;;; -*-fundamental-*-
 
 !vdir D/Dark Angel
+!explen 42:00
 
 !season 1
-1      Pilot
+1,l=2x Pilot
 2      Heat
 3      Flushed
 1      C.R.E.A.M.
@@ -46,4 +47,4 @@
 3      Dawg Day Afternoon
 4      She Ain't Heavy
 1      Love Among the Runes
-2      Freak Nation
+2,l=1.5x Freak Nation
index 1107021..3f48f24 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir D/Dexter
+!explen 51:00/12%
 
 !season 1
 3      Dexter
index 82ef8b9..dcd589c 100644 (file)
@@ -3,6 +3,7 @@
 !vdir D/Dollhouse
 
 !season 1
+!explen 47:00
 2      Ghost
 3      The Target
 4      Stage Fright
@@ -18,6 +19,7 @@
 1      Epitaph One
 
 !season 2
+!explen 42:00
 2      Vows
 3      Instinct
 4      Belle Chose
index 0f08e08..91fe66b 100644 (file)
@@ -2,6 +2,7 @@
 
 !adir D/Doctor Who—The Lost TV Episodes (audio)/S02E06 P. The Crusade
 !iso D/Doctor Who—Lost in Time/01. Hartnell era.iso
+!explen 25:00/6%
 
 10     The Lion
 -      The Knight of Jaffa
index d53d9c8..9f49f27 100644 (file)
@@ -2,8 +2,9 @@
 
 !adir D/Doctor Who—The Lost TV Episodes (audio)/S04E04 FF. The Highlanders
 !epname The Highlanders—Part
+!explen 25:00/6%
 
 -
 -
--
+-,l=23:00
 -
index d080d47..70bf5fc 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !epname The Invasion—Part
+!explen 23:30/6%
 
 !iso D/Doctor Who/S06E03 VV. The Invasion (parts 1–4).iso
 3
index bc065c4..9b9d717 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !adir D/Doctor Who—The Lost TV Episodes (audio)/S01E04 D. Marco Polo
+!explen 25:00/10%
 
 -      The Roof of the World
 -      The Singing Sands
index 415a8e9..c556cc3 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !adir D/Doctor Who—The Lost TV Episodes (audio)/S03E05 W. The Massacre of St Bartholomew's Eve
+!explen 25:00/6%
 
 -      War of God
 -      The Sea Beggar
index 0618e70..9ae836d 100644 (file)
@@ -1,5 +1,7 @@
 ;;; -*-fundamental-*-
 
+!explen 25:00/6%
+
 !adir D/Doctor Who—The Lost TV Episodes (audio)/S03E02 T-A. Mission to the Unknown
 -,ep=0 Mission to the Unknown
 
index bf957e6..e44d4d7 100644 (file)
@@ -3,6 +3,7 @@
 !adir D/Doctor Who—The Lost TV Episodes (audio)/S06E06 YY. The Space Pirates
 !iso D/Doctor Who—Lost in Time/03. Troughton era, seasons 5 & 6.iso
 !epname The Space Pirates—Part
+!explen 24:00/6%
 
 -
 18
index c371983..6dc9630 100644 (file)
@@ -2,6 +2,7 @@
 
 !adir D/Doctor Who—The Lost TV Episodes (audio)/S03E09 AA. The Savages
 !epname The Savages—Part
+!explen 25:00/6%
 
 -
 -
index f92af2a..2c2a695 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !epname Doctor Who and the Silurians—Part
+!explen 24:00/6%
 
 !iso D/Doctor Who/S07E02 BBB. Doctor Who and the Silurians (parts 1–4).iso
 3
index 01de4ef..44c0deb 100644 (file)
@@ -2,6 +2,7 @@
 
 !adir D/Doctor Who—The Lost TV Episodes (audio)/S04E01 CC. The Smugglers
 !epname The Smugglers—Part
+!explen 24:00/6%
 
 -
 -
index c1963c3..aef5e55 100644 (file)
@@ -3,6 +3,7 @@
 !adir D/Doctor Who—The Lost TV Episodes (audio)/S05E02 NN. The Abominable Snowmen
 !iso D/Doctor Who—Lost in Time/03. Troughton era, seasons 5 & 6.iso
 !epname The Abominable Snowmen—Part
+!explen 24:00/6%
 
 -
 12
index d808679..bcc414a 100644 (file)
@@ -2,6 +2,7 @@
 
 !adir D/Doctor Who—The Lost TV Episodes (audio)/S03E07 Y. The Celestial Toymaker
 !iso D/Doctor Who—Lost in Time/01. Hartnell era.iso
+!explen 25:20/10%
 
 -      The Celestial Toyroom
 -      The Hall of Dolls
index 1205e2b..4a69cc3 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !epname The War Games—Part
+!explen 23:40/6%
 
 !iso D/Doctor Who/S06E07 ZZ. The War Games (parts 1–5).iso
 3
index 7eb3635..1cf513b 100644 (file)
@@ -3,6 +3,7 @@
 !adir D/Doctor Who—The Lost TV Episodes (audio)/S05E07 SS. The Wheel in Space
 !iso D/Doctor Who—Lost in Time/03. Troughton era, seasons 5 & 6.iso
 !epname The Wheel in Space—Part
+!explen 23:00/10%
 
 -
 -
index e87d2fd..db9acdc 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir E/Engrenages
+!explen 53:00/15%
 
 !season 1
 1
@@ -48,7 +49,7 @@
 3
 4
 5
-6
+6,l=1:08:00
 
 !season 5
 3
index a1607e6..cc9be89 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir E/The Equalizer (1985)
+!explen 46:30
 
 !season 1
 3      Pilot
@@ -51,8 +52,8 @@
 3      Re-Entry
 
 !season 3
-2      Blood & Wine (part 1)
-3      Blood & Wine (part 2)
+2,l=43:30 Blood & Wine (part 1)
+3,l=51:00 Blood & Wine (part 2)
 4      Suspicion of Innocence
 5      In the Money
 2      Encounter in a Closed Room
index 547532c..2282848 100644 (file)
@@ -1,5 +1,7 @@
 ;;; -*-fundamental-*-
 
+!explen 31:00/10%
+
 !season 1
 !iso F/Fawlty Towers/Series One.iso
 1      A Touch of Class
@@ -12,7 +14,7 @@
 !season 2
 !iso F/Fawlty Towers/Series Two.iso
 1      Communication Problems
-2      The Psychiatrist
+2,l=36:00 The Psychiatrist
 3      Waldorf Salad
 4      The Kipper and the Corpse
 5      The Anniversary
index 583b8f2..eba33fa 100644 (file)
@@ -1,8 +1,9 @@
 ;;; -*-fundamental-*-
 
 !vdir F/Firefly
+!explen 42:00
 
-1      Serenity
+1,l=2x Serenity
 2      The Train Job
 3      Bushwhacked
 1      Shindig
@@ -19,4 +20,4 @@
 
 !season -
 !iso S/Serenity.iso
-1      Serenity
+1,l=1:54:00 Serenity
index a2da494..6ae230f 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir P/Monty Python's Flying Circus (restored)
+!explen 30:10/10%
 
 !season 1
 2,ch=2 Whither Canada?
@@ -45,7 +46,7 @@
 6,ch=2 E. Henry Tripshaw's Disease
 2,ch=2 Dennis Moore
 3,ch=2 A Book at Bedtime
-4,ch=2 Grandstand
+4,ch=2,l=26:30 Grandstand
 
 !season 4
 2,ch=2 The Golden Age of Ballooning
index 629237a..7475c7c 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir P/Monty Python's Flying Circus (sketches)
+!explen 30:10/10%
 
 ;;;--------------------------------------------------------------------------
 !season 1
        Still More Dennis Moore
        ‘Prejudice’
 
-7 A Book at Bedtime
+7,l=26:41 A Book at Bedtime
        ‘A Book at Bedtime’: ‘Redgauntlet’
        McKamikaze Scotsmen
        No Time to Lose
        ‘Dad's Doctors’ (trail)
        ‘Dad's Pooves’ (trail)
 
-8 Grandstand
+8,l=26:30 Grandstand
        Thames TV introduction
        ‘Light Entertainment Awards’: Dickie Attenborough
        The Oscar Wilde sketch
index a81d6ea..5b4521e 100644 (file)
@@ -1,12 +1,13 @@
 ;;; -*-fundamental-*-
 
 !vdir F/A Bit of Fry and Laurie
+!explen 29:30
 
 ;;;--------------------------------------------------------------------------
 !season 1
 !epno 0
 
-3      Pilot
+3,l=36:00 Pilot
        Customs camera; Holiday photographs; Problems around the eye area; The privatisation of the police force
        Critics; Deodorant; ‘How Lovely I Was’; Soup/suit
        Mystery (song); You can't make an omelette (Gordon & Stuart 1); The word ‘gay’; Toy car showroom
index 054674d..b4cb371 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir G/Game of Thrones
+!explen 1:03:00/25%
 
 !season 1
 1      Winter Is Coming
index 272d8b2..cc958d0 100644 (file)
@@ -3,6 +3,7 @@
 !vdir S/George Smiley
 
 !season 1 Tinker, Tailor, Soldier, Spy
+!explen 45:30/10%
 2
 3
 4
@@ -12,6 +13,7 @@
 4
 
 !season 2 Smiley's People
+!explen 56:00/10%
 3
 4
 5
index 4dc3150..8ed54e9 100644 (file)
@@ -1,9 +1,10 @@
 ;;; -*-fundamental-*-
 
 !vdir G/Gotham
+!explen 41:00/6%
 
 !season 1
-3      Pilot
+3,l=48:00 Pilot
 4      Selina Kyle
 5      The Balloonman
 7      Arkham
index 123542b..a56bea7 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir H/Hannibal
+!explen 41:30
 
 !season 1
 3      Apéritif
index 905f3dc..682cf78 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !iso H/The Hitchhiker's Guide to the Galaxy/Episodes.iso
+!explen 33:00/10%
 
 1
 2
index 9ed53f9..397c1d6 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir H/House of Cards
+!explen 55:00/10%
 
 !season 1 House of Cards
 3
index 416b211..5c6eb8c 100644 (file)
@@ -1,8 +1,9 @@
 ;;; -*-fundamental-*-
 
 !vdir I/I Claudius
+!explen 52:00/10%
 
-1      A Touch of Murder
+1,l=2x A Touch of Murder
 2      Waiting in the Wings
 3      What Shall We Do About Claudius
 2      Poison is Queen
index 84b4d0b..f1bd76e 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir I/Into the Labyrinth
+!explen 26:00
 
 !season 1
 2      Rothgo
index 150c2f4..2dc22a7 100644 (file)
@@ -1,9 +1,10 @@
 ;;; -*-fundamental-*-
 
 !vdir K/Knight Rider
+!explen 46:00
 
 !season 1
-2      Knight of the Phoenix
+2,l=2x Knight of the Phoenix
 1      Deadly Maneuvers
 2      Good Day at White Rock
 3      Slammin' Sammy's Stunt Show Spectacular
@@ -26,7 +27,7 @@
 1      Short Notice
 
 !season 2
-1      Goliath
+1,l=2x Goliath
 2      Brother's Keeper
 3      Merchants of Death
 1      Blind Spot
 3      White-Line Warriors
 4      Race for Life
 1      Speed Demons
-2      Goliath Returns
+2,l=2x Goliath Returns
 3      A Good Knight's Work
-1      Mouth of the Snake
+1,l=2x Mouth of the Snake
 2      Let It Be Me
 3      Big Iron
 
 !season 3
-5      Knight of the Drones
+5,l=2x Knight of the Drones
 6      The Ice Bandits
 7      Knights of the Fast Lane
 5      Halloween Knight
@@ -72,7 +73,7 @@
 7      Circus Knights
 
 !season 4
-5      Knight of the Juggernaut
+5,l=2x Knight of the Juggernaut
 6      KITTnap
 7      Sky Knight
 5      Burial Ground
@@ -96,4 +97,4 @@
 
 !season -
 !iso K/Knight Rider/S01D08. E21.iso
-2 Knight Rider 2000
+2,l=2x Knight Rider 2000
index f3fe253..42e755e 100644 (file)
--- a/lexx.epls
+++ b/lexx.epls
@@ -3,11 +3,14 @@
 !vdir L/Lexx
 
 !season 1
+!explen 1:30:00
 1      I Worship His Shadow
 1      Super Nova
 1      Eating Pattern
 1      Giga Shadow
 
+!explen 45:00/7%
+
 !season 2
 1      Mantrid
 2      Terminal
index a2900ce..018607e 100644 (file)
@@ -1,9 +1,10 @@
 ;;; -*-fundamental-*-
 
 !vdir L/Lois and Clark—The New Adventures of Superman
+!explen 43:30
 
 !season 1
-2      Pilot
+2,l=2x Pilot
 3      Strange Visitor (from Another Planet)
 2      Neverending Battle
 3      I'm Looking Through You
index 9e6e878..3bf7b1f 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir M/MacGyver
+!explen 46:00
 
 !season 1
 1      Pilot
 
 !season -
 !iso M/MacGyver/TV movies.iso
-1      Lost Treasure of Atlantis
-2      Trail to Doomsday
+1,l=2x Lost Treasure of Atlantis
+2,l=2x Trail to Doomsday
diff --git a/mkm3u b/mkm3u
index 32b9bf2..982475c 100755 (executable)
--- a/mkm3u
+++ b/mkm3u
@@ -437,6 +437,29 @@ class Playlist (object):
             f.write("#EXTINF:%d,,%s: %s\n%s\n" %
                     (ch.duration, label, ch.title, ch.url))
 
+DEFAULT_EXPVAR = 0.05
+R_DURMULT = RX.compile(r""" ^
+        (\d+ (?: \. \d+)?) x
+$ """, RX.X)
+R_DUR = RX.compile(r""" ^
+        (?: (?: (\d+) :)? (\d+) :)? (\d+)
+        (?: / (\d+ (?: \. \d+)?) \%)?
+$ """, RX.X)
+def parse_duration(s, base = None, basevar = DEFAULT_EXPVAR):
+  if base is not None:
+    m = R_DURMULT.match(s)
+    if m is not None: return base*float(m.group(1)), basevar
+  m = R_DUR.match(s)
+  if not m: raise ExpectedError("invalid duration spec `%s'" % s)
+  hr, min, sec = map(lambda g: filter(m.group(g), int, 0), [1, 2, 3])
+  var = filter(m.group(4), lambda x: float(x)/100.0)
+  if var is None: var = DEFAULT_EXPVAR
+  return 3600*hr + 60*min + sec, var
+def format_duration(d):
+  if d >= 3600: return "%d:%02d:%02d" % (d//3600, (d//60)%60, d%60)
+  elif d >= 60: return "%d:%02d" % (d//60, d%60)
+  else: return "%d s" % d
+
 MODE_UNSET = 0
 MODE_SINGLE = 1
 MODE_MULTI = 2
@@ -449,6 +472,7 @@ class EpisodeListParser (object):
     me._series = {}; me._vdirs = {}; me._audirs = {}; me._isos = {}
     me._series_wanted = series_wanted
     me._chaptersp = chapters_wanted_p
+    me._explen, me._expvar = None, DEFAULT_EXPVAR
     if series_wanted is None: me._mode = MODE_UNSET
     else: me._mode = MODE_MULTI
 
@@ -535,6 +559,12 @@ class EpisodeListParser (object):
       me._cur_episode = me._cur_chapter = None
       me._pl.done_season()
 
+    elif cmd == "explen":
+      w = ww.rest(); check(w is not None, "missing duration spec")
+      d, v = parse_duration(w)
+      me._explen = d
+      if v is not None: me._expvar = v
+
     elif cmd == "epname":
       for k, v in me._keyvals(opts): me._bad_keyval("epname", k, v)
       name = ww.rest(); check(name is not None, "missing episode name")
@@ -579,6 +609,7 @@ class EpisodeListParser (object):
       w = ww.rest(); check(w is not None, "missing count"); n = getint(w)
       src = me._auto_epsrc(series)
       src.nuses += n
+
     else:
       raise ExpectedError("unknown command `%s'" % cmd)
 
@@ -586,6 +617,7 @@ class EpisodeListParser (object):
 
     opts = ww.nextword(); check(opts is not None, "missing title/options")
     ti = None; sname = None; neps = 1; epi = None; loch = hich = None
+    explen, expvar, explicitlen = me._explen, me._expvar, False
     for k, v in me._keyvals(opts):
       if k is None:
         if v.isdigit(): ti = int(v)
@@ -594,6 +626,11 @@ class EpisodeListParser (object):
       elif k == "s": sname = v
       elif k == "n": neps = getint(v)
       elif k == "ep": epi = getint(v)
+      elif k == "l":
+        if v == "-": me._explen, me._expvar = None, DEFAULT_EXPVAR
+        else:
+          explen, expvar = parse_duration(v, explen, expvar)
+          explicitlen = True
       elif k == "ch":
         try: sep = v.index("-")
         except ValueError: loch, hich = getint(v), None
@@ -620,6 +657,17 @@ class EpisodeListParser (object):
       except KeyError: src = me._auto_epsrc(series)
 
     episode = season.add_episode(epi, neps, title, src, ti, loch, hich)
+
+    if episode.duration != -1 and explen is not None:
+      if not explicitlen: explen *= neps
+      if not explen*(1 - expvar) <= episode.duration <= explen*(1 + expvar):
+        if season.i is None: epid = "episode %d" % epi
+        else: epid = "episode %d.%d" % (season.i, epi)
+        raise ExpectedError \
+          ("%s duration %s %g%% > %g%% from expected %s" %
+             (epid, format_duration(episode.duration),
+              abs(100*(episode.duration - explen)/explen), 100*expvar,
+              format_duration(explen)))
     me._pl.add_episode(episode)
     me._cur_episode = episode
 
index 0148432..a9dfdb3 100644 (file)
@@ -1,5 +1,7 @@
 ;;; -*-fundamental-*-
 
+!explen 1:40:00
+
 !season -
 !iso M/Inspector Morse/01. The Dead of Jericho; The Silent World of Nicholas Quinn.iso
 2      The Dead of Jericho
index 0bf0c83..8fca34f 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir P/Person of Interest
+!explen 42:00
 
 !season 1
 3      Pilot
index 2a9abf5..11d6c4b 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir R/Robin of Sherwood
+!explen 50:00/10%
 
 !season 1
 3      Robin Hood and the Sorcerer (part 1)
index 71144a0..ec253d8 100644 (file)
--- a/rome.epls
+++ b/rome.epls
@@ -1,11 +1,12 @@
 ;;; -*-fundamental-*-
 
 !vdir R/Rome
+!explen 52:00/15%
 
 !season 1
 1      The Stolen Eagle
 2      How Titus Pullo Brought down the Republic
-3      An Owl in a Thornbush
+3,l=42:30 An Owl in a Thornbush
 1      Stealing from Saturn
 2      The Ram Has Touched the Wall
 3      Egeria
@@ -26,4 +27,4 @@
 1      Death Mask
 2      A Necessary Fiction
 1      Deus impeditio esuritori nullus (No God Can Stop a Hungry Man)
-2      De patre vostro (About Your Father)
+2,l=1:05:00 De patre vostro (About Your Father)
index 985fd97..d1d589c 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir S/Sanctuary
+!explen 45:00
 
 !season 1
 5      Sanctuary for All (part 1)
index b0f935a..88caf58 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir S/Sapphire and Steel
+!explen 26:20/10%
 
 !season 1 Assignment One
 2
index 51ca763..2373161 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir S/Shark
+!explen 41:30
 
 !season 1
 2      Pilot
index 65372ed..5493e92 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir H/Sherlock Holmes (1984)
+!explen 51:00/10%
 
 !season 1 The Adventures of Sherlock Holmes
 1      A Scandal in Bohemia
 1      The Abbey Grange
 2      The Man with the Twisted Lip
 3      The Six Napoleons
-1      The Sign of Four
+1,l=2x The Sign of Four
 1      The Devil's Foot
 2      Silver Blaze
 3      Wisteria Lodge
 4      The Bruce Partington Plans
-1      The Hound of the Baskervilles
+1,l=2x The Hound of the Baskervilles
 
 !season 3 The Casebook of Sherlock Holmes
 1      The Disappearance of Lady Frances Carfax
@@ -39,9 +40,9 @@
 4      The Boscombe Abbey Mystery
 1      The Illustrious Client
 2      The Creeping Man
-1      The Master Blackmailer
-1      The Last Vampyre
-1      The Eligible Bachelor
+1,l=2x The Master Blackmailer
+1,l=2x The Last Vampyre
+1,l=2x The Eligible Bachelor
 
 !season 4 The Memoirs of Sherlock Holmes
 1      The Three Gables
index 94835eb..2e22cb3 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir S/Smallville
+!explen 45:00/15%
 
 !season 1
 2      Pilot
 4      Subterranean
 5      Hydro
 2      Justice
-3      Labyrinth
+3,l=38:00 Labyrinth
 4      Crimson
 5      Trespass
 2      Freak
 6      Idol
 3      Pandora
 4      Disciple
-5      Absolute Justice
+5,l=2x Absolute Justice
 3      Warrior
 4      Persuasion
 5      Conspiracy
 5      Booster
 6      Dominion
 3      Prophecy
-4      Finale
+4,l=2x Finale
index 3a996bc..e383c48 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir S/Spartacus
+!explen 53:00/12%
 
 !season 0 Gods of the Arena
 2      Past Transgressions
@@ -8,7 +9,7 @@
 6      Paterfamilias
 8      Beneath the Mask
 3      Reckoning
-5      The Bitter End
+5,l=1:06:00 The Bitter End
 
 !season 1 Blood and Sand
 2      The Red Serpent
index bb81e42..63ba7cd 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir S/Spooks
+!explen 58:00
 
 !season 1
 3      Thou Shalt Not Kill
 
 !season -
 !iso S/Spooks—The Greater Good.iso
-7      The Greater Good
+7,l=1:40:00 The Greater Good
index a9ae2c4..2ad7791 100644 (file)
@@ -1,5 +1,7 @@
 ;;; -*-fundamental-*-
 
+!explen 42:30
+
 !series:movie Stargate
 
 !series:sg1 Stargate SG-1
 !season:movie -
 
 !iso:movie S/Stargate.iso
-movie,14 Stargate
+movie,14,l=2:05:00 Stargate
 
 ;;;--------------------------------------------------------------------------
 !season:sg1 1
 
-sg1,5  Children of the Gods
+sg1,5,l=1:30:00 Children of the Gods
 sg1,6  The Enemy Within
 sg1,7  Emancipation
 sg1,7  The Broca Divide
@@ -202,7 +204,7 @@ sg1,2,n=2 Lost City (parts 1&2)
 !season:sga 1
 
 sg1,10,n=2 New Order (parts 1&2)
-sga,8  Rising
+sga,8,l=2x Rising
 
 sg1,11 Lockdown
 sga,12 Hide and Seek
@@ -249,7 +251,7 @@ sg1,9       Reckoning (part 2)
 sga,14 The Brotherhood
 sga,14 Letters from Pegasus
 
-sg1,12 Threads
+sg1,12,l=1:03:00 Threads
 sga,9  The Gift
 
 sg1,6  Moebius (part 1)
@@ -388,7 +390,7 @@ sga,4       First Strike
 
 !season:sg1 -
 !iso:sg1 S/Stargate—The Ark of Truth.iso
-sg1,2  Stargate—The Ark of Truth
+sg1,2,l=1:40:00 Stargate—The Ark of Truth
 
 ;;;--------------------------------------------------------------------------
 !season:sga 4
@@ -420,7 +422,7 @@ sga,7       The Last Man
 sga,3  Search and Rescue
 
 !iso:sg1 S/Stargate—Continuum.iso
-sg1,3  Stargate—Continuum
+sg1,3,l=1:35:00 Stargate—Continuum
 
 sga,4  The Seed
 sga,5  Broken Ties
index 716abde..b000122 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir T/Terminator—The Sarah Connor Chronicles
+!explen 41:30/10%
 
 !season 1
 3      Pilot
@@ -18,7 +19,7 @@
 4      Automatic for the People
 5      The Mousetrap
 6      Allison from Palmdale
-3      Goodbye to All That
+3,l=50:00 Goodbye to All That
 4      The Tower
 5      Brothers of Nablus
 6      Mr. Ferguson is Ill Today
index 3175c38..7f858a7 100644 (file)
@@ -1,15 +1,16 @@
 ;;; -*-fundamental-*-
 
 !vdir A/The Americans
+!explen 45:00/12%
 
 !season 1
-3      Pilot
+3,l=1:06:00 Pilot
 4      The Clock
 5      Gregory
 3      In Control
-4      COMINT
+4,l=38:00 COMINT
 5      Trust Me
-6      Duty and Honor
+6,l=39:00 Duty and Honor
 3      Mutually Assured Destruction
 4      Safe House
 5      Only You
@@ -22,7 +23,7 @@
 4      Cardinal
 5      The Walk In
 3      A Little Night Music
-4      The Deal
+4,l=50:30 The Deal
 5      Behind the Red Door
 6      Arpanet
 3      New Car
@@ -60,7 +61,7 @@
 5      Munchkins
 2      Dinner for Seven
 4      A Roy Rogers in Franconia
-5      Persona non grata
+5,l=52:00 Persona non grata
 
 !season 5
 4      Amber Waves
 6      Darkroom
 4      Dyatkovo
 5      The World Council of Churches
-6      The Soviet Division
+6,l=55:50 The Soviet Division
 
 !season 6
-4      Dead Hand
+4,l=54:00 Dead Hand
 5      Tchaikovsky
 6      Urban Transport Planning
 4      Mr. and Mrs. Teacup
-5      The Great Patriotic War
+5,l=58:00 The Great Patriotic War
 6      Rififi
-7      Harvest
-4      The Summit
+7,l=50:00 Harvest
+4,l=56:10 The Summit
 5      Jennings, Elizabeth
-6      START
+6,l=1:10:00 START
index a350c5b..ce4e7fe 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir B/The Bridge
+!explen 58:00
 
 !season 1
 3
index b5c562c..d948d3d 100644 (file)
@@ -1,6 +1,8 @@
 ;;; -*-fundamental-*-
 
 !iso D/The Day Today/Episodes.iso
+!explen 29:00
+
 1
 2
 3
index b3b57eb..dcd401a 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir K/The Killing
+!explen 57:00
 
 !season 1
 3
index 6ebea47..2355eae 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir N/The Night Manager
+!explen 57:30
 
 3
 4
index a55d838..ce12b1d 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir S/The Shield
+!explen 44:30/10%
 
 !season 1
 1      Pilot
@@ -59,7 +60,7 @@
 3      Hurt
 4      Cut Throat
 1      String Theory
-2      Back in the Hole
+2,l=1:00:00 Back in the Hole
 3      A Thousand Deaths
 1      Judas Priest
 2      Ain't That a Shame
@@ -87,7 +88,7 @@
 3      Exiled
 1      The Math of the Wrath
 2      Recoil
-3      Spanish Practices
+3,l=1:02:00 Spanish Practices
 
 !season 7
 1      Coefficient of Drag
index e8f942d..ff80971 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*-fundamental-*-
 
 !vdir W/The Wire
+!explen 1:00:00/10%
 
 !season 1
 1      The Target
@@ -58,7 +59,7 @@
 1      Misgivings
 2      A New Day
 3      That's Got His Own
-1      Final Grades
+1,l=1:19:00 Final Grades
 
 !season 5
 3      More with Less
@@ -70,4 +71,4 @@
 3      Took
 4      Clarifications
 5      Late Editions
-3      -30-
+3,l=1:33:00 -30-
index cba08c2..314f282 100644 (file)
@@ -1,9 +1,10 @@
 ;;; -*-fundamental-*-
 
 !vdir V/V (2009)
+!explen 40:00
 
 !season 1
-3      Pilot
+3,l=45:00 Pilot
 4      There Is No Normal Anymore
 5      A Bright New Day
 6      It's Only the Beginning
index d1d8858..bc82071 100644 (file)
@@ -1,9 +1,10 @@
 ;;; -*-fundamental-*-
 
 !vdir W/Waking the Dead
+!explen 1:55:00
 
 !season 1
-2      Waking the Dead
+2,l=1:40:00 Waking the Dead
 2      Burn Out
 2      The Blind Beggar
 2      A Simple Sacrifice