Channels Helper bookmarklet for working with Manage Lineup

Makes sense, it's the sort functions that use the jQuery syntax.

Totally makes sense, I went that route because adding in another extension isn't a big deal, already have a few for stream URL detection and the like. And yes, autoloading based on the page is pretty nice versus having to click the bookmarklet.

Can you elaborate on this a bit? I'm not sure exactly what you're referring to. Thanks-

It was more of a throw away comment but the new webui that was just recently released with all the sections separated is not well liked by some.

Figured there was some JavaScript magic that can be done to put every setting into one page.

FYI, I refactored and cleaned up the code quite a bit and updated the gist. I removed the jQuery dependency entirely. You should be able to use it in tampermonkey easily now as well.

No new functions were added, but I did make a couple of minor usability enhancements. There's now a spinner that shows while the (potentially) long running "all" functions (block-all, favorite-all, etc.) are processing and the dropdown disables as well.

I also had to change the recommended bookmarklet maker site referenced in the instructions as the code now requires at least ES6 compatibility and the old site wasn't compatible.

Hopefully the code is cleaner and will be a little easier to maintain now.

There's no big reason to recreate your bookmarklet unless you just want to be on the latest version, but I welcome the feedback.

Thanks-

2 Likes

I added a little more functionality today. There's now a textbox at the top for filtering the list as you type. I also changed the block-all/unblock-all/favorite-all/unfavorite-all options to now just apply to whatever items you have visible (filtered). If you want to do them all, just clear the filter so you have all items shown.

The toggle blocked/toggle unfavorites was renamed to Show/Hide Blocked/Unfavorites hopefully to make it a little clearer. They expect to be applied to an unfiltered list. I'm kind of curious if these will be confusing to use now.

I also found that the Pluto feed had categories in it that Channels was pulling in but not displaying. I added badges for them and they display when the bookmark is activated now. I didn't see them on the other m3u's I have, so it may be Pluto only - I'm not sure. It doesn't appear there's a strict format for m3u, but I was encouraged that they're pulling it in in Channels. But if you activate the bookmarklet on a feed that has them, they should display.

Curious what you guys think-

4 Likes

@SuperDScript was looking for that here Pluto for Channels - #537 by SuperDScript
Pluto Categories I found here Pluto for Channels - #540 by chDVRuser

The problem with Pluto is channels being added/removed and trying to keep up with it.

1 Like

Fantastic, very useful!

Wow, this too!

This is great! Thanks so much!

This is awesome. Especially with the number of FAST sources, end up filtering most of them & this is a HUGE help!

1 Like

Quick note that the bookmarklet has been updated to augment Pluto channels with a simple tooltip that when hovered shows the channel description. This is pulled from the public Pluto API directly since it's not available in Channels.

4 Likes

Just installed this bookmarklet and it works great, thanks.

Is there a way to display items that are both not favorited AND not blocked? The way I manage my Pluto and Plex channels is they either get favorited or blocked. If the favorited + blocked counts don't equal the total channels then I know there are new channels added that I need to find and either favorite or block them.

2 Likes

Sure, I should have some time this weekend - I'll see what I can come up with.

3 Likes

I just updated the bookmarklet to include a couple more options. There're now individual Show/Hide toggles for Blocked, Unblocked, Favorites, and/or Unfavorites so you can mix and match as needed.

So for example, assuming you're starting with a clean/fully visible list of channels - you can now easily filter down to only channels that you have not favorited or blocked by doing Show/Hide Blocked Channels (to hide the blocked ones) and then Show/Hide Favorites (to hide the favorites) - leaving you with a list of the ones that are neither.

I also added a reset option to Show all Channels just for convenience.

Let me know what you think-

2 Likes

Worked great, thanks for taking the time to add these options.

2 Likes

Thanks for creating this. Very Nice!

You mentioned you had to query the Pluto API to get the channel descriptions.
They are available at the Channels DVR /devices endpoint as .Description
But only when using the maddox docker, which provides it in the playlist.m3u as tvc-guide-description

/devices/M3U-Pluto/channels for mine

