Skip to main content

Mopidy extension for streaming Quran from mp3quran.net

Project description

Mopidy-Mp3Quran

Mopidy extension for streaming Quran recitations and radio stations from Mp3Quran.

Features

  • Browse and stream Quran recitations from 100+ reciters
  • Listen to Quran radio stations
  • Search reciters by name or recitation style (Riwaya)
  • Configurable language, cache TTL, and request timeout
  • Caching to reduce API calls

Installation

From PyPI:

pip install Mopidy-Mp3Quran

From source:

git clone https://github.com/aymanbagabas/mopidy-mp3quran.git
cd mopidy-mp3quran && pip install .

Configuration

By default, this extension is enabled. Modify the Mopidy configuration file to customize:

[mp3quran]
enabled = true
language = English
cache_ttl = 3600
timeout = 10

Configuration options:

  • language - API language (default: English). Controls the language of reciter and surah names. Accepts both the full name (e.g. English, arabic) and the locale code (e.g. eng, ar), case-insensitive.

Supported languages:

Locale Language Native
ar Arabic العربية
eng English English
fr French Français
ru Russian Русский
de German Deutsch
es Spanish Español
tr Turkish Türkçe
cn Chinese 中文
th Thai ไทย
ur Urdu اردو
bn Bengali বাংলা
bs Bosnian Bosanski
ug Uyghur ئۇيغۇرچە
fa Persian فارسی
tg Tajik (Cyrillic) тоҷикӣ
ml Malayalam മലയാളം
tl Tagalog Tagalog
id Indonesian Indonesia
pt Portuguese Português
ha Hausa Hausa
sw Swahili Kiswahili
  • cache_ttl - Cache time-to-live in seconds (default: 3600). Set to 0 to disable caching.
  • timeout - HTTP request timeout in seconds (default: 10).

Usage

Browse the library tree:

  1. Mp3Quran (root) — top-level entry
  2. Languages — switch to a different language
  3. Reciters — list of all available reciters
  4. Radios — list of all radio stations
  5. Select a reciter to see their recitation versions (Moshaf, e.g. Hafs, Warsh)
  6. Select a moshaf to see its available surahs
  7. Select a surah to play it

Use search to find reciters or radio stations by name.

Development

git clone https://github.com/aymanbagabas/mopidy-mp3quran.git
cd mopidy-mp3quran
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

Run the test suite:

pytest

Docker

Run with Docker Compose (includes Mopidy + Snapcast server):

docker compose up

This starts a single container with Mopidy and Snapcast server. Mopidy outputs audio to a named pipe that Snapcast reads from.

Port Service
6600 Mopidy MPD
6680 Mopidy HTTP
1704 Snapcast stream
1705 Snapcast control
1780 Snapcast HTTP/Web UI

Configuration files are in docker/mopidy.conf and docker/snapserver.conf.

Project resources

Changelog

v0.2.0 (unreleased)

  • Migrate to mp3quran.net v3 REST API
  • Support multiple moshaf (recitation versions) per reciter
  • Add riwayat (narration types) support
  • Language config now accepts both full names and locale codes (case-insensitive)
  • Migrate to pyproject.toml with src layout
  • Migrate to Mopidy 4.x API (search on LibraryProvider)
  • Fix proxy configuration bug (config key)
  • Fix search dropping reciter results
  • Add unit test suite (102 tests)
  • Remove dead parse_uri() function
  • Migrate to Python 3
  • Add error handling for all API calls
  • Add caching with configurable TTL
  • Add search functionality
  • Add configuration options (language, cache_ttl, timeout)
  • Add type hints and docstrings
  • Improve error handling in URI parsing and lookup

v0.1.0 (2018-03-05)

  • Initial release.

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

mopidy_mp3quran-0.2.0.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

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

mopidy_mp3quran-0.2.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file mopidy_mp3quran-0.2.0.tar.gz.

File metadata

  • Download URL: mopidy_mp3quran-0.2.0.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mopidy_mp3quran-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6321102d7d2ea62df48206e4645be8871450969c94b0573815f77185367bfee3
MD5 585d71c381315066594ce06546c71633
BLAKE2b-256 0639e942966cdc08c177addbbd634289a87fa903bde01546dd4f354bb8510726

See more details on using hashes here.

Provenance

The following attestation bundles were made for mopidy_mp3quran-0.2.0.tar.gz:

Publisher: release.yml on aymanbagabas/mopidy-mp3quran

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mopidy_mp3quran-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: mopidy_mp3quran-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mopidy_mp3quran-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d397c672231fd27f8b4a018b322ff2c445e183a849a2993bcedb557185aea18
MD5 51c78132c0238d23192dbba2b06f82bd
BLAKE2b-256 26c504531889ea2de40cde2d3057874ed55a45c27e712a039b8b760c597c0fb6

See more details on using hashes here.

Provenance

The following attestation bundles were made for mopidy_mp3quran-0.2.0-py3-none-any.whl:

Publisher: release.yml on aymanbagabas/mopidy-mp3quran

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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