CappielloAntonio / tempo

An open source and lightweight music client for Subsonic, designed and built natively for Android.
GNU General Public License v3.0
862 stars 39 forks source link

[BUG] - Song titles surrounded by `<>` don't display in Tempo #213

Closed atmurr closed 1 month ago

atmurr commented 2 months ago

Describe the bug

Songs with titles like <example> don't display properly in Tempo, the name isn't shown. For a real song example, Motionless In White - </c0de>

Expected behavior

The name of the song displays in plain text, like in the Navidrome webui:

image

To Reproduce

  1. Have a song in your library titled <something>
  2. View it in Tempo
  3. Name doesn't display in library or player (in app or Android Auto)

Environment

Additional context

I created some test files with weird names, here's the result of that.

Navidrome webui:

image

Tempo:

GallowsDove commented 1 month ago

I did some testing and you're right, it seems to be caused by Html.fromHtml removing all tags. However I'm not sure why that's even used to preprocess all titles before displaying them, so I would need CappielloAntonio to elaborate on that.

CappielloAntonio commented 1 month ago

Good question, although now I don't even remember the reason for that check. I agree, it was too strong and invasive, but in its invasiveness it checked several strings that could pass as null and cause exceptions. Now I've eliminated the string rework almost everywhere, leaving it only for descriptions and in notes, often taken from last.fm and therefore more likely to contain dirty text. We'll see how it goes, but I expect an increase in crash cases.

Here is a test apk to test the fix.

app-notquitemy-debug.zip