Closed BiatuAutMiahn closed 5 months ago
Sorry, I didn't quite understand your request. The file mimetypemapping.json
maps file extensions to mime types, and the Music app doesn't have any own file extension to mime type mapping, but relies on the mime type reported by the cloud. So what else could we "inherit" from that file?
In the Music app proper, we scan and show all those files which have a mime type like audio/*
(but excluding the playlist-kind of mimes audio/mpegurl
and audio/x-scpls
). In the lite player used within the Files app, we have a hard-coded list of mime types handled as audio files:
https://github.com/owncloud/music/blob/951bd157252511e32e15ad125ed5c9a7de35bf61/js/embedded/main.js#L15-L25
And another list of mimes handled as playlist files: https://github.com/owncloud/music/blob/951bd157252511e32e15ad125ed5c9a7de35bf61/js/embedded/main.js#L29-L30
By default, .m4a files should get mapped to the mime type audio/mp4
, so you shouldn't really have any problems with this file type.
Eariler today I had to patch lib/Command/RegisterMimeTypes.php to add m4a before the scanner would pick up the m4a files in my library.
That command occ music:register-mime-types
is provided as a convenience utility to add mappings of the less common audio file types to the host Nextcloud or ownCloud instance. It doesn't include m4a because that type should be mapped by all cloud versions out-of-the-box. In the Nextcloud sources, the mapping is in the file resources/config/mimetypemapping.dist.json
here:
https://github.com/nextcloud/server/blob/6e39a159a484dfc39ccf9b6fa79e2a9b6a3b001d/resources/config/mimetypemapping.dist.json#L108
As far as I understood, this issue is some kind of misunderstanding on how the NC mime type system works. I don't believe there is anything for the Music app to do. Closing.
I ran into an issue where my library uses primarily .m4a files, and ended up going down a rabbit hole and found out that the app's mime types list is hardcoded. Can you guys implement inheriting NextCloud's
./config/mimetypemapping.json
?Thanks.