Skip to main content

An extension of the Lollypop Music Player that lets you search for and play music files from the command line

Project description

Lollypop Interface

This application works in extension to the Lollypop Music Player to allow users to search for and play songs from a command-line interface.

It works in two parts. The first one, the play python module, does most of the work. It accepts a series of search terms and then looks through a compatible SQLite3 database (the Lollypop music player database, by default) for the songs before launching VLC media player.

The second part, the key listener, will listen for arguments for the python module from the keyboard without changing window focus, with audio feedback to ensure that the user knows that they are inputing into the program. This part will need to be run by a user added to the input user group.

Building and Installing

Running make will build the play_capture and play_repeat utilities. The

To install, run make install. This will install the utilities to $HOME/.local/bin and the python module to the standard installation directories via pip. For convenience, a "play" utility is installed to the user bin directory for running the python module.

Song Database

By default, the Python module will pull music from the databases maintained by the Lollypop music player at ~/.local/share/lollypop (specifically, lollpop.db and playlists.db). However, you can supply your own and pass the directory containing the two databases via the --directory argument.

In either case, there must be two databases. The lollypop.db database will contain the tracks as well as additional information like albums and artists. There is also a playlists.db that contains playlist information.

lollypop.db

commandlinePlay requires 4 tables from lollypop.db: tracks, albums, artists, and track_artists.

tracks

This row contains tracks.

column type description
id INTEGER The ID of the track. This is used to join this table with other tables.
uri TEXT The URI to the file of the song.
name TEXT The title of the song.
album_id INTEGER The ID of the album the song belongs to. This corresponds to an album in the albums table.

albums

This row contains albums.

column type description
id INTEGER The ID of the album. This is used to join this table with tracks.
name TEXT The name of the album.

artists

This table contains artists, with each row being an artist.

column type description
id INTEGER The ID of the artist. This is used to join this table with track_artists.
name TEXT The name of the artist.

track_artists

This table joins tracks and artists, with each row being an artist that contributed to a song.

column type description
track_id INTEGER The ID of a song. This is used to join this table with tracks.
artist_id INTEGER The ID of an artist that contributed to the song. This corresponds to an id in artists.

playlists.db

This database contains playlist information. It is separate from the lollypop.db database, as tracks are represented using only their file paths here.

playlists

This table contains all playlists, with each row being a playlist.

column type description
id INTEGER The ID of a playlist.
name TEXT The name of a playlist.

tracks

This table contains all tracks that are part of a playlist. Each row corresponds to a single track.

column type description
playlist_id INT The ID of the playlist that this track belongs to. This corresponds to a playlist in the playlists table.
uri TEXT The link to the track as a URI path.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lollypopint-0.2.2-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file lollypopint-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: lollypopint-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.5

File hashes

Hashes for lollypopint-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f839fe18487399246f7d817526928b32cbda334eafbd18f23f25851ce9a19f9f
MD5 b218019de284a3c0d98ddc33f1862db8
BLAKE2b-256 a45fb80cc74e9e3a048396e190177941e3386c84c3b3a124ba8721b191801e3b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page