beets/docs
Emilio G. Cota c69e96432a importer: use tarfile.open to handle compressed archives
Call tarfile.open instead of tarfile.TarFile from the importer so that
we can import compressed tar archives.

Note that tarfile.TarFile does not handle compressed archives:
$ python3
Python 3.8.2 (default, Apr 27 2020, 15:53:34)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tarfile
>>> tf = tarfile.TarFile("Lagrimas.tar.bz2")
Traceback (most recent call last):
[...]
tarfile.ReadError: invalid header
>>>

But tarfile.open does deal with them:
$ python3
Python 3.8.2 (default, Apr 27 2020, 15:53:34)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tarfile
>>> tf = tarfile.open("Lagrimas.tar.bz2")
>>>

Tested:
$ ls Lagrimas/*.mp3 | wc -l
11
$ tar cjf Lagrimas.tar.bz2 Lagrimas/

- Before:
$ beet import Lagrimas.tar.bz2
extraction failed: invalid header
No files imported from /tmp/Lagrimas.tar.bz2

- After:
$ beet import Lagrimas.tar.bz2
[works]

Fixes #3606.
2020-05-31 23:35:31 -04:00
..
dev beets.io now supports HTTPS 2019-06-06 15:34:15 +02:00
guides beets.io now supports HTTPS 2019-06-06 15:34:15 +02:00
plugins add drop2beets to community plugins 2020-05-23 17:09:18 +02:00
reference Fix list -af example in documentation 2020-05-29 13:29:31 +02:00
changelog.rst importer: use tarfile.open to handle compressed archives 2020-05-31 23:35:31 -04:00
conf.py Version bump: 1.5.0 2019-05-30 20:08:03 -04:00
faq.rst Update a lot of URLs to use HTTPS 2019-06-05 03:11:49 +02:00
index.rst Replace the clinical "obsessive-compulsive" term 2019-11-02 23:26:14 +01:00
Makefile Add new livereload server for docs 2016-01-25 13:19:26 -08:00
modd.conf Switch to modd for live docs build 2017-12-21 11:39:08 -05:00