diff options
author | href <href@random.sh> | 2021-09-03 04:04:21 +0200 |
---|---|---|
committer | href <href@random.sh> | 2021-09-03 04:04:21 +0200 |
commit | 5399fc818cf821c75f9f19fd00bf7905ba7fe7e3 (patch) | |
tree | 00408724f9778cc7323b1459782a762626d39b6a /lib/lsg_irc/last_fm_plugin.ex | |
parent | assets.. (diff) |
various fixes, web client wip, pubsub events
Diffstat (limited to '')
-rw-r--r-- | lib/lsg_irc/last_fm_plugin.ex | 5 |
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 |