{"id":18733941,"url":"https://github.com/mgoltzsche/beets-webm3u","last_synced_at":"2025-04-12T18:32:01.122Z","repository":{"id":223212066,"uuid":"759616929","full_name":"mgoltzsche/beets-webm3u","owner":"mgoltzsche","description":"A Beets plugin to serve M3U playlists via HTTP","archived":false,"fork":false,"pushed_at":"2025-03-19T21:06:16.000Z","size":74,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T13:21:21.624Z","etag":null,"topics":["beets","beets-plugin","m3u","m3u-playlist","m3u8","m3u8-playlist","python","web","webm3u"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mgoltzsche.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-19T02:06:39.000Z","updated_at":"2025-03-11T06:47:27.000Z","dependencies_parsed_at":"2024-02-24T04:24:02.497Z","dependency_job_id":"fd5f671b-7a3d-444b-8db4-6c9b6116f650","html_url":"https://github.com/mgoltzsche/beets-webm3u","commit_stats":null,"previous_names":["mgoltzsche/beets-webm3u"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgoltzsche%2Fbeets-webm3u","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgoltzsche%2Fbeets-webm3u/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgoltzsche%2Fbeets-webm3u/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgoltzsche%2Fbeets-webm3u/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgoltzsche","download_url":"https://codeload.github.com/mgoltzsche/beets-webm3u/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248613603,"owners_count":21133547,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["beets","beets-plugin","m3u","m3u-playlist","m3u8","m3u8-playlist","python","web","webm3u"],"created_at":"2024-11-07T15:11:50.977Z","updated_at":"2025-04-12T18:32:00.800Z","avatar_url":"https://github.com/mgoltzsche.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# beets-webm3u\n\nA [beets](https://github.com/beetbox/beets) plugin to serve M3U playlists via HTTP.\n\n## Features\n\n* Allows to access M3U playlists (generated by the [smartplaylist plugin](https://beets.readthedocs.io/en/stable/plugins/smartplaylist.html)) via HTTP.\n* Rewrites playlist item URIs to be accessible via HTTP, allowing to maintain a single set of playlists with local paths instead of having to generate each playlist with multiple URI formats (one per client/integration) upfront.\n\n## Installation\n\n```sh\npython3 -m pip install beets-webm3u\n```\n\n## Configuration\n\nEnable the plugin and add a `webm3u` section to your beets `config.yaml` as follows:\n```yaml\nplugins:\n  - webm3u\n\nwebm3u:\n  host: '127.0.0.1'\n  port: 8339\n  cors: ''\n  cors_supports_credentials: false\n  reverse_proxy: false\n  include_paths: false\n  # Can be omitted when smartplaylist plugin is configured:\n  playlist_dir: /data/playlists\n```\n\n## Usage\n\nOnce the `webm3u` plugin is enabled within your beets configuration, you can run it as follows:\n```sh\nbeet webm3u\n```\n\nYou can browse the server at [`http://localhost:8339`](http://localhost:8339).\n\nTo serve multiple beets web APIs using a single process, you can use the [webrouter plugin](https://github.com/mgoltzsche/beets-webrouter).\n\n### CLI\n\n```\nUsage: beet webm3u [options]\n\nOptions:\n  -h, --help   show this help message and exit\n  -d, --debug  debug mode\n```\n\n## Web API\n\nThe following endpoints allow listing and downloading playlist as well as audio files:\n\n* `GET /playlists/index.m3u[?uri-format=$url]`: Returns the playlist of playlists.\n* `GET /playlists/`: List available playlists.\n* `GET /playlists/*.m3u[?uri-format=$url]`: Get/download a playlist.\n* `GET /audio/`: List available audio files.\n* `GET /audio/*.opus`: Download/stream an audio file.\n\nThe `uri-format` parameter allows specifying a playlist item URI template.\nItem field names prefixed with a `$` can be used as placeholders, e.g. `beets:library:track;$id` or `subidy:song:3$id`.\n`$url` is a built-in placeholder and the default value.\n\nThe list endpoints return either a JSON or HTML response, supporting content type negotiation.\nA JSON response body looks as follows:\n```json\n{\n\t\"directories\": [{\"name\":\"some-dir\"}],\n\t\"files\": [{\"name\":\"afrobeat\", \"path\":\"afrobeat.m3u\"}],\n}\n```\n\n## Development\n\nThe following assumes you have [docker](https://docs.docker.com/engine/install/) installed.\n\nRun the unit tests (containerized):\n```sh\nmake test\n```\n\nRun the e2e tests (containerized):\n```sh\nmake test-e2e\n```\n\nTo test your plugin changes manually, you can run a shell within a beets docker container as follows:\n```sh\nmake beets-sh\n```\n\nA temporary beets library is written to `./data`.\nIt can be removed by calling `make clean-data`.\n\nTo just start the server, run:\n```sh\nmake beets-webm3u\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgoltzsche%2Fbeets-webm3u","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgoltzsche%2Fbeets-webm3u","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgoltzsche%2Fbeets-webm3u/lists"}