[RELEASE] Playlist Manager for Channels [Streaming Library Manager Extension]

@babsonnexus ok so there weren't any gracenote id's in there but there is data:

#EXTINF:-1 channel-id="2002" tvg-id="2002" tvg-chno="2002" tvg-logo="https://i.mjh.nz/.images/7mate-syd.png" tvc-guide-stationid="mjh-7mate-syd" tvg-name="7mate" group-title="HD",7mate http://192.168.12.33:8089/devices/M3U-AUFreeview/channels/2002/hls/master.m3u8

then when I look at the xml, it appears that it uses the tvc-guide-stationid to match it with the station.

  <channel id="mjh-7mate-syd">
    <display-name>7mate</display-name>
    <lcn>74</lcn>
    <icon src="https://i.mjh.nz/.images/7mate-syd.png"/>
  </channel>

Is there any way you could set the logic to not generate an xml guide if there are numeric characters in the tvc-guide-stationid field and only generate an xml file if there are alphanumeric characters?

The only other workaround I can see is to download the m3u, then do a find and replace and change the channel id in the m3u to match the xml. Then delete the tvc-guide-stationid section for each channel in the m3u. The upload it to slm... Just kind of defeats the dymanic factor of slm when stuff is hardcoded in..

Yes. I will modify PLM to only accept tvc-guide-stationid field values that are numeric and ignore anything else. They will still load and be stored, but when processing they will be discarded.

You are going to have a problem. PLM uses the tvg-id to match to the XML, and yours don't. I can't say for sure what is happening on your end, but when I export an m3u and XML from Channels, they match. It looks like you might be mixing and matching here, which will cause you a headache. Otherwise, you'll have to take advantage of the parent override:

image

The choice, as always, is yours!

That seems like a perfect plan. I can just override the tvg id for each channel.

Thanks for accepting the FR!

So far everyting seems good.
I'm noticing if i add the m3u from the website
https://apsattv.com/rok.m3u, it adds but it ads multiple entries for the same channel.
Am i missing something?

Thanks

I see the issue. This is a very, very, very malformed m3u and is lacking every bit of typical m3u tagging:

Compare this to Pluto on nocord.xyz:

PLM is currently dependent upon a Playlist having a channel-id and none of these do, so it is getting confused and basically adding everything for everything. I'll see what I can do about it, but this is breaking a basic assumption of how PLM functions.

v2024.11.05.1648 has been released as stable. Here are the highlights for PLM:


MODIFIED: {PLM} Unassigned, Assigned, and Parent stations now have a filter on top

This is now available:


FIXED: {PLM} Gracenote ID (tvc-guide-stationid) values are ignored in final m3u(s) if they are not numeric

Now, if there is any non-numeric character in the tvc-guide-stationid (Gracenote ID) field, the final m3u(s) will not use it and they will be treated as EPG-stations:

383215793-6e5129fe-da27-4142-8146-24d5768ab8c6

383216099-f5ba0198-6681-4389-9a86-2f0b93432ae8


FIXED: {PLM} Malformed playlists that lacked a 'channel-id' tag were causing a station to be created multiple times

You will now only get one of each of these stations:

Basically, I created a condition such that if there is no channel-id, then it creates a fake one with a combination of the Playlist name and the Title of the station, replacing all spaces with underscores, and making everything lowercase.


