iamkroot / trakt-scrobbler

Scrobbler for trakt.tv that supports VLC, Plex, MPC-HC, and MPV.
https://github.com/iamkroot/trakt-scrobbler/wiki
GNU General Public License v2.0
449 stars 30 forks source link

[Feature Request] Docker #200

Open JourneyOver opened 2 years ago

JourneyOver commented 2 years ago

Recently decided to start moving a lot of stuff to be dockerized instead of being installed on baremetal, and just would love to see this dockerized ^^

iamkroot commented 2 years ago

That would be nice, but it seems a bit tricky. This app needs to communicate with the players via various ports/filepaths. Also not sure how notifs will work in this case.

JRFarmer commented 1 year ago

That would be nice, but it seems a bit tricky. This app needs to communicate with the players via various ports/filepaths. Also not sure how notifs will work in this case.

It's not as tricky as it may seem. I already have a server running where Plex runs inside a docker container, and this scrobbler is able to access it. As long as the scrobbler container's network is setup so it can get to the Plex (or other players') web API, it should just work. Access to file paths should be easy as well, using bind mounts.

One thing that I think needs to be changed to support container is the ability to specify an alternate data and log path. You would want these located in a docker volume, not nested within the $HOME directory.

JWWolstenholme commented 1 week ago

An alternative for users who just want a docker container that scrobbles from Plex to Trakt is PlexTraktSync with the watch command.

I've never made a dockerfile before but I gave it a shot for a bit before finding the above. I'll chuck it here if anyone wants to pick it up. Still requires auth for Trakt and Plex.

FROM python:3.12-slim

# Install pipx
RUN python -m pip install --root-user-action ignore pipx 

# Add path that pipx installs to, to PATH
ENV PATH="$PATH:/root/.local/bin"

# Install trakt-scrobbler
RUN pipx install trakt-scrobbler

# trakt-scrobbler config
# Disable Desktop notifications - They cause an unhandled exception in trakt-scrobbler when it's run via Docker
RUN trakts config set general.enable_notifs False
RUN trakts config set players.monitored plex
# RUN trakts config set players.plex.scrobble_user = Someone

Also, giving this related issue a mention for the record: #153

JourneyOver commented 2 days ago

Hmm I might look at this again at some point and see about building a dockerfile and such, it's crazy it's been over 2 years now since I opened this issue xD

I have been using PlexTraktSync for the past 2 years, but it's def missing one thing I like from this project and that is the backlog feature as trakt-scrobbler would always send the correct time to trakt if it ended up in the backlog, while PlexTraktSync doesn't have the backlog feature and if it misses a scrobble and you use the sync stuff it'll only send the time at which it actually does the sync.