FoxxMD / multi-scrobbler

Scrobble plays from multiple sources to multiple clients
https://foxxmd.github.io/multi-scrobbler
MIT License
426 stars 18 forks source link

feat(plex): Initial Plex API Source implementation #211

Closed FoxxMD closed 1 month ago

FoxxMD commented 1 month ago

Checklist before requesting a review

Type of change

Please delete options that are not relevant.

Describe your changes

Implements a Source for Plex using the official API. This source will eventually replace the existing webhook Source.

Find a Plex Token for the Plex server and note the URL:PORT to use with it.

Example file config

Example ENV config

Environmental Variable Required? Default Description
PLEX_URL Yes The URL of the Plex server IE http://localhost:32400
PLEX_TOKEN Yes The Plex Token to use with the API
PLEX_USERS_ALLOW No Comma-separated list of usernames (from Plex) to scrobble for
PLEX_USERS_BLOCK No Comma-separated list of usernames (from Plex) to disallow scrobble for
PLEX_DEVICES_ALLOW No Comma-separated list of devices to scrobble from
PLEX_DEVICES_BLOCK No Comma-separated list of devices to disallow scrobbles from
PLEX_LIBRARIES_ALLOW No Comma-separated list of libraries to allow scrobbles from
PLEX_LIBRARIES_BLOCK No Comma-separated list of libraries to disallow scrobbles from

95

FoxxMD commented 1 month ago

Due to an issue with the underlying plex api library MS cannot currently retrieve the "friendly" username of the user providing the Plex Token and so cannot determine which users should be allowed automatically.

For now users need to provide usersAllow or PLEX_USERS_ALLOW in order to scrobble anything.

EDIT: Was able to workaround this by using response raw value

github-actions[bot] commented 1 month ago

:package: A new release has been made for this pull request.

To play around with this PR, pull an image:

Images are available for x86_64 and ARM64.

Latest commit: 3cc735b9c864950eb1ed39cf3fd4a9cd9895bf6c