+MPD_sima v0.18.2
+
+ * Add positional argument:
+ "random", a short cut to start in random mode
+
+ -- kaliko <kaliko@azylum.org> UNRELEASED
+
MPD_sima v0.18.1
* Remove bad heuristic to infer artist aliases
mpd-sima --host mpd.example.org
+**To start in random queuing mode:**
+
+.. code-block:: sh
+
+ # Adds 5 tracks at random when there is only 1 track in the queue
+ mpd-sima random 5
+
#####################
User's documentation
#####################
``mpd-sima bl-delete id``
+``mpd-sima random [nbtracks]``
+
DESCRIPTION
-----------
Remove blocklist entry referenced by its id. Use bloclist view
command to get the id.
+``random [nbtracks]``
+ Starts in random mode overriding internal plugin configuration. If
+ `nbtracks` is provided, as many tracks will be queued (defaults to one).
+
ENVIRONMENT
-----------
# -*- coding: utf-8 -*-
-# Copyright (c) 2013, 2014, 2015, 2020, 2021 kaliko <kaliko@azylum.org>
+# Copyright (c) 2013, 2014, 2015, 2020-2022 kaliko <kaliko@azylum.org>
#
# This file is part of sima
#
sys.exit(1)
SimaDB(db_path=db_file).purge_history(duration=0)
sys.exit(0)
+ if cmd == 'random':
+ config['sima']['internal'] = 'Crop, Random'
+ if sopt.options.get('nbtracks'):
+ config['random']['track_to_add'] = str(sopt.options.get('nbtracks'))
logger.info('Starting (%s)...', info.__version__)
sima = core.Sima(config)
# -*- coding: utf-8 -*-
-# Copyright (c) 2009-2015, 2021 kaliko <kaliko@azylum.org>
+# Copyright (c) 2009-2015, 2022 kaliko <kaliko@azylum.org>
#
# This file is part of sima
#
{'name': 'id', 'type': int, 'nargs': '?',
'help': 'blocklist ID to suppress (use bl-view to list IDs)'}
], 'help': 'Remove entries from the blocklist'},
+ {'random': [
+ {'name': 'nbtracks', 'type': int, 'nargs': '?',
+ 'help': 'Number of tracks to add'}
+ ], 'help': 'Start in random auto queuing'},
]