Skip to content

Commit

Permalink
convert: uses new par_map to work in parallel (#3830)
Browse files Browse the repository at this point in the history
Squashed 5 commits:
* convert: uses new par_map to work in parallel
* linting
* code review: remove unneeded list syntax
* linting
* changelog addition
  • Loading branch information
vvvrrooomm authored Jan 19, 2021
1 parent cbc045f commit 9587caf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions beetsplug/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"""Converts tracks or albums to external directory
"""
from __future__ import division, absolute_import, print_function
from beets.util import par_map

import os
import threading
Expand Down Expand Up @@ -183,8 +184,8 @@ def commands(self):

def auto_convert(self, config, task):
if self.config['auto']:
for item in task.imported_items():
self.convert_on_import(config.lib, item)
par_map(lambda item: self.convert_on_import(config.lib, item),
task.imported_items())

# Utilities converted from functions to methods on logging overhaul

Expand Down
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Changelog

New features:

* conversion uses par_map to parallelize conversion jobs in python3
* Add ``title_case`` config option to lastgenre to make TitleCasing optional.
* When config is printed with no available configuration a new message is printed.
:bug:`3779`
Expand Down

0 comments on commit 9587caf

Please sign in to comment.