diff options
author | Andreas <brawl@nyanya.de> | 2021-12-29 22:48:06 +0100 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2021-12-31 18:21:37 -0500 |
commit | 693b4ac98b74d2eaf8157f66d50921fdc9902353 (patch) | |
tree | 7868f68ac54ee99ce122503d72ab3bc833efbb23 /youtube/subscriptions.py | |
parent | 90b080b7bbe6da161877f3202a8843f43ce41e0e (diff) | |
download | yt-local-693b4ac98b74d2eaf8157f66d50921fdc9902353.tar.lz yt-local-693b4ac98b74d2eaf8157f66d50921fdc9902353.tar.xz yt-local-693b4ac98b74d2eaf8157f66d50921fdc9902353.zip |
Add application/vnd.ms-excel as CSV mime type
Windows sends application/vnd.ms-excel as MIME Type instead of text/csv
Signed-off-by: Jesús <heckyel@hyperbola.info>
Diffstat (limited to 'youtube/subscriptions.py')
-rw-r--r-- | youtube/subscriptions.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube/subscriptions.py b/youtube/subscriptions.py index 7a2bf7d..aa6101d 100644 --- a/youtube/subscriptions.py +++ b/youtube/subscriptions.py @@ -752,7 +752,7 @@ def import_subscriptions(): except (AssertionError, IndexError, defusedxml.ElementTree.ParseError) as e: return '400 Bad Request: Unable to read opml xml file, or the file is not the expected format', 400 - elif mime_type == 'text/csv': + elif mime_type in ('text/csv', 'application/vnd.ms-excel'): content = file.read().decode('utf-8') reader = csv.reader(content.splitlines()) channels = [] |