Skip to content

Commit

Permalink
Fixed result returns
Browse files Browse the repository at this point in the history
  • Loading branch information
hanibalsk committed Nov 16, 2024
1 parent 64ff98b commit e47fb4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ ENV CONFIG_PATH="/data/config.yaml"
# Define a volume for /data to make it configurable
VOLUME ["/data"]

# Command to run the application
CMD ["python", "plex_webhook.py"]
# Command to run the application using Gunicorn
CMD ["gunicorn", "-b", "0.0.0.0:4995", "plex_webhook:app"]

# Multi-platform support for different architectures
# You can use the buildx plugin for Docker to build the image for multiple platforms
Expand Down
5 changes: 3 additions & 2 deletions plex_webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,11 @@ def plex_webhook():
if event_type in ["media.play", "media.resume"]:
# Trigger webhook for play or resume events
result, code = trigger_webhook(webhook_play_resume, event_type, device_name)
return result, code
elif event_type in ["media.pause", "media.stop"]:
# Triggoer webhook for pause or stop events
# Trigger webhook for pause or stop events
result, code = trigger_webhook(webhook_pause_stop, event_type, device_name)
return result, code
return result, code
else:
logger.info(f"Device {device_name} not in the list of devices to trigger webhooks for.")

Expand Down

0 comments on commit e47fb4a

Please sign in to comment.