aboutsummaryrefslogtreecommitdiff
path: root/pl/cfg.pl
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-08-24 15:17:08 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-08-24 15:17:33 +0200
commit6fd66a9264731bd7ee6d7602675965021d929a4a (patch)
treee94fc63efb823ad2f5c9ef6de6188da389a08d38 /pl/cfg.pl
parentff48d644a45dd71098ecb9007a41807fb37d0081 (diff)
downloadEpisodeBrowser-6fd66a9264731bd7ee6d7602675965021d929a4a.tar.gz
Remove Prolog dependency.
The only thing left to reimplement is the tracking of watched episodes in MPC-HC.
Diffstat (limited to 'pl/cfg.pl')
-rw-r--r--pl/cfg.pl76
1 files changed, 0 insertions, 76 deletions
diff --git a/pl/cfg.pl b/pl/cfg.pl
deleted file mode 100644
index 297d426..0000000
--- a/pl/cfg.pl
+++ /dev/null
@@ -1,76 +0,0 @@
-:- module(cfg, [set_glob/1,
- get_glob/1,
- set_root/1,
- get_root/1,
- set_url/1,
- get_url/1]).
-
-:- use_module(library(registry)).
-
-set_key(Key, Value) :-
- registry_set_key(current_user/software/'JohnAJ'/'EpisodeBrowser'/'Settings', Key, Value).
-get_key(Key, Value) :-
- catch(registry_get_key(current_user/software/'JohnAJ'/'EpisodeBrowser'/'Settings', Key, Value),
- _,
- fail).
-
-set_root(V) :- set_key('EpisodeRoot', V).
-get_root(V) :-
- get_key('EpisodeRoot', V0),
- re_replace('\\\\', '/', V0, V1),
- atom_string(V, V1).
-
-set_glob(V) :- set_key('EpisodeGlob', V).
-get_glob(V) :-
- ( get_key('EpisodeGlob', V), !
- ; V = '*/*.*'
- ).
-
-set_url(V) :- set_key('UrlPrefix', V).
-get_url(V) :-
- ( get_key('UrlPrefix', V), !
- ; V = 'https://animixplay.to/v1/detective-conan/ep'
- ).
-
-set_view_watched(V) :- set_key('ViewWatched', V).
-get_view_watched(V) :-
- ( get_key('ViewWatched', 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
- ).
-
-set_limit_screenwriter(V) :- set_key('LimitScreenwriter', V).
-get_limit_screenwriter(V) :-
- ( get_key('LimitScreenwriter', V),
- atom(V), !
- ; V = ""
- ).
-
-set_sort(V) :- W is V + 2147483647, set_key('Sort', W).
-get_sort(V) :-
- ( get_key('Sort', W),
- integer(W), !,
- V is W - 2147483647
- ; V = 1
- ).
-
-set_focus(V) :- set_key('Focus', V).
-get_focus(V) :-
- ( get_key('Focus', V),
- integer(V), !
- ; V = 1
- ).
-
-set_dlv_height(V) :- set_key('DlvHeight', V).
-get_dlv_height(V) :-
- ( get_key('DlvHeight', V),
- integer(V), !
- ; V = 0
- ).