Skip to main content

Play MP3 files from a directory.

Project description

Overview

Play MP3s from a specified directory.

Prerequisites

  • Python >= 3.6

  • playsound >= 1.2.2 (installed as a dependency)

  • pyobjc >= 7.1 (installed as a dependency)

  • CAVEAT: Due to playsound limitations, directory and filenames with spaces are not allowed.

Required (Positional) Arguments

  • Position 1: /path/to/mp3/files

Optional (Keyword) Arguments

  • repeat
    • Description: Number of times to repeat the whole collection.

    • Type: Integer

    • Default: 0

  • shuffle
    • Description: Select whether to shuffle the list of songs being played.

    • Type: Boolean

    • Default: False

Usage

Installation:

pip3 install playsongs
# or
python3 -m pip install playsongs

In Python3:

from playsongs import PlaySongs
PlaySongs('/home/username/Music', repeat = 10000000, shuffle = True)

In BASH:

python3 -c "from playsongs import PlaySongs; PlaySongs('/home/username/Music', repeat = 10000000, shuffle = True)"

Changelog

2023.1.0.1

  • Fixed outdated dependencies.

2023.1.0.0

  • Cleaned-up code.

2021.1.4.1

  • Multiprocessing bugfix. The songs should advance automatically now.

2021.1.3.1

  • Updated README.

2021.1.3.0

  • Used multiprocessing to start playsound to enable skipping and non-Python-killing keyboard interrupt.

2021.1.2.0

  • Added pyobcj as a dependency.

  • Reverted keyboard interrupt to exit as return doesn’t actually stop playbacks.

2021.1.0.7

  • Moved build and publish process to GitHub Actions.

2021.1.0.6

  • Updated README.

2021.1.0.5

  • Updated code to return instead of exit in case of exceptions.

2021.1.0.4

  • Updated typo in README (this file).

  • No code change.

2021.1.0.3

  • Removed system exit at the end of the playlist so it won’t kill Python runtime.

  • CTRL+C will still kill Python runtime.

2021.1.0.1

  • Initial release.

Current version: 2021.1.4.1

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

playsongs-2023.1.0.1.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

playsongs-2023.1.0.1-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file playsongs-2023.1.0.1.tar.gz.

File metadata

  • Download URL: playsongs-2023.1.0.1.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1040-azure

File hashes

Hashes for playsongs-2023.1.0.1.tar.gz
Algorithm Hash digest
SHA256 ddd23fc65cdc80cc4109f71a7c291a8510dd819d7f7886468ed601239f06caaa
MD5 8bfea06476b121896b5677391c7f376f
BLAKE2b-256 95e0d0396f43154ae36b44263699f565fb277cec666c6efc6f1efdfa58daad29

See more details on using hashes here.

File details

Details for the file playsongs-2023.1.0.1-py3-none-any.whl.

File metadata

  • Download URL: playsongs-2023.1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1040-azure

File hashes

Hashes for playsongs-2023.1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 483726bb52366a9d67450dc646cd4c0abd4928bf245f27304c15169a0dbf08ab
MD5 99b98021c2f061d7d19788ad54000254
BLAKE2b-256 31d19e7d3431eee422bd105994ef9f11bef3f0e85771d2150649875909aa3b70

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