GNOME Bugzilla – Bug 633111
Cannot import MP3 files without extension
Last modified: 2020-03-17 08:54:37 UTC
I recently Imported all the songs from my Ipod back to my Laptop (Ubuntu 10.10 ext4) using a different program (rhythmbox). when i browse in Nautilus the files don't appear to have an extension (file name instead of file name.mp3) but they play just fine (also in Rhythmbox). When I try to import my files into Banshee, non of the files are imported.
Thank you for your bug report. Banshee has a "white list" of file extensions that it will try to import. The idea is to avoid spending time trying to import files which are not supported. Files without extensions are currently rejected by this filtering. I think we probably should try to import them anyway.
I think the whitelist is useful.
I really don't see us changing this; closing.
*** Bug 633966 has been marked as a duplicate of this bug. ***
*** Bug 638977 has been marked as a duplicate of this bug. ***
In Natty we moved to Banshee so people who would have imported any media using Rhythmbox from an iPod or related devices wont be able to play. This would be a bigger regression than the import time ;)
Is it not possible to just quickly check a file's MIME type the same way linux already seams to do? I don't know how it is done technically but linux systems seem to pretty much ignore file extensions, yet still know the MIME type - maybe it is logged in the filesystem or there is some file metadata in the file it's self... But I'm sure there is some API to quickly check file's MIME types...
Omar: I'm not really sure how that argument holds - if people had a collection in Rhythmbox, it should be fully converted to Banshee's format on first run (e.g. they shouldn't be doing a re-import operation). Banshee has no problem playing already imported media without file extensions. The reason we use an extension whitelist when importing from the filesystem is for performance. Detecting the mimetype properly means that the file must be opened, some bytes from the front of the file read, and then closed. Then these bytes must be checked against the mimetype registry, which means potentially more files may need to be opened, read, and closed. This is very slow when you contrast with simply iterating the filesystem. Therefore, I do not want to perform mimetype sniffing on all files. However, what I might suggest is that we perform the mimetype detection on files that do not have an extension at all. This would possibly be worth looking into. In the end though, the reason we have this extension-based whitelist is for the fastest possible directory iteration, and I do not want to compromise this by having to open/read/close excessively on files that won't be imported. If we find that there tend to be massive amounts of files on users' systems without a file extension and we cannot determine a common pattern as to why (e.g. to implement a blacklist), then I may recommend we leave things as-is. We should do some testing however.
(In reply to comment #8) > Omar: I'm not really sure how that argument holds - if people had a collection > in Rhythmbox, it should be fully converted to Banshee's format on first run > (e.g. they shouldn't be doing a re-import operation). Banshee has no problem > playing already imported media without file extensions. Thanks for getting this bug under consideration. Banshee failed to import songs from rhythmbox (imported from iPod shuffle a few months ago, see screenshot). Also many people prefer to do a clean install when a new Distro version reaches since upgrades have many problems. I just tried to open a mp3 file (without extension) by right clicking and selecting 'open with Banshee' it did not play.
Created attachment 180219 [details] image
I feel that "no extension" should be semi-whitelisted: Files without an extension should be checked for MIME type, and then that MIME type should be checked against the whitelist. It sounds fairly simple...
For most normal people this is viewed as a serious bug. If you can't import your music collection that contain music from various sources with and without file extensions, the program is useless. I think you have got your priorities backwards if you think that the import time is more important than the ability to reliably import all music that is working on other platforms. -Andy
Banshee is not under active development anymore and had its last code changes more than three years ago. Its codebase has been archived. Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Please feel free to reopen this ticket (or rather transfer the project to GNOME Gitlab, as GNOME Bugzilla is being shut down) if anyone takes the responsibility for active development again. See https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/264 for more info.