From 52655cecfd2d307f1d70f37bba1c5617423db988 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Thu, 12 Jan 2023 11:18:45 -0500 Subject: [PATCH] Add Mopidy URI to data packet sent via webhook This commit adds one new property, which is the URI that mopidy is using as the source to play the media file. The significance here is that if you use something like Podgrab to auto-download and push podcasts to a directory in Mopidy's media files, and if it has 'podcast' in the name we can use that instead of the hit-or-miss check on the MP3 genre of Podcast, which is a convention not many podcasts use. --- mopidy_webhooks/frontend.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mopidy_webhooks/frontend.py b/mopidy_webhooks/frontend.py index 72f267f..2c48a7a 100644 --- a/mopidy_webhooks/frontend.py +++ b/mopidy_webhooks/frontend.py @@ -39,6 +39,7 @@ class WebhooksFrontend(pykka.ThreadingActor, CoreListener): "musicbrainz_track_id": track.musicbrainz_id, "musicbrainz_album_id": track.album.musicbrainz_id, "musicbrainz_artist_id": musicbrainz_artist_id, + "mopidy_uri": track.uri, } def _post_update_to_webhooks(self, post_data: dict, status: str):