aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--server/media.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/media.erl b/server/media.erl
index 9b58067..7c08caa 100644
--- a/server/media.erl
+++ b/server/media.erl
@@ -135,7 +135,7 @@ reset_votes(Artist, Title) ->
lock(Artist, Title) ->
F = fun() ->
[Head|_] = ask(Artist, Title),
- Votes = Head#track.votes - 1,
+ Votes = Head#track.lock = true,
New = Head#track{votes = Votes},
mnesia:write(New)
end,
@@ -144,7 +144,7 @@ lock(Artist, Title) ->
unlock(Artist, Title) ->
F = fun() ->
[Head|_] = ask(Artist, Title),
- Votes = Head#track.votes -1,
+ Votes = Head#track.lock = false,
New = Head#track{votes = Votes},
mnesia:write(New)
end,