summaryrefslogtreecommitdiff
path: root/lib/lsg_irc/last_fm_plugin.ex
diff options
context:
space:
mode:
authorhref <href@random.sh>2021-09-03 04:04:21 +0200
committerhref <href@random.sh>2021-09-03 04:04:21 +0200
commit5399fc818cf821c75f9f19fd00bf7905ba7fe7e3 (patch)
tree00408724f9778cc7323b1459782a762626d39b6a /lib/lsg_irc/last_fm_plugin.ex
parentassets.. (diff)
various fixes, web client wip, pubsub events
Diffstat (limited to '')
-rw-r--r--lib/lsg_irc/last_fm_plugin.ex5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/lsg_irc/last_fm_plugin.ex b/lib/lsg_irc/last_fm_plugin.ex
index 04f887c..0c6b8a6 100644
--- a/lib/lsg_irc/last_fm_plugin.ex
+++ b/lib/lsg_irc/last_fm_plugin.ex
@@ -98,8 +98,7 @@ defmodule LSG.IRC.LastFmPlugin do
username = case :dets.lookup(state.dets, id_or_user) do
[{_, username}] -> username
- _ ->
- id_or_user
+ _ -> id_or_user
end
case now_playing(username) do
@@ -108,7 +107,7 @@ defmodule LSG.IRC.LastFmPlugin do
{:ok, map} when is_map(map) ->
track = fetch_track(username, map)
text = format_now_playing(map, track)
- user = if account = IRC.Account.get(username) do
+ user = if account = IRC.Account.get(id_or_user) do
user = IRC.UserTrack.find_by_account(message.network, account)
if(user, do: user.nick, else: account.name)
else