aboutsummaryrefslogtreecommitdiff
path: root/pl
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-04-07 00:22:37 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-04-07 00:22:37 +0200
commit966a203ff8409972aefe3dd7d243d36adaf21fce (patch)
treef15b8ffefb867a4b7ac95a49bd6170a3ed58f070 /pl
parentc4e5a91da5f50b01cbf46d70830fdb7e51413e29 (diff)
downloadEpisodeBrowser-966a203ff8409972aefe3dd7d243d36adaf21fce.tar.gz
Add "View TV Originals" option.
Diffstat (limited to 'pl')
-rw-r--r--pl/cfg.pl7
-rw-r--r--pl/episode_data.pl5
2 files changed, 11 insertions, 1 deletions
diff --git a/pl/cfg.pl b/pl/cfg.pl
index 90b1e94..c2eae86 100644
--- a/pl/cfg.pl
+++ b/pl/cfg.pl
@@ -38,3 +38,10 @@ get_view_watched(V) :-
integer(V), !
; V = 1
).
+
+set_view_tv_original(V) :- set_key('ViewTVOriginal', V).
+get_view_tv_original(V) :-
+ ( get_key('ViewTVOriginal', V),
+ integer(V), !
+ ; V = 1
+ ).
diff --git a/pl/episode_data.pl b/pl/episode_data.pl
index e944243..557cddf 100644
--- a/pl/episode_data.pl
+++ b/pl/episode_data.pl
@@ -2,7 +2,8 @@
retract_episode/1,
episode_count/1,
rate_episode/2,
- episode_rating/2]).
+ episode_rating/2,
+ tv_original/1]).
:- use_module(library(clpfd)).
:- use_module(library(dcg/basics)).
@@ -54,6 +55,8 @@ rate_episode(Ep, R) :-
; assert_episode_rating(Ep, R)
).
+tv_original(Ep) :- episode_datum(Ep, 'Source', 'TV Original').
+
% Remote data retrieval.
episode_number(Ep) --> integer(Ep).