{"id":22320195,"url":"https://github.com/giof71/mpd-subsonic-scrobbler","last_synced_at":"2025-10-17T02:24:10.869Z","repository":{"id":163963547,"uuid":"639338749","full_name":"GioF71/mpd-subsonic-scrobbler","owner":"GioF71","description":"A Subsonic Scrobbler for Music Player Daemon, written in Python","archived":false,"fork":false,"pushed_at":"2025-07-29T05:06:05.000Z","size":113,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-29T13:58:43.836Z","etag":null,"topics":["docker","gonic","lightweight-media-server","mpd","navidrome","python","python-mpd2","scrobbler","subsonic","subsonic-client","upmpdcli"],"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/GioF71.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,"zenodo":null}},"created_at":"2023-05-11T09:11:22.000Z","updated_at":"2025-04-30T16:35:53.000Z","dependencies_parsed_at":"2024-04-29T06:25:08.290Z","dependency_job_id":"0949ef6a-1b6c-4601-b3d1-f89fdc102e2e","html_url":"https://github.com/GioF71/mpd-subsonic-scrobbler","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/GioF71/mpd-subsonic-scrobbler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GioF71%2Fmpd-subsonic-scrobbler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GioF71%2Fmpd-subsonic-scrobbler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GioF71%2Fmpd-subsonic-scrobbler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GioF71%2Fmpd-subsonic-scrobbler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GioF71","download_url":"https://codeload.github.com/GioF71/mpd-subsonic-scrobbler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GioF71%2Fmpd-subsonic-scrobbler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279272432,"owners_count":26138131,"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","status":"online","status_checked_at":"2025-10-17T02:00:07.504Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["docker","gonic","lightweight-media-server","mpd","navidrome","python","python-mpd2","scrobbler","subsonic","subsonic-client","upmpdcli"],"created_at":"2024-12-04T00:12:44.759Z","updated_at":"2025-10-17T02:24:10.835Z","avatar_url":"https://github.com/GioF71.png","language":"Python","funding_links":["https://ko-fi.com/H2H7UIN5D","https://ko-fi.com/giof71/goal?g=0"],"categories":[],"sub_categories":[],"readme":"# mpd-subsonic-scrobbler\n\nThis is a very simple Subsonic scrobbler for MPD.  \nIt is not a LAST.FM or libre.fm scrobbler.  \nThis scrobbler allows mpd to notify a subsonic server when it has played a song which has been server from that subsonic server. The subsonic server might, if configured, scrobble the song to LAST.FM, libre.fm, etc.   \nIt might be useful when using the Subsonic plugin for Upmpdcli. See the discussion [here](https://github.com/navidrome/navidrome/discussions/2324).\n\n## Support\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/H2H7UIN5D)  \nPlease see the [Goal](https://ko-fi.com/giof71/goal?g=0).  \nPlease note that support goal is limited to cover running costs for subscriptions to music services.\n\n## Important notice\n\nInitially I used [this](https://hub.docker.com/r/giof71/subsonic-mpd-scrobbler) docker repo. I then noticed that it was named differently from the github repo.  \nSo I created a new docker hub repo [here](https://hub.docker.com/r/giof71/mpd-subsonic-scrobbler) and updated the documentation.  \nThe old docker hub repo will not receive updates of course. Please correct your docker compose/run so that they reference the correct image name.  \nSorry for the inconvenience\n\n## Links\n\n### Related projects\n\nPROJECT|Git Repo(s)\n:---|:---\n[Music Player Daemon](https://www.musicpd.org/)|On [GitHub](https://github.com/MusicPlayerDaemon/MPD)\n[Upmpdcli](https://www.lesbonscomptes.com/upmpdcli/pages/upmpdcli-manual.html)|[Framagit](https://framagit.org/medoc92/upmpdcli) [(Mirror)](https://codeberg.org/medoc/upmpdcli). [My Fork](https://framagit.org/giof71/upmpdcli) [(Mirror)](https://codeberg.org/giof71/upmpdcli)\nmpd-alsa-docker|[GitHub](https://github.com/GioF71/mpd-alsa-docker)\nupmpdcli-docker|[GitHub](https://github.com/GioF71/upmpdcli-docker)\nsubsonic-connector|[GitHub](https://github.com/GioF71/subsonic-connector)\npython-mpd2|[GitHub](https://github.com/Mic92/python-mpd2)\n\nAmong those, `mpd-alsa-docker` and `upmpdcli-docker` provide a method for deploying mpd and upmpdcli using docker.  \n\n### Repositories for this project\n\nRepo|URL\n:---|:---\nSource code|[GitHub](https://github.com/GioF71/mpd-subsonic-scrobbler)\nDocker images|[Docker Hub](https://hub.docker.com/r/giof71/mpd-subsonic-scrobbler)\n\n## Available Archs on Docker Hub\n\n- linux/amd64\n- linux/arm/v7\n- linux/arm/v5\n- linux/arm64/v8\n\n## Usage\n\n### Volumes\n\nVOLUME|DESCRIPTION\n:---|:---\n/config|Suggested location for additional configuration files\n\n### Enviroment Variables\n\nVARIABLE|DESCRIPTION|DEFAULT\n:---|:---|:---\nMPD_FRIENDLY_NAME|Friendly name of the mpd instance|\nMPD_HOST|MPD hostname|localhost\nMPD_PORT|MPD port|6600\nSUBSONIC_FRIENDLY_NAME|Friendly name of the subsonic server|\nSUBSONIC_PARAMETERS_FILE|Separate config file for subsonic parameters|\nSUBSONIC_BASE_URL|Subsonic Server URL, including `http` or `https`|\nSUBSONIC_PORT|Subsonic Server Port|\nSUBSONIC_USER|Subsonic Username|\nSUBSONIC_PASSWORD|Subsonic password|\nSUBSONIC_LEGACYAUTH|Legacy authentication, required to `true` for lms, defaults to `false`\nSUBSONIC_CREDENTIALS|Reference to a file with credentials, alternative to specifying `SUBSONIC_USER` and `SUBSONIC_PASSWORD`|\nSUBSONIC_UPMPDCLI_BASE_URL|If set, only this upmpdcli server will be allowed (base url)\nSUBSONIC_UPMPDCLI_PORT|If set, only this upmpdcli server will be allowed (port)\nMIN_COVERAGE|Percent of the song that needs to be played|50\nENOUGH_PLAYBACK_SEC|Minimum playback time needed for a scrobble, regardless of coverage, defaults to `240`\nSLEEP_TIME|Interval between a coverage check and the next, in millisec|1000\nREDACT_CREDENTIALS|If set to `1`, credentials are not displayed on startup\nMAX_SUBSONIC_SERVERS|Max number of SubSonic servers, defaults to `10`\nMAX_MPD_INSTANCES|Max number of MPD instances, defaults to `10`\nMPD_CLIENT_TIMEOUT_SEC|Mpd client timeout, defaults to `0.05` (one value across all mpd instance)\nITERATION_DURATION_THRESHOLD_PERCENT|If total handle_playback elapsed time is greater than this percentage of `SLEEP_TIME`, a warning is displayed on the standard output. In this case, you should increase `SLEEP_TIME`, reduce `MPD_CLIENT_TIMEOUT_SEC`, or increase this threshold\nMPD_IMPOSED_SLEEP_ITERATION_COUNT|Number of iteration an instance of mpd must `sleep` when it appears to not be accessible, defaults to `30`\nVERBOSE|Verbose output, valid values are `1` and `0`|0\n\nThe subsonic configuration parameters are required: either specificy the individual variables, or specify a SUBSONIC_PARAMETERS to indicate the file which will contain the parameters. The file must be accessible to the container. You can use the /config volume and put a file named, e.g. \".subsonic.env\" there.  \nAll the `MPD_*` (unless specified) and `SUBSONIC_*` variables can be suffixed with `_1`, `_2`, `_3` etc in order to configure multiple mpd instances and multiple SubSonic servers.  \nInside a single config file, even if it refer to an index \u003e 0, the variable names must be specified without the index.\n\n### Example configurations\n\nThe following compose file creates a subsonic scrobbler for `mpd-d10` (as it operates on a Topping D10 DAC) and `mpd-d200` (as it operates on a Yulong D200 DAC), which are instances of `mpd-alsa-docker` running on the same host and specifically on the network `mpd`.  \nSubsonic config is read from a separate file.  \n\n```text\n---\nversion: \"3\"\n\nnetworks:\n  mpd:\n    external: true\n\nservices:\n  scrobbler:\n    image: giof71/mpd-subsonic-scrobbler:latest\n    container_name: subsonic-scrobbler-d10\n    networks:\n      - mpd\n    environment:\n      - MPD_HOST=mpd-d10\n      - MPD_PORT=6600\n      - MPD_HOST_1=mpd-d200\n      - MPD_PORT_1=6600\n      - SUBSONIC_PARAMETERS_FILE=/config/my-navidrome.env\n      - SUBSONIC_PARAMETERS_FILE_1=/config/navidrome-demo.env\n      - VERBOSE=0\n    volumes:\n      - ./my-navidrome.env:/config/my-navidrome.env:ro\n      - ./navidrome-demo.env:/config/navidrome-demo.env:ro\n    restart: unless-stopped\n```\n\nSame situation, without the separate file:\n\n```text\n---\nversion: \"3\"\n\nnetworks:\n  mpd:\n    external: true\n\nservices:\n  scrobbler:\n    image: giof71/mpd-subsonic-scrobbler:latest\n    container_name: subsonic-scrobbler-d10\n    networks:\n      - mpd\n    environment:\n      - MPD_HOST=mpd-d10\n      - MPD_PORT=6600\n      - MPD_HOST_1=mpd-d200\n      - MPD_PORT_1=6600\n      - SUBSONIC_BASE_URL=${MY_NAVIDROME_BASE_URL}\n      - SUBSONIC_PORT=${MY_NAVIDROME_PORT}\n      - SUBSONIC_USER=${MY_NAVIDROME_USER}\n      - SUBSONIC_PASSWORD=${MY_NAVIDROME_PASSWORD}\n      - SUBSONIC_BASE_URL_1=${NAVIDROME_DEMO_BASE_URL}\n      - SUBSONIC_PORT_1=${NAVIDROME_DEMO_PORT}\n      - SUBSONIC_USER_1=${NAVIDROME_DEMO_USER}\n      - SUBSONIC_PASSWORD_1=${NAVIDROME_DEMO_PASSWORD}\n      - VERBOSE=0\n    restart: unless-stopped\n```\n\nIn this case, the configuration parameters are read from the `.env` file.  \nIn order to avoid issues with password, which might contain special characters, it is better to not place such password on the compose file, and leverage the `.env` file instead.  \n\n## Releases\n\n### Release 0.5.5\n\n- Song recognition: match using song title and artist (avoid spurious scrobbles if more servers are configured)\n\n### Release 0.5.4\n\n- Introduced caching against subsonic servers\n\n### Release 0.5.3\n\n- Build using setuptools\n- Extracted functions (reduce function length)\n- Misc cleanup\n\n### Release 0.5.2\n\n- Correct version in source code\n- Improved logging\n\n### Release 0.5.1\n\n- Reduce cpu usage (see [#53](https://github.com/GioF71/mpd-subsonic-scrobbler/issues/53))\n\n### Release 0.5.0 (2024-04-19)\n\n- Bug: fixed repeated scrobbles\n- Code style fixed (flake8)\n- Bump subsonic-connector to 0.3.4\n- Bump py-sonic to 1.0.1\n\n### Release 0.4.0 (2023-11-13)\n\n- Effectively use mpd timeout parameter and handle timeout errors\n- Handle non-accessible mpd instances\n- Slightly improved code readability\n- Dump legacy authentication parameter\n\n### Release 0.3.6 (2023-11-11)\n\n- Handle unavailable servers gracefully (see issue [#48](https://github.com/GioF71/mpd-subsonic-scrobbler/issues/48))\n\n### Release 0.3.5 (2023-11-11)\n\n- Simplified mpd reconnection code (see issue [#46](https://github.com/GioF71/mpd-subsonic-scrobbler/issues/46))\n\n### Release 0.3.4 (2023-11-11)\n\n- Compatibility with latest subsonic-connector, for legacy authentication (see issue [#44](https://github.com/GioF71/mpd-subsonic-scrobbler/issues/44))\n\n### Release 0.3.3 (2023-11-11)\n\n- Recreate mpd connection in case of failure (see issue [#39](https://github.com/GioF71/mpd-subsonic-scrobbler/issues/39))\n\n### Release 0.3.2 (2023-11-06)\n\n- Check song id belongs to current server (see issue [#39](https://github.com/GioF71/mpd-subsonic-scrobbler/issues/39))\n\n### Release 0.3.1 (2023-11-04)\n\n- Display upmpdcli configuration parameters (see issue [#37](https://github.com/GioF71/mpd-subsonic-scrobbler/issues/37))\n\n### Release 0.3.0 (2023-11-04)\n\n- Allow upmpdcli server restrictions (see issue [#35](https://github.com/GioF71/mpd-subsonic-scrobbler/issues/35))\n\n### Release 0.2.2 (2023-10-28)\n\n- Handle mpd disconnections (see issue [#32](https://github.com/GioF71/mpd-subsonic-scrobbler/issues/32))\n\n### Release 0.2.1 (2023-10-28)\n\n- Support for upmpdcli intermediate urls\n\n### Release 0.2.0 (2023-05-25)\n\n- Support for multiple mpd instances\n\n### Release 0.1.2 (2023-05-18)\n\n- Support for multiple subsonic servers\n- Code refactor and cleanup\n- Remove need to set PYTHONUNBUFFERED=1 in compose file\n\n### Release 0.1.1 (2023-05-13)\n\n- Mostly documentation changes\n\n### Release 0.1.0 (Initial Release, 2023-05-12) \n\n- First working release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiof71%2Fmpd-subsonic-scrobbler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiof71%2Fmpd-subsonic-scrobbler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiof71%2Fmpd-subsonic-scrobbler/lists"}