Skip to main content

No project description provided

Project description

deadbeef-playlist

This is a Python library for reading and writing playlists in the "DBPL" binary format, created by my absolute favorite desktop audio player DeaDBeeF.

I created it to be able to edit paths to audio files in the playlist, although it's possible to change any tracks properties.

Example

Let's imagine you have a large .dbpl playlist with hundreds of items, and you want to change tracks paths from /data/music to /Volumes/music. Write a script named script.py:

from dbpl import Playlist
from argparse import ArgumentParser

if __name__ == '__main__':
    parser = ArgumentParser()
    parser.add_argument('--input', required=True, help='input file')
    parser.add_argument('--output', required=True, help='output file')
    args = parser.parse_args()

    playlist = Playlist(args.input)
    for t in playlist.tracks:
        uri = t.get_uri()
        uri = uri.replace('/data/music', '/Volumes/music')
        t.set_uri(uri)
    playlist.save(args.output)

Then use it:

python3 ./script.py --input old.dbpl --output new.dbpl

License

BSD-2c

Project details


Download files

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

Source Distribution

dbpl-1.0.1.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

dbpl-1.0.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file dbpl-1.0.1.tar.gz.

File metadata

  • Download URL: dbpl-1.0.1.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for dbpl-1.0.1.tar.gz
Algorithm Hash digest
SHA256 1c17cc701ffa0c3198eaf37c245c1ad3fe5e19419487c7804fc3846c19308ab6
MD5 0c9830f27a5a95ab6fbb59e4fbb10523
BLAKE2b-256 a77b6fa22f7d85ca9e8bb8037eca3d213fab4b5bea5af7243a030f01914c033b

See more details on using hashes here.

File details

Details for the file dbpl-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: dbpl-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for dbpl-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 da37fe9690b16a141cace80570e285019807c1bd607ef5815a5a961bc63d82ef
MD5 0e2735539276d9c9b28c0be360efe3d0
BLAKE2b-256 f5aef036559babf9b15541c9b6c9dd323325b1fa5e01f80c51fa800ff23db2bf

See more details on using hashes here.

Supported by

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