瀏覽代碼

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.
Colin Powell 2 年之前
父節點
當前提交
52655cecfd
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      mopidy_webhooks/frontend.py

+ 1 - 0
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):