diff options
author | John Ankarström <john@ankarstrom.se> | 2022-03-29 01:16:21 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-03-29 01:21:52 +0200 |
commit | 3168ebb6dd6bae5c7f492b780a5ae18fc981d578 (patch) | |
tree | 79bdf67442456d41967dc292ec5c9f9d5193289d /pl/episode_data.pl | |
parent | 9569f5a2e83a5241a75ca04325dafe60b2b93237 (diff) | |
download | EpisodeBrowser-3168ebb6dd6bae5c7f492b780a5ae18fc981d578.tar.gz |
Show all episodes, not just local copies.
Ideally, I'd like to distinguish them visually, but it is a bit
complicated. For now, I don't really care.
Diffstat (limited to 'pl/episode_data.pl')
-rw-r--r-- | pl/episode_data.pl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pl/episode_data.pl b/pl/episode_data.pl index c6a5f3a..0c43bdc 100644 --- a/pl/episode_data.pl +++ b/pl/episode_data.pl @@ -1,4 +1,5 @@ :- module(episode_data, [retract_episode/1, + last_episode/1, lookup_episode/3, lookup_episode_local/3, lookup_episode_remote/3]). @@ -21,6 +22,10 @@ detach :- % Interface. +last_episode(Ep) :- + setof(E, N^D^lookup_episode_local(E,N,D), Es), + last(Es, Ep). + lookup_episode(Ep, Name, Data) :- lookup_episode_local(Ep, Name, Data), !. lookup_episode(Ep, Name, Data) :- lookup_episode_remote(Ep, Name, Data). |