diff options
author | John Ankarström <john@ankarstrom.se> | 2022-04-07 21:16:20 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-04-07 21:16:20 +0200 |
commit | a58ea9929854bc9e7588c91c7d5c3c953f372627 (patch) | |
tree | 2060326b0139070c3119938836d66250d92721bd /pl | |
parent | 85add87933a1cb5a47049b87fbb224448385afae (diff) | |
download | EpisodeBrowser-a58ea9929854bc9e7588c91c7d5c3c953f372627.tar.gz |
Fix rate_episode.
Diffstat (limited to 'pl')
-rw-r--r-- | pl/episode_data.pl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pl/episode_data.pl b/pl/episode_data.pl index 557cddf..11bc22a 100644 --- a/pl/episode_data.pl +++ b/pl/episode_data.pl @@ -52,7 +52,11 @@ rate_episode(Ep, R) :- dif(R, 0), ( episode_rating(Ep, R) -> true - ; assert_episode_rating(Ep, R) + ; ( episode_rating(Ep, _) + -> retractall_episode_rating(Ep, _) + ; true + ), + assert_episode_rating(Ep, R) ). tv_original(Ep) :- episode_datum(Ep, 'Source', 'TV Original'). |