https://github.com/marcinn/letsplay
An extensible music player library written in Python, D-Bus mpris compatible
https://github.com/marcinn/letsplay
dbus-service linux linux-desktop mp3 mp3player mpris music player python python3
Last synced: 11 months ago
JSON representation
An extensible music player library written in Python, D-Bus mpris compatible
- Host: GitHub
- URL: https://github.com/marcinn/letsplay
- Owner: marcinn
- License: gpl-3.0
- Created: 2018-03-21T11:36:32.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-23T08:59:10.000Z (about 8 years ago)
- Last Synced: 2025-06-15T01:15:54.957Z (about 1 year ago)
- Topics: dbus-service, linux, linux-desktop, mp3, mp3player, mpris, music, player, python, python3
- Language: Python
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# letsplay
An extensible music player wbrary ritten in Python
## Features
* thin wrapper around any media player (mplayer as default)
* possibility to bind to any user interface (via extensions)
* local and remote files (multiple schemes supported)
* media finders API
* D-Bus `org.mpris.MediaPlayer2` integration
* extensible via plugins
## Quickstart (Python API)
```
import letsplay as lp
player = lp.init()
player.load(lp.find('/path/to/music/files/*.mp3'))
player.play()
```
### Expose D-bus interface
Same as above plus:
```
lp.mpris.register_mpris_service(player)
loop = lp.mpris.create_glib_loop()
loop.run()
```
### Destroying the player
Remember to destroy the player. It is required for cleaning up.
```
try:
loop.run()
finally:
player.destroy()
```
## License
GPL3