From e12dafae0488d82d05be9dfde3d99f9e3cbb0ce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Sat, 28 May 2022 20:50:33 +0200 Subject: Add option to show/hide other screenwriters. --- c/episodelistview.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'c/episodelistview.c') diff --git a/c/episodelistview.c b/c/episodelistview.c index 42c207d..c432497 100644 --- a/c/episodelistview.c +++ b/c/episodelistview.c @@ -364,26 +364,39 @@ ElvUpdate() GI(t,&cEp) return; for (iEp = 1, iItem = 0; iEp <= cEp; iEp++) { + extern char SzLimitScreenwriter[]; extern int BViewTVOriginal, BViewWatched; - if (!BViewWatched) { + if (SzLimitScreenwriter[0]) { + atom_t a1, a2; term_t t; - t = T(1); + t = T(3); + a1 = A("Screenwriter"); + a2 = A(SzLimitScreenwriter); PI(t,iEp) goto a; - P("track_episodes","watched",1,t) goto a; - continue; + PA(t+1,a1) goto a; + PA(t+2,a2) goto a; + P("episode_data","episode_datum",3,t) continue; } - a: if (!BViewTVOriginal) { + a: if (!BViewWatched) { term_t t; t = T(1); PI(t,iEp) goto b; - P("episode_data","tv_original",1,t) goto b; + P("track_episodes","watched",1,t) goto b; + continue; + } + + b: if (!BViewTVOriginal) { + term_t t; + t = T(1); + PI(t,iEp) goto c; + P("episode_data","tv_original",1,t) goto c; continue; } /* Format episode number string. */ - b: _stprintf_s(tszEpisode, sizeof(tszEpisode), TEXT("%d"), iEp); + c: _stprintf_s(tszEpisode, sizeof(tszEpisode), TEXT("%d"), iEp); /* Insert item. */ lviEpisode.iItem = iItem++; -- cgit v1.2.3