diff --git a/beetsplug/play.py b/beetsplug/play.py index 7d69d5428..7f3179319 100644 --- a/beetsplug/play.py +++ b/beetsplug/play.py @@ -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 diff --git a/docs/changelog.rst b/docs/changelog.rst index d8b522a3c..1a1e1e546 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -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 diff --git a/docs/plugins/play.rst b/docs/plugins/play.rst index f1cb9ec9e..bf9250ed3 100644 --- a/docs/plugins/play.rst +++ b/docs/plugins/play.rst @@ -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.