Bug 425563 - should treat \r in lyrics as new line
Summary: should treat \r in lyrics as new line
Status: VERIFIED FIXED
Alias: None
Product: Elisa
Classification: Applications
Component: general (show other bugs)
Version: 20.08.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Nate Graham
URL:
Keywords:
: 418072 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-08-19 19:02 UTC by ratijas
Modified: 2020-08-28 17:57 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.74


Attachments
track with \r in lyrics tag (698.69 KB, image/png)
2020-08-19 19:05 UTC, ratijas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ratijas 2020-08-19 19:02:36 UTC
SUMMARY

Not exactly sure about standardization of this feature, but I recall my iPod used to render all my media library's lyrics correctly, even so many of them apparently have always been containing \r instead of proper \n line breaks.

I could submit my copy of Red Hot Chili Peppers - Dani California to the attachment as an evidence, but I'm not sure about legal aspect of such action.

STEPS TO REPRODUCE
1. Get an audio file with \r line breaks in lyrics;
2. Enjoy huge one-liner.

OBSERVED RESULT

All lyrics text squashed in one logical line, split into multiple physical only at 'word' boundaries as usual.

EXPECTED RESULT

Normal verses, just as if using \n for line breaks.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Not relevant
(available in About System)
KDE Plasma Version: Not relevant
KDE Frameworks Version: Not relevant
Qt Version: 5.15.0-4

ADDITIONAL INFORMATION

I took the audio file of '1-01 Dani California.m4a' with python's mutagen library, and found there a '©lyr' tag containing lyrics with '\r' characters — just as i suspected.
Comment 1 ratijas 2020-08-19 19:05:36 UTC
Created attachment 131020 [details]
track with \r in lyrics tag
Comment 2 Nate Graham 2020-08-19 19:38:35 UTC
I probably some of these myself, having used iTunes in macOS 9 to add lyrics to some of my songs when I was a kid.
Comment 3 Nate Graham 2020-08-19 19:45:44 UTC
*** Bug 418072 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2020-08-19 19:46:18 UTC
In fact I do! MR incoming.
Comment 5 Bug Janitor Service 2020-08-19 19:50:22 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/148
Comment 6 Bug Janitor Service 2020-08-20 16:05:25 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kfilemetadata/-/merge_requests/5
Comment 7 Nate Graham 2020-08-21 04:53:39 UTC
Git commit 915860e939fae264578ba8f67e66a210d676a18e by Nate Graham.
Committed on 20/08/2020 at 16:04.
Pushed by ngraham into branch 'master'.

Convert old Mac line endings in lyrics tags

Qt automatically converts Windows-style line endings (`\r\n`) but not
old Mac line endings (`\r`), probably because it is a platform that has
been dead for over 20 years. However some people have songs with embedded
lyrics tags that were encoded on that platform, and as a result, these
lyrics do not show up properly in various places where lyrics can be
viewed, such as Elisa's context view and dolphin's Information Panel.

This commit replaces old Mac line endings with conventional UNIX-style
line endings. Windows line endings are not affected because
`QLatin1Char('\r')` does not match the windows style line ending as it
is only a single character.
FIXED-IN: 5.74

M  +1    -1    src/extractors/taglibextractor.cpp

https://invent.kde.org/frameworks/kfilemetadata/commit/915860e939fae264578ba8f67e66a210d676a18e
Comment 8 ratijas 2020-08-21 08:36:30 UTC
Can confirm. My 'Dani California' is all fixed by this commit. Good job, everyone!
Comment 9 Nate Graham 2020-08-21 13:48:17 UTC
Hooray!
Comment 10 Ricardo Alejandro García Gómez 2020-08-28 17:57:01 UTC
Lots of thanks! :-D