aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-04-03 01:43:34 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-04-03 01:43:34 +0200
commit30824adc5ee4b97e58038fb2e244548255e19ab1 (patch)
treecaa2fd9b72be7e2d1ec052b4c27bbb40f036cbfb
parent388e5bf6f5c189c1f5657fded5246bb3b77a9dd9 (diff)
downloadEpisodeBrowser-30824adc5ee4b97e58038fb2e244548255e19ab1.tar.gz
Rename last_episode/1 to episode_count/1.
-rw-r--r--c/episodelistview.c8
-rw-r--r--pl/episode_data.pl6
2 files changed, 7 insertions, 7 deletions
diff --git a/c/episodelistview.c b/c/episodelistview.c
index 39b5c8a..cc300f4 100644
--- a/c/episodelistview.c
+++ b/c/episodelistview.c
@@ -163,7 +163,7 @@ s: ElvSetTop(iItem > 5? iItem-5: 0);
void
ElvUpdate()
{
- int iLast, iTop;
+ int iEpisodes, iTop;
LVITEM lviEpisode, lviName;
term_t t;
@@ -175,10 +175,10 @@ ElvUpdate()
lviName.mask = LVIF_TEXT;
t = T(1);
- P("episode_data","last_episode",1,t) return;
- GI(t,&iLast) return;
+ P("episode_data","episode_count",1,t) return;
+ GI(t,&iEpisodes) return;
- for (int i = 0; i < iLast; i++) {
+ for (int i = 0; i < iEpisodes; i++) {
char *szName;
int cb;
TCHAR *tszEpisode, *tszName;
diff --git a/pl/episode_data.pl b/pl/episode_data.pl
index f71e2cb..1d8fdef 100644
--- a/pl/episode_data.pl
+++ b/pl/episode_data.pl
@@ -1,5 +1,5 @@
:- module(episode_data, [retract_episode/1,
- last_episode/1,
+ episode_count/1,
lookup_episode/3,
lookup_episode_local/3,
lookup_episode_remote/3]).
@@ -23,10 +23,10 @@ detach :-
% Interface.
-last_episode(Ep) :-
+episode_count(N) :-
ensure,
setof(E, N^D^lookup_episode_local(E,N,D), Es),
- last(Es, Ep).
+ last(Es, N).
lookup_episode(Ep, Name, Data) :- lookup_episode_local(Ep, Name, Data), !.
lookup_episode(Ep, Name, Data) :- lookup_episode_remote(Ep, Name, Data).