MODIFIED: {PLM} Playlist Manager is now incorporated into `Reports & Queries'

Specifically, this one:

  • NEW: {PLM} Report showing Parent Stations, their children (in priority order, including override), and Gracenote ID--both imported and override

Additional reports can be created, upon request.


Additional quality-of-life improvements and bug fixes
  • MODIFIED: {PLM} Made 'warning' about having issues connecting to source playlists be log only; 'errors' will continue to be notifications
  • MODIFIED: {GEN} Notification for modified row was repeating in function, removed
  • MODIFIED: {PLM} Filtered out 'modified' notifications if the only difference is the Plex token

In relation to this last point, if you have a source playlist with a similar situation, please let me know and provide examples so I can filter them out from constantly notifying you of a non-existent modification.


Everything else was SLM related, so check over there for that:

1 Like

Having an issue with trying to remove the parent status for a station.


I accidentally made TBD a parent from 2 different sources. When I press delete nothing happens, its like the command is ignored. Are there any tricks to be able to remove a station from being a parent?

I know what's happening, I'll have to put out a fix. In the meantime, something actually did happen: you deleted either the first or second parent in the entire list.

Yeah, I thought the delete logic was still working after implementing the filter, but I was wrong!

This is now fixed in v2024.11.08.1720.

1 Like

I'm using Playlist Manager now to great effect now. It's helped tame, combine and curate the 5 FAST services I've integrated into CDVR a way no other tool has been able to. 500+ channels were redundant, ~300 were in foreign languages, etc. It took a while to customize but the end result is so worth it. I'm discovering and enjoying these FAST channels a lot more than I ever did before!

Some feature requests that have I've thought up along the way:

  • It would be nice to see the total # of channels per m3u, listed next to the URL, or just via pop-up when hovering over it.

  • Some Custom Channel sources are fine refreshing every 3 or 6 or even 12 hours, but Samsung's docker specifically suggests doing it hourly. So can we get a setting to customize different refresh intervals, of each source? For example I'd set Samsung to refresh every 1 hour, but 6 hours for DistroTV. The interval entered in Settings would remain the default but any customized intervals would override that.

  • The list of parent channels is very long, scrolling takes a while when assigning a channel to a parent. (I'm not always sure if the channel is new or redundant yet, so sometimes I'm just looking to see if a parent has already been assigned.) Normally with long menus like this, I can type the first 1-2 characters to jump to where I want to go. But I can't do that here because every channel has the word "Channel" in front of it. Is there a better way for us to navigate this long menu? Keyboard jumps would be ideal IMO.

Thanks again. This tool is spectacular.

Do you mean the generated m3u(s), or do you mean the input ones, or do you mean both?

I don't think this is possible currently. The input XML files are not stored in PLM and are dynamically called during the build cycle. If one is not called, it will not build that guide data. To change that would be a fundamental rewrite and a totally different approach. As such, I have to hard pass.

As an aside, even if the Distro XML guide data only updates every 6 hours, there is no danger in PLM reading and loading it every hour. The processing time is literally just a few milliseconds:

[DEBUG | 2024-11-11 13:30:27,265] - Starting new HTTP connection (1): localhost:7973
[DEBUG | 2024-11-11 13:30:45,570] - http://localhost:7973 "GET /distrotv/epg.xml HTTP/1.1" 200 859642

Keyboard jumps already work; you just have to type "station: " first, then the rest of your letters. You don't even have to be quick about it, either. I intentionally put the prefix so there would be no confusion with the "Ignore" and "Unassigned" values (as well as any other potential thing like this that hasn't come up yet), especially if someone were to name a parent something like "Ignore".

That said, if you want to check if a Parent exists, I'd just open up the Parent tab and take advantage of the filter functionality. That'd be much quicker!

I want to point out this poll in the SLM thread that mostly only impacts PLM:

Both, if feasible :slight_smile:

IMO, the more info displayable, the better.

Fofer had some great suggestions, I'm In the process of initial setup as well. I was thinking it would be nice to set all to ignore, then cherry pick the stations to put back. Let's face it most of them are ignores. IMHO Thanks

NIce work.


I think something can be done, like a pick from dropdown and button next to it that says "Set All".

1 Like

v2024.11.13.1347 has been release as stable. The PLM related items are:


MODIFIED: {PLM} m3u/XML retrieval code to retry if it reaches a timeout after 60 seconds or if non-200 code received from HTTP

This is an ongoing effort to deal with issues seen when loading certain playlists. Will continue to monitor.


ADDED: {PLM} Generated m3u(s) now show a station count in their labels

You can now see this for both for generated playlists:

And loaded/input ones:

* ADDED: {PLM} Input/Loaded m3u(s) now show a station count in a column

Just a heads up that newly added playlist is going to have zero stations until you update the station list!


ADDED: {PLM} In Unassigned and Assigned station lists, can now choose to 'set visible' to change the parents of multiple items at once, either through normal scrolling or filtering

This is now possible:

The caveat is that it will only make the assignment to stations that are visible. So if you have more than 100 stations you want to set, then you have to scroll down until the stations you want to set are loaded in.

Due to the same considerations, you can also use filtering to get a limited list to do this with:

This will also work with Modified Stations:


MODIFIED: {PLM} Unassigned, Assigned, and Parent station lists have been made 98% of potential width to make sure users do not get stuck in inner frame

By popular vote, the inner frame area has been made 98% of possible width, giving some space between the inner and outer scroll bars. You shouldn't have any more issues with this:


All other updates are SLM related:

At last, I reached my happy end-state today, so I thought I'd share what I set up!

First off are my sources:

Of note, I am now making a direct connection to my HDHR and I set up a standalone Channels Docker Container to just be a source for TVE. With these two things, my main Channel server will no longer be pulling double-duty both serving and playing/recording content. Other than that, I have a good collection of FAST providers with Plex, Pluto, Samsung TV+, Tubi, and Distro, plus the PBS docker because everything around these parts is on low VHF and I don't have an antenna for that, and finally the excellent EPlusTV docker linear option for getting NFL Network.

I then set my priority among the sources:

image

Basically, I have a preference for OTA over streaming, things with Gracenote guide data over XML-only guide data, and then finally length of guide data or stability of service.

Generally, no matter the source, I assigned all the same stations to a single parent, getting just one resulting station in the end:

However, there were occasions where I wanted separate ones for similar and even same stations. For instance, I receive ABC from two different markets on OTA plus one of them over TVE. I decided I wanted all of them as backups to each other:

Since I opted to connect to my HDHR directly, Channels would not be providing the Gracenote IDs unless I manually mapped stations. In order to avoid that, I put Gracenote ID overrides in for my OTA stations (as well as put in my own logos to make them be unique looking):

And despite my stated preferences for source order above, there were a few instances in which I wanted to use a different one. This most notably came up where my OTA reception isn't the best or the streams are actually higher quality:

With all my child assignments complete, I ended up keeping just 19% of available stations between all my sources, with nearly 70% of ignored entirely and another 11% totally redundant.

Based on those sources, I ended up with three playlists to load into Channels:

And I did exactly that, putting my Gracenote (MPEG-TS) as my top priority since that contains my OTA and streaming PBS stations, which I want to be thought of first over the TVE stations in the Gracenote (HLS) lineup when it comes to recording.

As you can see, I also chose not to put my Chrome Capture for Channels and Live Streams (mostly Kister YouTube streams) into PLM because I didn't see any value to do so. They are all one-off stuff, so I don't believe I'll ever have to use manual management and merging multiple children with parents. However, if I change my mind, I can always upload an m3u file:

Other than that, I do have the EPlusTV's Events option because that also didn't make sense to me to integrate into PLM as it is already doing everything it is ever going to need to with just a direct Channels connection; there is no need to put in an unnecessary middleman. Then, despite using a CURL command to remove my HDHR from Channels, it came back anyway, so I just made sure to remove its guide provider and disabled it as a source (a new option as of just a few days before writing this, how serendipitous!).

image

Then, to finalize my preferences for recording, I used the favorite button to make stations I have multiple version of be first choice:


All together, along with certain settings I made in my passes, got me the order for recording that I desired:

Beyond just recording, I took the opportunity to change my Channel Collections. They are now broken up by category instead of one giant list like I had before:

And that's about it! Using a mix of PLM and Channels tools has gotten me to finally be truly satisfied with my station management and has made it much easier for our household going forward!

2 Likes

Really cool! :sunglasses:

Thank you for sharing your process. I'm sure that will help a few people, including myself.

I'm intrigued by your channel collection "[06] Mindless Streams". What's in there? :laughing:

1 Like

That is a thing of beauty. I plan on diving in and getting things set up in a similar manner in the near future.

Couple of questions and pardon if this has been asked, how does it handle line up changes? Does it fall back to a child source if the primary disappears? If a new channel is added is it automatically added to the list or does it manually have to be added?

I'm also really interested in how others are using PLM and what their outcomes are!

All your questions are answered in the initial post, the linked Github repo, and the embedded video. Check them out!

2 Likes