mirror of
https://github.com/beetbox/beets.git
synced 2025-12-20 23:53:15 +01:00
Add 'tmpdir' option to convert plugin
Closes sampsyo/beets#1382 Add tmpdir setting document tmpdir setting
This commit is contained in:
parent
86559bcb1a
commit
ddca1b2e13
2 changed files with 5 additions and 1 deletions
|
|
@ -125,6 +125,7 @@ class ConvertPlugin(BeetsPlugin):
|
|||
},
|
||||
u'max_bitrate': 500,
|
||||
u'auto': False,
|
||||
u'tmpdir': None,
|
||||
u'quiet': False,
|
||||
u'embed': True,
|
||||
u'paths': {},
|
||||
|
|
@ -388,7 +389,8 @@ class ConvertPlugin(BeetsPlugin):
|
|||
fmt = self.config['format'].get(unicode).lower()
|
||||
if should_transcode(item, fmt):
|
||||
command, ext = get_format()
|
||||
fd, dest = tempfile.mkstemp('.' + ext)
|
||||
tmpdir = self.config['tmpdir'].get()
|
||||
fd, dest = tempfile.mkstemp('.' + ext, dir=tmpdir)
|
||||
os.close(fd)
|
||||
_temp_files.append(dest) # Delete the transcode later.
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -58,6 +58,8 @@ file. The available options are:
|
|||
default configuration) non-MP3 files over the maximum bitrate before adding
|
||||
them to your library.
|
||||
Default: ``no``.
|
||||
- **tmpdir**: The directory where temporary files will be stored during import.
|
||||
Default: none (system default),
|
||||
- **copy_album_art**: Copy album art when copying or transcoding albums matched
|
||||
using the ``-a`` option. Default: ``no``.
|
||||
- **dest**: The directory where the files will be converted (or copied) to.
|
||||
|
|
|
|||
Loading…
Reference in a new issue