Bug 489006 - Haruna will not play .gif files despite being able to
Summary: Haruna will not play .gif files despite being able to
Status: RESOLVED DUPLICATE of bug 480535
Alias: None
Product: Haruna
Classification: Applications
Component: generic (other bugs)
Version First Reported In: 1.1.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: george fb
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-22 20:16 UTC by BulletproofBears
Modified: 2024-06-22 20:33 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description BulletproofBears 2024-06-22 20:16:23 UTC
SUMMARY
Haruna is built on mpv which is perfectly capable of playing gif files, but haruna by default will not open any file that doesn't match a set of predefined mime types. (as defined https://invent.kde.org/search?group_id=1549&project_id=7802&repository_ref=master&scope=blobs&search=mp4) However, since Haruna is built on mpv which is capable of playing gifs, if you simply rename any .gif file to .mp4 and then attempt to open it in Haruna it will play as expected.

STEPS TO REPRODUCE
1. attempt to open a .gif file with Haruna
2. rename the .gif file to a .mp4 file
3. attempt to open the renamed file with Haruna

OBSERVED RESULT
Haruna will refuse to load the file when it has a .gif extension, but will load the exact same file and play it perfectly fine after it is renamed to a .mp4 extension, despite nothing about the file actually changing.

EXPECTED RESULT
Haruna should not prevent itself from playing .gif files if it's underlying mpv implementation is capable of playing them. (or any file extensions for that matter)

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.0.5
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0 
Qt Version: 6.71
Comment 1 BulletproofBears 2024-06-22 20:22:12 UTC
On closer inspection I'm not certain that the link I provided is correct. The code snippet that comes up with that search appears to be for the .desktop file of Haruna, but Haruna will not even play them if you use the "file>open file" selection window, which would mean it's not an issue with the .desktop file. (at least not solely the .desktop file) I'm not sure where else this logic would lie if it doesn't come up when searching for "mp4" through the code base, but presumably it's a fairly early check that is called whenever the user tries to load a file.

Additionally, Haruna displays a checkerboard background when playing .gif files (renamed to .mp4 files) with transparency. MPV does this too by default, but in my opinion a more end-user facing application like Haruna would benefit from the default being to display transparency as black (or whatever the background color is) by default, assuming that's possible to do with libmpv.
Comment 2 george fb 2024-06-22 20:33:19 UTC

*** This bug has been marked as a duplicate of bug 480535 ***