From d8ebc71f98f348780156c46a53ebbb8fb5ab0121 Mon Sep 17 00:00:00 2001 From: Tom Jaspers Date: Thu, 5 Feb 2015 09:47:30 +0100 Subject: [PATCH 1/3] Auto path detection: use clearer variable name Per sampsyo's suggestion See #1302 --- beets/library.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beets/library.py b/beets/library.py index 43cac66e8..e807d386a 100644 --- a/beets/library.py +++ b/beets/library.py @@ -1060,8 +1060,8 @@ def parse_query_parts(parts, model_cls): # Add path queries to aggregate query. # Match field / flexattr depending on whether the model has the path field - fast_query = 'path' in model_cls._fields - query.subqueries += [PathQuery('path', s, fast_query) for s in path_parts] + fast_path_query = 'path' in model_cls._fields + query.subqueries += [PathQuery('path', s, fast_path_query) for s in path_parts] return query, sort From 80c96d98deeb6951b79cb9ed52a07083706e18ef Mon Sep 17 00:00:00 2001 From: Tom Jaspers Date: Thu, 5 Feb 2015 10:54:42 +0100 Subject: [PATCH 2/3] Oops, flake8 formatting --- beets/library.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/beets/library.py b/beets/library.py index e807d386a..e4fbd1d49 100644 --- a/beets/library.py +++ b/beets/library.py @@ -1061,7 +1061,8 @@ def parse_query_parts(parts, model_cls): # Add path queries to aggregate query. # Match field / flexattr depending on whether the model has the path field fast_path_query = 'path' in model_cls._fields - query.subqueries += [PathQuery('path', s, fast_path_query) for s in path_parts] + query.subqueries += [PathQuery('path', s, fast_path_query) + for s in path_parts] return query, sort From 9b9c033df6bdedee0b76c6ea72d17bb5adc501fe Mon Sep 17 00:00:00 2001 From: David Logie Date: Sat, 7 Feb 2015 15:12:08 +0000 Subject: [PATCH 3/3] importfeeds: Fix Unicode error when writing files. --- beetsplug/importfeeds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beetsplug/importfeeds.py b/beetsplug/importfeeds.py index d1d21f839..b1e76d9a8 100644 --- a/beetsplug/importfeeds.py +++ b/beetsplug/importfeeds.py @@ -63,7 +63,7 @@ def _write_m3u(m3u_path, items_paths): mkdirall(m3u_path) with open(syspath(m3u_path), 'a') as f: for path in items_paths: - f.write(path + '\n') + f.write(path + b'\n') class ImportFeedsPlugin(BeetsPlugin):