aboutsummaryrefslogtreecommitdiff
path: root/pl
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-03-30 00:31:49 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-03-30 00:31:49 +0200
commit294051cc6ae9ae7d7dc72a997d53442f3a015c45 (patch)
treede6bd469f89c7b4d52f9727eca99e6e66a875908 /pl
parent3168ebb6dd6bae5c7f492b780a5ae18fc981d578 (diff)
downloadEpisodeBrowser-294051cc6ae9ae7d7dc72a997d53442f3a015c45.tar.gz
Open episode online in absence of local copy.
Diffstat (limited to 'pl')
-rw-r--r--pl/local_episodes.pl9
1 files changed, 6 insertions, 3 deletions
diff --git a/pl/local_episodes.pl b/pl/local_episodes.pl
index 3839399..5eaf6b7 100644
--- a/pl/local_episodes.pl
+++ b/pl/local_episodes.pl
@@ -34,6 +34,9 @@ sort_episode_file(N, F) :-
setof(N_-F_, episode_file(N_, F_), S),
member(N-F, S).
-open_episode(N) :-
- episode_file(N, F),
- win_shell(open, F).
+% Open episode.
+
+episode_url(N) --> "https://gogoanime.fi/detective-conan-episode-", integer(N).
+
+open_episode(N) :- episode_file(N, F), !, win_shell(open, F).
+open_episode(N) :- atom_phrase(episode_url(N), U), win_shell(open, U).