mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 08:39:17 +01:00
*All* URLs were checked manually, but only once per domain! I mostly concerned myself with URLs in documentation rather than source code because the latter may or may not have impactful changes, while the former should be straight forward. Changes in addition to simply adding an s: - changed pip and pypi references as their location has changed - MPoD (iOS app) url redirects to Regelian, so I replaced those - updated homebrew references Notable observations: - beets.io does have HTTPS set up properly (via gh-pages) - beatport.py uses the old HTTP url for beatport - as does lyrics.py for lyrics.wikia.com - https://tomahawk-player.org/ expired long ago, but the http page redirects to https regardless - none of the sourceforge subdomains have https (in 2019!)
61 lines
1.8 KiB
ReStructuredText
61 lines
1.8 KiB
ReStructuredText
LastImport Plugin
|
|
=================
|
|
|
|
The ``lastimport`` plugin downloads play-count data from your `Last.fm`_
|
|
library into beets' database. You can later create :doc:`smart playlists
|
|
</plugins/smartplaylist>` by querying ``play_count`` and do other fun stuff
|
|
with this field.
|
|
|
|
.. _Last.fm: https://last.fm
|
|
|
|
Installation
|
|
------------
|
|
|
|
The plugin requires `pylast`_, which you can install using `pip`_ by typing::
|
|
|
|
pip install pylast
|
|
|
|
After you have pylast installed, enable the ``lastimport`` plugin in your
|
|
configuration (see :ref:`using-plugins`).
|
|
|
|
Next, add your Last.fm username to your beets configuration file::
|
|
|
|
lastfm:
|
|
user: beetsfanatic
|
|
|
|
.. _pip: https://pip.pypa.io
|
|
.. _pylast: https://github.com/pylast/pylast
|
|
|
|
Importing Play Counts
|
|
---------------------
|
|
|
|
Simply run ``beet lastimport`` and wait for the plugin to request tracks from
|
|
Last.fm and match them to your beets library. (You will be notified of tracks
|
|
in your Last.fm profile that do not match any songs in your library.)
|
|
|
|
Then, your matched tracks will be populated with the ``play_count`` field,
|
|
which you can use in any query or template. For example::
|
|
|
|
$ beet ls -f '$title: $play_count' play_count:5..
|
|
Eple (Melody A.M.): 60
|
|
|
|
To see more information (namely, the specific play counts for matched tracks),
|
|
use the ``-v`` option.
|
|
|
|
Configuration
|
|
-------------
|
|
|
|
Aside from the required ``lastfm.user`` field, this plugin has some specific
|
|
options under the ``lastimport:`` section:
|
|
|
|
* **per_page**: The number of tracks to request from the API at once.
|
|
Default: 500.
|
|
* **retry_limit**: How many times should we re-send requests to Last.fm on
|
|
failure?
|
|
Default: 3.
|
|
|
|
By default, the plugin will use beets's own Last.fm API key. You can also
|
|
override it with your own API key::
|
|
|
|
lastfm:
|
|
api_key: your_api_key
|