SiriusXM on Channels

I know most streaming boxes probably already have a SiriusXM app, but I wanted to add the stations directly into my channel guides, kind of like cable's Music Choice. I found a way to do it that works well for the "viewer", but I admit it's not super elegant behind the scenes. I thought I'd post here for others that might enjoy this -- and to see if anyone has ideas on how to make it easier to set up.

First off, you need Chrome Capture. Chrome Capture lets you make virtual channels from webpages, like the SiriusXM website's station player. Don't let that long thread intimidate you, it's very simple to set up! You just download the latest release, add Chrome Capture as a source in Channels, then paste in code like this into the setup section for each channel you want:

#EXTM3U

#EXTINF:-1 channel-number="100" tvg-logo="http://link-to-channel-logo" channel-id="Channel Name", Channel Name
chrome://192.168.1.101:5589/stream?url=http://link-to-website

So when I came up with this idea, I thought it was going to be very straightforward. Go to the SiriusXM player, go to a station I like, then copy and paste the URL into Chrome Capture. I ran into two problems.

First the SiriusXM web app uses javascript or some kind of server side solution to change channels, not URLs. Thankfully there is a way to get links for each station. Go to the SiriusXM channel page, and click a genre. As you mouseover the list of channels, a "Listen Live" button will appear next to each one. Right click that button and copy the link. You now have a URL that will take you to the SiriusXM station you want.

But if you were to paste that link in to Chrome Capture right now, you'd discover problem number two. You get an error message from SiriusXM that the channel is no longer available. The link works fine if you paste it directly into your browser, but for some reason running it from Chrome Capture doesn't work.

So here is the messy part of my fix. We have to trick SiriusXM into thinking that we're just pasting the link directly into the browser. I run some websites. So on one of my domains, I created a simple webpage that when you visit it simply forwards you to a SiriusXM channel. And plugging this link into Chrome Capture works perfectly. BTW, you should log in to SiriusXM on Chrome on the computer Chrome Capture is installed on and save the credentials.

(This is the part that hopefully someone else can figure out a better way to do, since I know uploading an html file to a web server isn't feasible for most people. I tried creating a local webpage but Chrome Capture doesn't seem to open local files. One potential avenue might be running a local web server on the computer Channels is installed on and creating a local file there?)

Long story short, feel free to check it out by using some of the channels I made for me.

The code you plug into Chrome Capture should look something like this:

#EXTINF:-1 channel-number="1225" tvg-logo="http://squareworld.com/stuff/dvr/siriusxm/holiday-traditions.png" channel-id="Holiday Traditions", Holiday Traditions
chrome://xx.xx.xx.xx:5589/stream?url=http://squareworld.com/stuff/dvr/siriusxm/holiday-traditions.html

And if you have ideas to make this easier I'd love to hear them!

3 Likes

If you use url= then you need to escape the url (ie convert & to %26 etc)

You could paste the Sirius url into encodeURIComponent() - JavaScript | MDN and then use that in the custom channel

Please tell me it's not as simple as escaping the url! That'd be embarrassing for me but great if it works!

Here's a few pics of it in action.


4 Likes

Can you record with this setup?

This is awesome, thanks for sharing. Very clever idea!

Yes, like any content streamed via the Chrome Capture method. But there's no guide data, so you're kinda stuck with hourly unlabeled blocks.

1 Like

You can actually change this using the tvc-guide-placeholders="#" (where # is the number of seconds) to change the block length. Not that this would be a great use case, though, but just a general FYI.

From: https://getchannels.com/docs/channels-dvr-server/how-to/custom-channels/
Automatic Placeholders

When your custom channel has no guide data, Channels will create airings for your channel. This way you can record them. It will even create special titles, series IDs, and program IDs based on the time slot so that you can make a Series Pass for them. By default it creates them with 1 hour durations. But you can control this yourself by providing their duration in seconds.

  • tvc-guide-placeholders: Duration of the placeholder. comma delimited. example (2 hours): "7200"

You can set the value to "false" to tell Channels to not make any placeholder airings at all. Setting the value to 24 hours or longer ("86400") will create 24 hour airings, but will drop the extra titles it creates for these airings.

Yeah, that's why I said "kinda stuck." You can change the block length but recordings are still unlabelled without actual descriptive guide data.