mirror of
https://github.com/beetbox/beets.git
synced 2025-12-15 21:14:19 +01:00
Docs refinements and changelog for Spotify (#892)
This commit is contained in:
parent
ff875c5d61
commit
05170c17d6
2 changed files with 63 additions and 42 deletions
|
|
@ -14,6 +14,10 @@ New stuff
|
|||
that are missing certain data. Thanks to oprietop.
|
||||
* The new :doc:`/plugins/bpm` lets you manually measure the tempo of a playing
|
||||
song. Thanks to aroquen.
|
||||
* The new :doc:`/plugins/spotify` generates playlists for your `Spotify`_
|
||||
account. Thanks to Olin Gay.
|
||||
|
||||
.. _Spotify: https://www.spotify.com/
|
||||
|
||||
Little improvements and fixes:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Spotify Plugin
|
||||
==============
|
||||
|
||||
The ``spotify`` plugin generates `Spotify`_ playlists from tracks in your library. Using the `Spotify Web API`_, any tracks that can be matched with a Spotify ID are returned, and the results can be either pasted in to a playlist, or opened directly in Spotify.
|
||||
The ``spotify`` plugin generates `Spotify`_ playlists from tracks in your library. Using the `Spotify Web API`_, any tracks that can be matched with a Spotify ID are returned, and the results can be either pasted in to a playlist or opened directly in the Spotify app.
|
||||
|
||||
.. _Spotify: https://www.spotify.com/
|
||||
.. _Spotify Web API: https://developer.spotify.com/web-api/search-item/
|
||||
|
|
@ -9,21 +9,17 @@ The ``spotify`` plugin generates `Spotify`_ playlists from tracks in your librar
|
|||
Why Use This Plugin?
|
||||
--------------------
|
||||
|
||||
* You're a Beets user and Spotify user already
|
||||
* You have playlists or albums you'd like to make available in Spotify from Beets without having to search for each artist/album/track
|
||||
* You want to check which tracks in your library are available on Spotify
|
||||
* You're a Beets user and Spotify user already.
|
||||
* You have playlists or albums you'd like to make available in Spotify from Beets without having to search for each artist/album/track.
|
||||
* You want to check which tracks in your library are available on Spotify.
|
||||
|
||||
Basic Usage
|
||||
-----------
|
||||
|
||||
First, enable the plugin in your beets configuration::
|
||||
|
||||
plugins: <other plugins> spotify
|
||||
|
||||
Then, you can search for tracks as usual with the ``spotify`` command::
|
||||
|
||||
beet spotify <options if needed> <search args>
|
||||
First, enable the plugin (see :ref:`using-plugins`). Then, use the ``spotify``
|
||||
command with a beets query::
|
||||
|
||||
beet spotify [OPTIONS...] QUERY
|
||||
|
||||
Here's an example::
|
||||
|
||||
|
|
@ -33,48 +29,66 @@ Here's an example::
|
|||
http://open.spotify.com/track/3PRLM4FzhplXfySa4B7bxS
|
||||
[...]
|
||||
|
||||
Options for the command::
|
||||
Command-line options include:
|
||||
|
||||
Usage: beet spotify [options]
|
||||
|
||||
Options:
|
||||
-h, --help show this help message and exit
|
||||
-m MODE, --mode=MODE "open" to open spotify with playlist, "list" to
|
||||
print (default)
|
||||
-f, --show-failures Print out list of any tracks that did not match a
|
||||
Sptoify ID
|
||||
-v, --verbose show extra output
|
||||
* ``-m MODE`` or ``--mode=MODE`` where ``MODE`` is either "list" or "open"
|
||||
controls whether to print out the playlist (for copying and pasting) or
|
||||
open it in the Spotify app. (See below.)
|
||||
* ``--show-failures`` or ``-f``: List the tracks that did not match a Spotify
|
||||
ID.
|
||||
* ``--verbose`` or ``-v``: Show extra output.
|
||||
|
||||
Configuring
|
||||
-----------
|
||||
|
||||
The default options should work as-is, but there are some options you can put in config.yaml:
|
||||
|
||||
* ``mode``: See the section below on modes
|
||||
* ``region_filter``: Use the 2-character country abbreviation to limit results to that market
|
||||
* ``show_failures``: Show the artist/album/track for each lookup that does not return a Spotify ID (and therefore cannot be added to a playlist)
|
||||
* ``tiebreak``: How to choose the track if there is more than one identical result. For example, there might be multiple releases of the same album. Currently, this defaults to "popularity", "first" simply chooses the first in the list returned by Spotify.
|
||||
* ``regex``: An array of regex transformations to perform on the track/album/artist fields before sending them to Spotify. Can be useful for changing certain abbreviations, like ft. -> feat. See the examples below.
|
||||
* ``artist_field`` / ``album_field`` / ``track_field``: These allow the user to choose a different field to send to Spotify when looking up the track, album and artist. Most users will not want to change this.
|
||||
* ``mode``: See the section below on modes.
|
||||
* ``region_filter``: Use the 2-character country abbreviation to limit results
|
||||
to that market.
|
||||
* ``show_failures``: Show the artist/album/track for each lookup that does not
|
||||
return a Spotify ID (and therefore cannot be added to a playlist).
|
||||
* ``tiebreak``: How to choose the track if there is more than one identical
|
||||
result. For example, there might be multiple releases of the same album.
|
||||
Currently, this defaults to "popularity", "first" simply chooses the first
|
||||
in the list returned by Spotify.
|
||||
* ``regex``: An array of regex transformations to perform on the
|
||||
track/album/artist fields before sending them to Spotify. Can be useful for
|
||||
changing certain abbreviations, like ft. -> feat. See the examples below.
|
||||
* ``artist_field`` / ``album_field`` / ``track_field``: These allow the user
|
||||
to choose a different field to send to Spotify when looking up the track,
|
||||
album and artist. Most users will not want to change this.
|
||||
|
||||
Example config.yaml
|
||||
-------------------
|
||||
Example Configuration
|
||||
---------------------
|
||||
|
||||
Examples of the configuration options::
|
||||
::
|
||||
|
||||
spotify:
|
||||
mode: "open" # Default is list, shows the plugin output. open attempts to open directly in Spotify (only tested on Mac)
|
||||
region_filter: "US" # Filters tracks by only that market (2-letter code)
|
||||
show_faiulres: on # Displays the tracks that did not match a Spotify ID
|
||||
tiebreak: "first" # Need to break ties when then are multiple tracks. Default is popularity.
|
||||
artist_field: "albumartist" # Which beets field to use for the artist lookup
|
||||
album_field: "album" # Which beets field to use for the album lookup
|
||||
track_field: "title" # Which beets field to use for the track lookup
|
||||
# Default is list, shows the plugin output. Open attempts to open
|
||||
# directly in Spotify (only tested on Mac).
|
||||
mode: "open"
|
||||
|
||||
# Filter tracks by only that market (2-letter code)
|
||||
region_filter: "US"
|
||||
|
||||
# Display the tracks that did not match a Spotify ID.
|
||||
show_faiulres: on
|
||||
|
||||
# Need to break ties when then are multiple tracks. Default is
|
||||
popularity.
|
||||
tiebreak: "first"
|
||||
|
||||
# Which beets fields to use for lookups.
|
||||
artist_field: "albumartist"
|
||||
album_field: "album"
|
||||
track_field: "title"
|
||||
|
||||
regex: [
|
||||
{
|
||||
field: "albumartist", # Field in the item object to regex
|
||||
search: "Something", # String to look for
|
||||
replace: "Replaced" # Replacement value
|
||||
field: "albumartist", # Field in the item object to regex.
|
||||
search: "Something", # String to look for.
|
||||
replace: "Replaced" # Replacement value.
|
||||
},
|
||||
{
|
||||
field: "title",
|
||||
|
|
@ -86,6 +100,9 @@ Examples of the configuration options::
|
|||
Spotify Plugin Modes
|
||||
---------------------
|
||||
|
||||
* ``list``: The default mode for the spotify plugin is to print out the playlist as a list of links. This list can then be pasted in to a new or existing spotify playlist.
|
||||
* ``open``: This mode actually sends a link to your default webbrowser with instructions to open spotify with the playlist you created. Until this has been tested on all platforms, it will remain optional.
|
||||
* ``list``: The default mode is to print out the playlist as a list of links.
|
||||
This list can then be pasted in to a new or existing Spotify playlist.
|
||||
* ``open``: This mode actually sends a link to your default browser with
|
||||
instructions to open Spotify with the playlist you created. Until this has
|
||||
been tested on all platforms, it will remain optional.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue