play plugin (#708): docs clarification, etc.

This commit is contained in:
Adrian Sampson 2014-04-19 14:41:30 -07:00
parent 492acbb721
commit 9192b7f5cb
3 changed files with 18 additions and 17 deletions

View file

@ -1,5 +1,5 @@
# This file is a plugin on beets.
# Copyright (c) <2013> David Hamp-Gonsalves
# This file is part of beets.
# Copyright 2014, David Hamp-Gonsalves
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@ -12,10 +12,8 @@
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
"""Sends the results of a query to the configured music player as a playlist.
"""Send the results of a query to the configured music player as a playlist.
"""
from beets.plugins import BeetsPlugin
from beets.ui import Subcommand
from beets import config

View file

@ -4,6 +4,9 @@ Changelog
1.3.6 (in development)
----------------------
* The new :doc:`/plugins/play` lets you start your desktop music player with
the songs that match a query. Thanks to David Hamp-Gonsalves.
Fixes:
* :doc:`/plugins/mbsync`: Fix a regression in 1.3.5 that broke the plugin

View file

@ -1,19 +1,19 @@
Play Plugin
============
===========
The ``play`` plugin allows you to pass the results of a query to a music player in the form of a m3u playlist.
The ``play`` plugin allows you to pass the results of a query to a music
player in the form of an m3u playlist.
To use the plugin, first enable it in your configuration (see
:ref:`using-plugins`). Then, add an ``play:`` section to your configuration
file::
To use the plugin, enable it in your configuration (see
:ref:`using-plugins`). Then use it by invoking the ``beet play`` command with
a query. The command will create a temporary m3u file and open it using an
appropriate application.
By default, the playlist is opened using the ``open`` command on OS X,
``xdg-open`` on other Unixes, and ``start`` on Windows. To configure the
command, you can use a ``play:`` section in your configuration file::
play:
# Command(optional) override the system default for m3u files.
# You can define a command to be executed by the shell which the m3u path will be appended to.
command: command: /Applications/VLC.app/Contents/MacOS/VLC
command: /Applications/VLC.app/Contents/MacOS/VLC
# Debug(optional) displays output from player for aiding in setting up command correctly.
debug: True
How it works
============
The plugin works by turning your query results into a temporary m3u file. Then the command you have configured it executed by the shell and the playlist is passed as the last parameter.