From ee91bed1f6d4eb661628811b786c3b7ad2ff11cd Mon Sep 17 00:00:00 2001 From: Marco Ziener Date: Thu, 14 Oct 2010 15:21:25 +0200 Subject: Fixed errors --- server/media.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server') 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, -- cgit v1.2.3