Skip to content
This repository has been archived by the owner on Jul 6, 2019. It is now read-only.
/ beets-popularity Public archive

Beets plugin to fetch and store popularity values as flexible item attributes

License

Notifications You must be signed in to change notification settings

abba23/beets-popularity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

beets-popularity

Beets plugin to store the popularity values from Deezer as flexible item attributes in the database

Installation

Using pip:

$ pip install beets-popularity

Manually:

$ git clone https://github.com/abba23/beets-popularity.git
$ cd beets-popularity
$ python setup.py install

You can then enable the plugin by adding it to your config.yaml:

plugins: popularity

Usage

$ beet popularity happy
popularity: Bon Jovi - The Circle - Happy Now: 20
popularity: The Doors - Strange Days - Unhappy Girl: 40
popularity: Kygo - Cloud Nine - Happy Birthday: 59

Options

Option Description
-a --album match albums instead of tracks
-n --nowrite print the popularity values without storing them

Import

All imported songs will automatically have a popularity attribute and value assigned to them if the plugin is enabled.

Query

As the popularity of a song is a value between 0 and 100, you could filter your library like this in order to list all tracks that have a popularity of at least 20:

$ beet list -f '$artist - $title ($popularity)' popularity:20..
Bon Jovi - Happy Now (20)
The Doors - Unhappy Girl (40)
Kygo - Happy Birthday (59)

This is especially useful in combination with the Smart Playlist Plugin. Adding this to your configuration would allow you to have continuously updated playlists of the most popular songs in your library:

smartplaylist:
    playlist_dir: ~/Music/Playlists
    playlists:
        - name: popular.m3u
          query: 'popularity:70..'

        - name: popular_rock.m3u
          query: 'popularity:60.. genre:Rock'