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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lollypopint-0.2.0-py3-none-any.whl.
File metadata
- Download URL: lollypopint-0.2.0-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49ba6586c8b2593237d92247f40e701bdf34c91032c50a3683e5cc4733b87edb
|
|
| MD5 |
c97a15c25898bf90de3a8e32bb89f823
|
|
| BLAKE2b-256 |
1188970060896bb33bc4993b472043abefe2c99121a007261651fb9693f002e6
|