{
  "ID": "pluto-tv-spotlight",
  "GuideNumber": "9001",
  "GuideName": "Pluto TV Spotlight",
  "HD": 1,
  "Station": "pluto-tv-spotlight",
  "Logo": "https://images.pluto.tv/channels/5ba3fb9c4b078e0f37ad34e8/colorLogoPNG.png",
  "Art": "https://images.pluto.tv/channels/5ba3fb9c4b078e0f37ad34e8/featuredImage.jpg?fill=blur&fit=fill&fm=jpg&h=562&q=75&w=1000",
  "Categories": ["Movies"],
  "Title": "Pluto TV Spotlight",
  "Description": "Roll out the red carpet and turn down the lights, because the biggest movies are here on Pluto TV Spotlight."
},

Using the jgomez docker, it's not there.
/devices/M3U-Plutojg/channels

{
  "ID": "pluto-tv-spotlight",
  "GuideNumber": "9000",
  "GuideName": "Pluto TV Spotlight",
  "HD": 1,
  "Station": "5ba3fb9c4b078e0f37ad34e8",
  "Logo": "https://images.pluto.tv/channels/5ba3fb9c4b078e0f37ad34e8/colorLogoPNG.png"
},

Using the maddox docker, the tooltips don't appear for me in Brave, Edge or Firefox, but the Category badges do.

Using the jgomez docker, the tooltips appear, but the Category badges don't. Possibly becasue the maddox docker provides them in the playlist.m3u as group-title and the jgomez docker doesn't.

Any chance you could implement showing Blocked only channels and also Sorting by Pluto Category, then channel name?
EDIT: Duh!, figured out HIDE Unblocked shows only Blocked

1 Like

I had no idea the different dockers pulled the m3u data in different formats. I've just always used Matt Huisman's site. That's wild.

The code expects the Station property to contain the unique GUID for the channel, but it looks like the maddox one has the "slug" in both the ID and Station properties.

Based on this, and the fact that it looks like Description may potentially be there already anyway, I made a small change. It will now check for Description locally, and if it's there, it will just use it. If it's not there, it'll go ahead and try to use the Pluto API.

I don't have a way to test it, but in theory it should work and be a pretty safe/non-breaking change. Can you try it when you get a chance?

I'm still thinking about the approach with the sorting options.

Thanks-

Thank You!
Works great.
Getting tooltips now with both maddox and jgomez docker container sources showing Channel Descriptions.
Also tried on non-Pluto sources and it didn't appear to break anything!

1 Like

I hadn't included the categories as they weren't being used really before (at least not by me) Seeing this I went ahead and included them in the latest update. I can also look at adding the description as well

3 Likes

Very cool!

I added two new sorting options to the bookmarklet:
Sort by Category then Channel Name
Sort by Category then Channel Number

If there's no Category, they'll just fall back and sort only by Name/Number.

Let me know what you think-

1 Like

I'm seeing an issue with the URL for the API pull to populate the descriptions.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://api.pluto.tv/v2/channels. (Reason: CORS header ‘Access-Control-Allow-Origin’ does not match ‘http://pluto.tv’).
Problem fetching pluto channels listing: TypeError: NetworkError when attempting to fetch resource.

Here's the headers with the CORS for the GET http://api.pluto.tv/v2/channels:

Status 200 OK
Version HTTP/1.1
Transferred 33.35 kB (361.55 kB size)
Referrer Policystrict-origin-when-cross-origin
DNS ResolutionSystem
HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
Date: Sat, 13 Apr 2024 16:56:29 GMT
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Accept,Authorization,Content-Type,If-None-Match,X-Requested-With,X-Request-ID,X-Log-Level-Override,X-Forwarded-For,X-Search-Transaction
Access-Control-Allow-Methods: GET,PUT,POST,DELETE
Access-Control-Allow-Origin: http://pluto.tv
Access-Control-Expose-Headers: WWW-Authenticate,Server-Authorization,ETag
Access-Control-Max-Age: 1728000
Cache-Control: max-age=600, no-cache
Content-Encoding: gzip
Etag: djEvMTcyLjkwLjY5LjEyMi8vLzE3MTMwMjYwMjI2NTkwOTQwMDA=
Vary: Accept-Encoding
X-Connection-Id: 5425ee9a-a23e-40b0-8501-50eb6de97627
X-Request-Id: 7bb51e1b-5ade-40c7-bd6c-8f4b500cf836
X-Cache: Miss from cloudfront
Via: 1.1 92360e9adbf6cc1c5721d7fbaf6aad46.cloudfront.net (CloudFront)