fmbot-discord/fmbot

`fml` sometimes doesn't display a confirmation

rzumer opened this issue · 2 comments

Command to reproduce & Last.FM username:
.fml
Track-dependent, might have to do with some characters in the track name.
Fails on https://www.last.fm/music/%E3%82%BF%E3%83%A2%E3%83%AA/_/%E6%AD%8C%E8%88%9E%E4%BC%8E%E4%B8%AD%E7%B6%99%22%E4%B8%96%E6%83%85%E6%B5%AE%E5%90%8D%E8%8A%B1%E6%A8%A1%E8%B6%8A%22

Describe the bug:
fmbot is shown as typing, and loves the track as expected, but does not post any confirmation message.

Version (use.fmstatus):
public hosted bot (0.0.0.0)

This is as a result of the TrackUrl being null in trackinfo, causing an exception. Interestingly, the url for this track appears to be not well formed when checked in the Immediate Window, causing it to be set to null in GetTrackInfoAsync:

Uri.IsWellFormedUriString(trackInfo.TrackUrl, UriKind.Absolute); false

however, testing on dotnet fiddle, it appears to return True in .NET Framework and false in .NET 5:

.NET 5
.NET Framework

This may potentially be related to this issue, but I'd need to find the offending value in the URL:
dotnet/runtime#21626

in the meantime, I've opened #154 to fix the embed

th0mk commented

Seems like this is fixed now.