Bug 439243

Summary: Elisa session restore cannot restore songs after editing their metadata with VLC
Product: [Applications] Elisa Reporter: Nagy Tibor <xnagytibor>
Component: generalAssignee: Matthieu Gallien <matthieu_gallien>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 21.04.2   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In: 21.12.1
Sentry Crash Report:
Attachments: test_before_VLC_edit.mp3
test_after_VLC_edit.mp3
before_session_restore.png
after_session_restore.png
vlc_edit.png

Description Nagy Tibor 2021-06-28 01:15:46 UTC
SUMMARY

After editing songs' metadata in VLC, Elisa's session restore feature becomes unable to restore those songs on the currently playing playlist when reopening Elisa.

STEPS TO REPRODUCE

1. Get an MP3, FLAC, OGG or Opus file [Attachment: test_before_VLC_edit.mp3]
2. Make a copy of this file
3. Open the copy in VLC, Tools -> Media Information -> General tab [Attachment: vlc_edit.png]
4. Edit the metadata, then save it with the "Save Metadata" button [Attachment: test_after_VLC_edit.mp3]
5. Open both files in Elisa [Attachment: before_session_restore.png]
6. Quit Elisa with Hamburger -> Quit
7. Reopen Elisa. It doesn't restore the second song with edited metadata [Attachment: after_session_restore.png]

SOFTWARE/OS VERSIONS

Operating System: KDE neon 5.22
KDE Plasma Version: 5.22.2
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.3
VLC Version: 3.0.9.2 Vetinari
Comment 1 Nagy Tibor 2021-06-28 01:16:35 UTC
Created attachment 139705 [details]
test_before_VLC_edit.mp3
Comment 2 Nagy Tibor 2021-06-28 01:17:00 UTC
Created attachment 139706 [details]
test_after_VLC_edit.mp3
Comment 3 Nagy Tibor 2021-06-28 01:17:48 UTC
Created attachment 139707 [details]
before_session_restore.png
Comment 4 Nagy Tibor 2021-06-28 01:18:14 UTC
Created attachment 139708 [details]
after_session_restore.png
Comment 5 Nagy Tibor 2021-06-28 01:18:31 UTC
Created attachment 139709 [details]
vlc_edit.png
Comment 6 Nagy Tibor 2021-09-23 23:22:23 UTC
MediaPlayList::enqueueRestoredEntries() breaks the playlist entries when their restored titles are not empty. VLC autopopulates the title metadata field with the current file name, that's why the repro steps trigger this issue.
Comment 7 Nagy Tibor 2021-12-12 23:55:08 UTC
The following MR seems to fix this issue. Couldn't test it yet though.
https://invent.kde.org/multimedia/elisa/-/merge_requests/308
Comment 8 Nagy Tibor 2021-12-14 22:10:25 UTC
That merge request fixed my issue.