mkm3u, *.epls: Introduce single-series titles and forced single-series.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 30 Mar 2022 19:03:23 +0000 (20:03 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 30 Mar 2022 19:03:23 +0000 (20:03 +0100)
The former is a way to set a series title for a single-series episode
list.

The latter is a strange hack for `Doctor Who' to say that the `series'
are fake and shouldn't really be treated as such.

These aren't used by anything yet, but they will be.

87 files changed:
24.epls
a-team.epls
agent-carter.epls
agents-of-shield.epls
allo-allo.epls
andromeda.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
buck-rogers.epls
caprica.epls
cracker.epls
crow-stairway.epls
danger-mouse.epls
dark-angel.epls
dexter.epls
dollhouse.epls
drwho.epls
dune-2000.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
godfather-ii.epls
gotham.epls
hannibal.epls
harry-potter.epls
hhgttg.epls
house-of-cards.epls
i-claudius.epls
into-the-labyrinth.epls
it-2017.epls
kill-bill.epls
kingdom-of-heaven.epls
knight-rider.epls
lexx.epls
lois-and-clark.epls
macgyver.epls
metallica-s-and-m.epls
mkm3u
morse.epls
person-of-interest.epls
prime-suspect.epls
robin-of-sherwood.epls
rome.epls
sanctuary.epls
sapphire-and-steel.epls
shark.epls
sharpe.epls
sherlock-holmes.epls
smallville.epls
snyder-justice.epls
spartacus.epls
spooks.epls
state-of-play.epls
terminator-scc.epls
the-americans.epls
the-bridge.epls
the-day-today.epls
the-killing.epls
the-night-manager.epls
the-prisoner.epls
the-shield.epls
the-tripods.epls
the-wire.epls
the-young-ones.epls
traffik.epls
tru-calling.epls
twin-peaks.epls
ultraviolet.epls
v-1983.epls
v-2009.epls
waking-the-dead.epls
wonder-woman-1975.epls
worricker.epls
yes-minister.epls

diff --git a/24.epls b/24.epls
index 5d52e8c..58c30bc 100644 (file)
--- a/24.epls
+++ b/24.epls
@@ -2,6 +2,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")))))
 
+!title 24
 !vdir #/24
 !explen 42:00/10%
 
index 04a3c33..f9d2c2d 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title The A-Team
 !vdir A/The A-Team
 !explen 45:00
 
index fceccf3..1500204 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Agent Carter
 !vdir A/Agent Carter
 !explen 40:00
 
index d3a49a6..0a38b34 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Agents of SHIELD
 !vdir A/Agents of SHIELD
 !explen 40:00
 
index 90abc78..4ad3703 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title 'Allo 'Allo!
 !vdir A/'Allo 'Allo!
 !explen 36:00/40%
 
index c10a4a8..d331d9d 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Andromeda
 !vdir A/Andromeda
 !explen 42:30
 
index ecce3e6..a1376cb 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Babylon 5
 !vdir B/Babylon 5
 
 !explen 42:00/8%
index b2f1e02..9f51eb4 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Batman (1966)
 !vdir B/Batman (1966 series)
 !explen 24:00
 
index 635ced5..af29480 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Between the Lines
 !vdir B/Between the Lines
 !explen 51:00/20%
 
index 71a5e54..74dc111 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Blackadder
 !vdir B/Blackadder
 !explen 30:00/13%
 
index 48512ec..6014042 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Blake's 7
 !vdir B/Blake's 7
 !explen 51:00/6%
 
index 8c6861f..90124c7 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Brass Eye
 !season -
 !iso B/Brass Eye.iso
 
index c292d70..6807b7b 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Battlestar Galactica
 !vdir B/Battlestar Galactica (1978)
 !explen 46:00
 
index 7526322..340f3a8 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Battlestar Galactica 1980
 !vdir B/Battlestar Galactica 1980
 !explen 46:00
 
index 2457f20..db31140 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Battlestar Galactica (2003)
 !vdir B/Battlestar Galactica (2003)
 !explen 42:00/10%
 
index cd0600f..e118907 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Buck Rogers in the 25th Century
 !vdir R/Buck Rogers in the 25th Century
 !explen 46:00
 
index 787e737..63dfccb 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Caprica
 !vdir C/Caprica
 !explen 43:00
 
index edb2be0..ba97dc0 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Cracker
 !vdir C/Cracker
 
 !explen 50:00
index c676d57..7f652d1 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title The Crow: Stairway to Heaven
 !vdir C/The Crow—Stairway to Heaven
 !explen 43:00
 
index c187725..64c4b54 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Danger Mouse
 !explen 10:00/20%
 
 !iso D/Danger Mouse/Close Encounters of the Absurd Kind!.iso
index 32d94b4..80644fe 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Dark Angel
 !vdir D/Dark Angel
 !explen 42:00
 
index 3f48f24..3710e1f 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Dexter
 !vdir D/Dexter
 !explen 51:00/12%
 
index d06abef..81a5a58 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Dollhouse
 !vdir D/Dollhouse
 
 !season 1
index 6602a8b..8510cf9 100644 (file)
@@ -1,5 +1,8 @@
 ;;; -*-fundamental-*-
 
+!single
+!title Doctor Who
+
 !epname Part
 
 !series:masterplan
index a473700..1b17bf5 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Dune (2000)
 !vdir D/Dune (2000)
 
 !season 1 Dune
index db9acdc..936e71a 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Engrenages
 !vdir E/Engrenages
 !explen 53:00/15%
 
index cc9be89..f31f73e 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title The Equalizer (1985)
 !vdir E/The Equalizer (1985)
 !explen 46:30
 
index 2282848..b094d92 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Fawlty Towers
 !explen 31:00/10%
 
 !season 1
index eba33fa..f5eb2c3 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Firefly
 !vdir F/Firefly
 !explen 42:00
 
index 6ae230f..285bcc4 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Monty Python's Flying Circus
 !vdir P/Monty Python's Flying Circus (restored)
 !explen 30:10/10%
 
index 7475c7c..7f18cb0 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Monty Python's Flying Circus (sketches)
 !vdir P/Monty Python's Flying Circus (sketches)
 !explen 30:10/10%
 
index 1ea7d54..c267501 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title A Bit of Fry & Laurie
 !vdir F/A Bit of Fry & Laurie
 !explen 29:30
 
index b4cb371..20a562c 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Game of Thrones
 !vdir G/Game of Thrones
 !explen 1:03:00/25%
 
index cc958d0..815bbb2 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title George Smiley
 !vdir S/George Smiley
 
 !season 1 Tinker, Tailor, Soldier, Spy
index dd33056..afcabf0 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title The Godfather, Part II
 !epname The Godfather, Part II: Disc
 
 !iso G/The Godfather Trilogy/02A. Part II.iso
index 8ed54e9..19019cf 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Gotham
 !vdir G/Gotham
 !explen 41:00/6%
 
index a56bea7..9021c60 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Hannibal
 !vdir H/Hannibal
 !explen 41:30
 
index 7629de8..ed0f82f 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Harry Potter
 !season -
 
 !iso P/Harry Potter/01. Harry Potter and the Philosopher's Stone.iso
index 682cf78..689acb6 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title The Hitchhiker's Guide to the Galaxy
 !iso H/The Hitchhiker's Guide to the Galaxy/Episodes.iso
 !explen 33:00/10%
 
index 397c1d6..c35a0af 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title House of Cards
 !vdir H/House of Cards
 !explen 55:00/10%
 
index 5c6eb8c..3570456 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title I Claudius
 !vdir I/I Claudius
 !explen 52:00/10%
 
index f1bd76e..f105b97 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Into the Labyrinth
 !vdir I/Into the Labyrinth
 !explen 26:00
 
index 6fadbb1..ce72c92 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title It (2017)
 !epname It: Chapter
 
 !iso I/It (2017)/Chapter 1.iso
index 64d5047..b8ff8d1 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Kill Bill
 !epname Kill Bill, volume
 
 !iso K/Kill Bill/Volume 1.iso
index 746e363..132dfaa 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Kingdom of Heaven
 !epname Kingdom of Heaven, part
 
 !iso K/Kingdom of Heaven (Definitive Edition)/Main feature (part 1).iso
index 2dc22a7..0a4b78e 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Knight Rider
 !vdir K/Knight Rider
 !explen 46:00
 
index 42e755e..6dd32c9 100644 (file)
--- a/lexx.epls
+++ b/lexx.epls
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Lexx
 !vdir L/Lexx
 
 !season 1
index 1b0a03d..7132e1a 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Lois & Clark: The New Adventures of Superman
 !vdir L/Lois & Clark—The New Adventures of Superman
 !explen 43:30
 
index 3bf7b1f..a707619 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title MacGyver
 !vdir M/MacGyver
 !explen 46:00
 
index 8c41af0..096e3ee 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Metallica: S&M
 !epname Metallica: S&M, part
 
 !iso M/Metallica—S&M/Part 1.iso
diff --git a/mkm3u b/mkm3u
index 5d9841d..3eb16b1 100755 (executable)
--- a/mkm3u
+++ b/mkm3u
@@ -510,6 +510,8 @@ class Playlist (object):
     me.episodes = []
     me.epname, me.epnames = "Episode", "Episodes"
     me.nseries = 0
+    me.single_series_p = False
+    me.series_title = None
 
   def add_episode(me, episode):
     me.episodes.append(episode)
@@ -644,7 +646,19 @@ class EpisodeListParser (object):
     except ValueError: opts = None
     else: cmd, opts = cmd[:sep], cmd[sep + 1:]
 
-    if cmd == "series":
+    if cmd == "title":
+      for k, v in me._keyvals(opts): me._bad_keyval("title", k, v)
+      title = ww.rest(); check(title is not None, "missing title")
+      check(me._pl.series_title is None, "already set a title")
+      me._pl.series_title = title
+
+    elif cmd == "single":
+      for k, v in me._keyvals(opts): me._bad_keyval("single", k, v)
+      check(ww.rest() is None, "trailing junk")
+      check(not me._pl.single_series_p, "single-series already set")
+      me._pl.single_series_p = True
+
+    elif cmd == "series":
       name = None
       for k, v in me._keyvals(opts):
         if k is None: name = v
index 2f6df28..58bd81e 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Inspector Morse
 !explen 1:40:00
 !season -
 
index 8fca34f..8e4d28e 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Person of Interest
 !vdir P/Person of Interest
 !explen 42:00
 
index b18388a..73cce05 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Prime Suspect
 !vdir P/Prime Suspect
 !epname Part
 !explen 1:40:00
index 11d6c4b..d4ac886 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Robin of Sherwood
 !vdir R/Robin of Sherwood
 !explen 50:00/10%
 
index ec253d8..3b000a3 100644 (file)
--- a/rome.epls
+++ b/rome.epls
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Rome
 !vdir R/Rome
 !explen 52:00/15%
 
index d1d589c..7e3a985 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Sanctuary
 !vdir S/Sanctuary
 !explen 45:00
 
index ba7eab5..aa03323 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Sapphire & Steel
 !vdir S/Sapphire & Steel
 !explen 26:20/10%
 
index 2373161..749e900 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Shark
 !vdir S/Shark
 !explen 41:30
 
index 6854ee1..7f97599 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Sharpe
 !explen 1:40:00
 !season -
 
index 5493e92..bd77600 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Sherlock Holmes (1984)
 !vdir H/Sherlock Holmes (1984)
 !explen 51:00/10%
 
index 2e22cb3..d5a5d81 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Smallville
 !vdir S/Smallville
 !explen 45:00/15%
 
index 3a45a90..f01e6f4 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Justice League (Snyder cut)
 !season -
 
 !iso J/Justice League (Snyder cut)/Part 1.iso
index e383c48..f4caf2a 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Spartacus
 !vdir S/Spartacus
 !explen 53:00/12%
 
index 63ba7cd..e3a0920 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Spooks
 !vdir S/Spooks
 !explen 58:00
 
index 6aa7e14..ef55558 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title State of Play
 !vdir S/State of Play
 !explen 57:00
 
index 2b8402e..5ce945c 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Terminator: The Sarah Connor Chronicles
 !vdir T/Terminator—The Sarah Connor Chronicles
 !explen 41:30/10%
 
index 7f858a7..9f628e8 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title The Americans
 !vdir A/The Americans
 !explen 45:00/12%
 
index ce4e7fe..b7a8469 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title The Bridge
 !vdir B/The Bridge
 !explen 58:00
 
index d948d3d..9bb15ce 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title The Day Today
 !iso D/The Day Today/Episodes.iso
 !explen 29:00
 
index dcd401a..7c42f29 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title The Killing
 !vdir K/The Killing
 !explen 57:00
 
index 2355eae..049841a 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title The Night Manager
 !vdir N/The Night Manager
 !explen 57:30
 
index eeb41fc..18c8cc8 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title The Prisoner
 !vdir P/The Prisoner
 !explen 48:00
 
index ce12b1d..0b73cd1 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title The Shield
 !vdir S/The Shield
 !explen 44:30/10%
 
index 4b7e387..5d5eb89 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title The Tripods
 !vdir T/The Tripods
 !explen 25:00
 
index ff80971..89854fc 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title The Wire
 !vdir W/The Wire
 !explen 1:00:00/10%
 
index 1371b9a..30882a9 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title The Young Ones
 !vdir Y/The Young Ones
 !explen 33:30/10%
 
index 7fac60f..a525a90 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Traffik
 !vdir T/Traffik
 !explen 50:00
 
index c3bc67c..fc6ee8e 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Tru Calling
 !vdir T/Tru Calling
 !explen 42:00
 
index 0e4d5c6..c791bb2 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Twin Peaks
 !vdir T/Twin Peaks
 
 !explen 45:00
index 744dfac..c8cab44 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Ultraviolet
 !vdir U/Ultraviolet
 !explen 50:00
 
index 6487e59..6e5f6ca 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title V (1983)
 !vdir V/V (1983)
 !epname Part
 
index 314f282..d8802c5 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title V (2009)
 !vdir V/V (2009)
 !explen 40:00
 
index bc82071..d002c55 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Waking the Dead
 !vdir W/Waking the Dead
 !explen 1:55:00
 
index 290e444..d936086 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Wonder Woman (1975)
 !vdir W/Wonder Woman (1975)
 !explen 46:00/9%
 
index 9027f45..d4df7d7 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Worricker
 !season -
 !explen 1:35:00
 
index 0147cfa..7e60788 100644 (file)
@@ -1,5 +1,6 @@
 ;;; -*-fundamental-*-
 
+!title Yes Minister
 !vdir Y/Yes Minister
 !explen 29:00/6%