Skip to content

Commit cc82e1c

Browse files
committed
Made the detailed output the default behaviour.
1 parent 023c13d commit cc82e1c

File tree

5 files changed

+9
-36
lines changed

5 files changed

+9
-36
lines changed

beets/config_default.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import:
2222
flat: no
2323
group_albums: no
2424
pretend: false
25-
detailed: false
2625

2726
clutter: ["Thumbs.DB", ".DS_Store"]
2827
ignore: [".*", "*~", "System Volume Information"]

beets/importer.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,16 +1299,11 @@ def manipulate_files(session, task):
12991299
def log_files(session, task):
13001300
"""A coroutine (pipeline stage) to log each file which will be imported
13011301
"""
1302-
detailed = config['import']['detailed'].get()
13031302
if isinstance(task, SingletonImportTask):
1304-
if detailed:
1305-
log.info(
1306-
'Singleton: {0}'.format(displayable_path(task.item['path'])))
1307-
else:
1308-
log.info(displayable_path(task.item['path']))
1303+
log.info(
1304+
'Singleton: {0}'.format(displayable_path(task.item['path'])))
13091305
elif task.items:
1310-
if detailed:
1311-
log.info('Album {0}'.format(displayable_path(task.paths[0])))
1306+
log.info('Album {0}'.format(displayable_path(task.paths[0])))
13121307
for item in task.items:
13131308
log.info(displayable_path(item['path']))
13141309

beets/ui/commands.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -947,10 +947,6 @@ def import_func(lib, opts, args):
947947
'--pretend', dest='pretend', action='store_true',
948948
help='just print the files to import'
949949
)
950-
import_cmd.parser.add_option(
951-
'--detailed', dest='detailed', action='store_true',
952-
help='use in conjunction with --pretend to get sophisticated output'
953-
)
954950
import_cmd.func = import_func
955951
default_commands.append(import_cmd)
956952

docs/reference/cli.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,6 @@ Optional command flags:
132132
option. If set, beets will just print a list of files that it would
133133
otherwise import.
134134

135-
* To get a more detailed output with the ``--pretend`` option, you can use the
136-
``--detailed`` flag. This way you can see which tracks beets think should
137-
belong to an album.
138-
139135
.. _rarfile: https://pypi.python.org/pypi/rarfile/2.2
140136

141137
.. only:: html

test/test_importer.py

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1573,9 +1573,7 @@ def __create_empty_import_dir(self):
15731573
os.makedirs(path)
15741574
self.empty_path = path
15751575

1576-
def __run(self, import_paths, singletons=True, detailed=False):
1577-
config['import']['detailed'] = detailed
1578-
1576+
def __run(self, import_paths, singletons=True):
15791577
self._setup_import_session(singletons=singletons)
15801578
self.importer.paths = import_paths
15811579

@@ -1589,35 +1587,24 @@ def __run(self, import_paths, singletons=True, detailed=False):
15891587

15901588
return logs
15911589

1592-
def test_import_pretend(self):
1590+
def test_import_singletons_pretend(self):
15931591
logs = self.__run(self.import_paths)
15941592

1595-
self.assertEqual(logs, self.import_files)
1596-
1597-
def test_import_pretend_empty(self):
1598-
logs = self.__run([self.empty_path])
1599-
1600-
self.assertEqual(logs, ['No files imported from {0}'
1601-
.format(displayable_path(self.empty_path))])
1602-
1603-
def test_import_singletons_pretend_detailed(self):
1604-
logs = self.__run(self.import_paths, detailed=True)
1605-
16061593
self.assertEqual(logs, [
16071594
'Singleton: %s' % self.import_files[0],
16081595
'Singleton: %s' % self.import_paths[1]])
16091596

1610-
def test_import_album_pretend_detailed(self):
1611-
logs = self.__run(self.import_paths, singletons=False, detailed=True)
1597+
def test_import_album_pretend(self):
1598+
logs = self.__run(self.import_paths, singletons=False)
16121599

16131600
self.assertEqual(logs, [
16141601
'Album %s' % displayable_path(self.import_paths[0]),
16151602
self.import_files[0],
16161603
'Album %s' % displayable_path(self.import_paths[1]),
16171604
self.import_paths[1]])
16181605

1619-
def test_import_pretend_empty_detailed(self):
1620-
logs = self.__run([self.empty_path], detailed=True)
1606+
def test_import_pretend_empty(self):
1607+
logs = self.__run([self.empty_path])
16211608

16221609
self.assertEqual(logs, ['No files imported from {0}'
16231610
.format(displayable_path(self.empty_path))])

0 commit comments

Comments
 (0)