Skip to content

Instantly share code, notes, and snippets.

@phrawzty
Last active May 19, 2017 08:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phrawzty/e48b1c221ff767087551b16e4f3bf635 to your computer and use it in GitHub Desktop.
Save phrawzty/e48b1c221ff767087551b16e4f3bf635 to your computer and use it in GitHub Desktop.

iOS:

2017-05-19 10:15:13,011 (7fcfcde91700) :  DEBUG (runtime:717) - Handling request GET /music/audioaddict/channel?thumb=http%3A%2F%2Fstatic.audioaddict.com%2F2%2F9%2F0%2F1%2Fe%2Ff%2F2901ef5c923bb0f9ff856ac4007975f0.png&title=Chill+%26+Tropical+House&url=http%3A%2F%2Fprem2.radiotunes.com%3A80%2Frtchillntropicalhouse_hi%3F67b893d2c95e1c1&fmt=mp3&include_container=True&summary=The+sounds+of+Chill+%26+Tropical+House+are+expertly+made+for+lounging+and+dancing+alike+with+its+deeper+house+vibes.+%5Bmp3%2C+320%5D+%5Bhttp%3A%2F%2Fprem2.radiotunes.com%3A80%2Frtchillntropicalhouse_hi%3F67b893d2c95e1c1%5D&bitrate=320&includeBandwidths=1
2017-05-19 10:15:13,016 (7fcfcde91700) :  DEBUG (runtime:814) - Found route matching /music/audioaddict/channel
2017-05-19 10:15:13,018 (7fcfcde91700) :  CRITICAL (runtime:889) - Exception (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-4955e31cf/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 843, in handle_request
    result = f(**d)
TypeError: CreateChannelObject() got an unexpected keyword argument 'includeBandwidths'

The generated URL ends with &includeBandwidths=1.

Android:

2017-05-19 10:25:23,240 (7fcfceffd700) :  DEBUG (runtime:717) - Handling request GET /music/audioaddict/channel?bitrate=320&fmt=mp3&include_container=True&includeRelated=1&summary=Your%20favorite%20dance%20tunes%20from%20the%20start%20of%20the%20decade.%20Familiar%20hits%20and%20overlooked%20classics%20in%20abundance.%20%5Bmp3%2C%20320%5D%20%5Bhttp%3A%2F%2Fprem2.di.fm%3A80%2F00sclubhits_hi%3F67b893d2c95e1c1%5D&thumb=http%3A%2F%2Fstatic.audioaddict.com%2F1%2F4%2F0%2F3%2F5%2Fb%2F14035b0944a3c2e77852b6d0944f381e.png&title=00s%20Club%20Hits&url=http%3A%2F%2Fprem2.di.fm%3A80%2F00sclubhits_hi%3F67b893d2c95e1c1
2017-05-19 10:25:23,243 (7fcfceffd700) :  DEBUG (runtime:49) - Received packed state data (80 bytes)
2017-05-19 10:25:23,246 (7fcfceffd700) :  DEBUG (runtime:814) - Found route matching /music/audioaddict/channel
2017-05-19 10:25:23,247 (7fcfceffd700) :  CRITICAL (runtime:889) - Exception (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-4955e31cf/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 843, in handle_request
    result = f(**d)
TypeError: CreateChannelObject() got an unexpected keyword argument 'includeRelated'

2017-05-19 10:25:23,250 (7fcfceffd700) :  DEBUG (runtime:88) - Sending packed state data (112 bytes)
2017-05-19 10:25:23,251 (7fcfceffd700) :  DEBUG (runtime:924) - Response: [500] 512 bytes
2017-05-19 10:25:28,630 (7fcfceffd700) :  DEBUG (runtime:717) - Handling request GET /music/audioaddict/channel?bitrate=320&fmt=mp3&include_container=True&includeRelated=1&summary=Your%20favorite%20dance%20tunes%20from%20the%20start%20of%20the%20decade.%20Familiar%20hits%20and%20overlooked%20classics%20in%20abundance.%20%5Bmp3%2C%20320%5D%20%5Bhttp%3A%2F%2Fprem2.di.fm%3A80%2F00sclubhits_hi%3F67b893d2c95e1c1%5D&thumb=http%3A%2F%2Fstatic.audioaddict.com%2F1%2F4%2F0%2F3%2F5%2Fb%2F14035b0944a3c2e77852b6d0944f381e.png&title=00s%20Club%20Hits&url=http%3A%2F%2Fprem2.di.fm%3A80%2F00sclubhits_hi%3F67b893d2c95e1c1
2017-05-19 10:25:28,633 (7fcfceffd700) :  DEBUG (runtime:49) - Received packed state data (80 bytes)
2017-05-19 10:25:28,636 (7fcfceffd700) :  DEBUG (runtime:814) - Found route matching /music/audioaddict/channel
2017-05-19 10:25:28,637 (7fcfceffd700) :  CRITICAL (runtime:889) - Exception (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-4955e31cf/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 843, in handle_request
    result = f(**d)
TypeError: CreateChannelObject() got an unexpected keyword argument 'includeRelated'

A different keyword, but Android seems to ignore it? Hmm...

Turns out the fix is pretty simple:

diff --git a/Contents/Code/__init__.py b/Contents/Code/__init__.py
index 5241599..443eca9 100644
--- a/Contents/Code/__init__.py
+++ b/Contents/Code/__init__.py
@@ -97,7 +97,8 @@ def CreateChannelObject(
         fmt,
         bitrate,
         thumb,
-        include_container=False
+        include_container=False,
+        includeBandwidths=0
     ):
     """Build yon streamable object, ye mighty."""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment