Bug 459608 - Sending m4a file to phone via KDE Connect changes extension to mp3.
Summary: Sending m4a file to phone via KDE Connect changes extension to mp3.
Status: CONFIRMED
Alias: None
Product: kdeconnect
Classification: Applications
Component: android-application (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
: 468924 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-09-24 15:14 UTC by Lucas Henderson
Modified: 2024-11-06 07:26 UTC (History)
4 users (show)

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 Lucas Henderson 2022-09-24 15:14:20 UTC
SUMMARY
***
When right clicking and sending an m4a audio file, the file that appears in android is renamed with an mp3 extension
***


STEPS TO REPRODUCE
1. have KDE Connect set up as normal, and file sharing enabled.
2. Create a file ending in .m4a on the computer sending the file. Actual content is irrelevant, can be empty, text, etc.
3. Right click that file in Dolphin, and choose "Send to '[android device name here]' via KDE Connect"
4. On the android device, navigate to the directory where KDE Connect is configured to deposit the file.

OBSERVED RESULT
The file has been renamed with a .mp3 extension. (Its contents are unaltered)

EXPECTED RESULT
The filename should remain unchanged

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
Distro: Arch Linux
Kernel: 5.19.9-arch1-1
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 2.98.0
Qt Version: 5.15.6
KDE Connect(Linux): 22.08.1
Android version: 10
Android kernel: 4.19.95
Phone model: Moto G Power 2021
KDE Connect(Android): 1.19.1

ADDITIONAL INFORMATION
Sending an m4a file from one Linux PC to another Linux PC does not result in this.
Comment 1 Lucas Henderson 2022-10-12 05:30:17 UTC
With further testing, I've found that .qt files get changed to .mov, and .jpeg files get changed to .jpg. I suspect something is mapping the extension to a mime type, then back to an extension. Why the extension is being modified at all, no idea.
Comment 2 Nicolas Fella 2022-11-04 11:45:25 UTC
I've debugged this a long time ago, and IIRC the problem is this:

When "saving" the file Android automatically appends an extension, so if we just passed the full filename to Android we'd end up with foo.bar.bar. To work around this we pass only foo and have Android append the extension based on the file type. Some types have more than one possible extension (e.g. jpg vs jpeg) so sometimes we end up with a different one than we started with.

I'm not saying there's no way to fix that, but if there is one I didn't find it back then
Comment 3 Wael CHLOUFTOU 2022-11-07 21:30:27 UTC
I can confirm.
In my case .ai (Adobe Illustrator files) got changed to .ps as extension.
Comment 4 Nicolas Fella 2023-04-24 21:53:43 UTC
*** Bug 468924 has been marked as a duplicate of this bug. ***
Comment 5 DaWe 2024-11-06 07:26:02 UTC
My .opus files got renamed to .oga and my Android music player can't play it. I hope it is possible to fix this bug, with that said, KDE Connect is still the best!