Can't import OPML with .opml extension #87
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: y20k/escapepod#87
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Describe the bug
Some podcast players export OPML files with
.opml
extension, but such file cannot be chosen in the "Import OPML" dialog. After I renamed the file to have.xml
extension, the import worked fine. Wikipedia even lists.opml
as the main file extension.To Reproduce
.opml
extension - in my case the file was namedsubscriptions.opml
and was generated by Castro on iOS.Expected behavior
.opml
file extension should be accepted by the file chooser dialog.Screenshots

Device:
Additional context
Other podcast players imported this file just fine (Tsacdop, Podverse and AntennaPod, all from F-Droid).
Hi @Darkyenus
Escapepod starts the file picker with a mime type filter. The filter is set to "text/xml" at the moment. Reading your bug report I was considering to widen the filter to "text/*" (all text file types).
For testing purposes I created a text file with OPML data, saved it as "feeds.opml", and uploaded it to my phone. The system file browser categorizes the file with an .opml extension as a binary file.
With a filter set to "text/*" one would still not be able to open .opml files.
I am a bit hesitant to open the filter to include binary files. I need to check if I can whitelist the .opml file extension.
❓ May I ask as what kind of file the opml file from Castro is identified on your phone - also BIN or TXT or ... ❓
It is classified as a BIN file, like in your screenshot.
By the way, it looks like AntennaPod (at least, I have uninstalled others already) just accepts any file and then shows an error message (a pretty ugly one) when parsing fails. Which, if it isn't possible to specify the filter through an extension or differently, might be a better way to go about this. The current way (
text/xml
) isn't bulletproof either, not all XMLs are OPML files, so it shouldn't be a significant problem.Alternatively, you could specify multiple MIME types and only allow
text/xml
and whatever MIME type is assigned to opml files (should be one ofapplication/xml
,text/xml
ortext/x-opml
, but will probably be a generic binary MIME type, likeapplication/octet-stream
or justapplication/*
). If it was my call, I'd allow justtext/xml
,text/x-opml
andapplication/*
. It wouldn't be perfect, but it would prevent the most obivous errors (like choosing a photo or something) and it would probably work no matter what MIME Android thinks.opml
s are.Just a note: Escapepod currently supports the import of OPML files of the type
application/xml
,text/xml
andtext/x-opml
(see Keys.kt).