Great Docker Container!! Seems to work pretty well just tried it today.
i thought there was a thread for this image but i can't find it anymore.
@joagomez i often see "blank" guide data for this but not my other m3us. if i go a day or two into the future it will start to populate again. this makes it hard to select the channel in the guide. is there a way to fix this? thanks!
Are you using the latest v1.14?
https://github.com/jgomez177/plex-for-channels/pkgs/container/plex-for-channels
Any errors in the container log?
Do you have docker container logs?
Updated to version 1.20 for better optimizations
Wonder if anyone is using the version 1.22.
2025-01-26T23:53:00.532030372Z [INFO] Device ID Generated
2025-01-26T23:53:00.535377390Z [INFO] Device ID: REDACTED
2025-01-26T23:53:00.571719036Z ? http server started on [::]:7777
2025-01-26T23:53:00.794766319Z [INFO] Starting thread for code local
2025-01-26T23:53:00.795367973Z [INFO] Running EPG Scheduler for local
2025-01-26T23:53:01.268265001Z [INFO] New token for local generated at 2025-01-26 23:53.01 +0000
2025-01-26T23:53:01.270427243Z [INFO] Updating Channel List for local
2025-01-26T23:53:17.018410704Z [INFO] Channel Listing for local Complete
2025-01-26T23:53:17.021520055Z [INFO] Day One Initialization of EPG data
2025-01-26T23:53:17.022081469Z [INFO] Retrieving local EPG data for 2025-01-26 through 2025-01-26
2025-01-26T23:53:58.405298204Z [INFO] Continuing to retrive local EPG data....Elapsed time: 41.38 seconds. 150 Channels parsed
2025-01-26T23:54:47.498232403Z [INFO] Continuing to retrive local EPG data....Elapsed time: 90.48 seconds. 300 Channels parsed. Please wait
2025-01-27T00:29:09.101250004Z [ERROR] (None, 'Exception type Error: ConnectTimeout') for local
2025-01-27T00:29:09.102125267Z [INFO] EPG Scheduler Complete for local
Still no XML.
2025/01/26 16:35:49.912953 [M3U] Refreshed lineup for Plex with 616 channels
2025/01/26 16:36:12.058044 [ERR] Failed to download XMLTV-Plex: xmltv fetch: GET: http://192.168.1.3:7781/plex/epg/local/epg-local.xml: 404 NOT FOUND: "XML file not found"
Will it retry?
I restarted the container and it retrieved the EPG listings in about 4 minutes.
Starting to see more of the exception errors that while i've accounted for them so that the docker doessn't die with them, I haven't added logic to reattempt to pull the EPG when an error occurs, which is why you didn't see an xml until a restart and I would assume no exceptions occurred. Will mull over how to flag this case and have the docker reattempt when such an instance happens
Is it normal for the EPG Scheduler
to retrieve todays guide data twice and not fetch anything past today?
See the last two runs Retrieving local EPG data for 2025-01-27 through 2025-01-27
this morning
Container log since updating to v2.03 and restarting container yesterday
2025-01-27T00:47:41.771961939Z [INFO] Device ID: REDACTED
2025-01-27T00:47:41.820125521Z ? http server started on [::]:7777
2025-01-27T00:47:41.856360623Z [INFO] Starting thread for code local
2025-01-27T00:47:41.856678709Z [INFO] Running EPG Scheduler for local
2025-01-27T00:47:42.329208851Z [INFO] New token for local generated at 2025-01-27 00:47.42 +0000
2025-01-27T00:47:42.331312494Z [INFO] Updating Channel List for local
2025-01-27T00:48:02.428905709Z [INFO] Channel Listing for local Complete
2025-01-27T00:48:02.432039018Z [INFO] Day One Initialization of EPG data
2025-01-27T00:48:02.432469574Z [INFO] Retrieving local EPG data for 2025-01-27 through 2025-01-27
2025-01-27T00:48:43.881305889Z [INFO] Continuing to retrive local EPG data....Elapsed time: 41.45 seconds. 150 Channels parsed
2025-01-27T00:49:36.160282891Z [INFO] Continuing to retrive local EPG data....Elapsed time: 93.73 seconds. 300 Channels parsed. Please wait
2025-01-27T00:50:23.461322453Z [INFO] Continuing to retrive local EPG data....Elapsed time: 141.03 seconds. 450 Channels parsed
2025-01-27T00:51:17.071298838Z [INFO] Continuing to retrive local EPG data....Elapsed time: 194.64 seconds. 600 Channels parsed. Please wait
2025-01-27T00:51:20.320857381Z [INFO] Retrieving local EPG data complete. Elapsed time: 197.89 seconds. 616 Channels parsed.
2025-01-27T00:51:48.687288129Z [INFO] EPG Scheduler Complete for local
2025-01-27T00:51:48.691917198Z [INFO] Returning Cached Channel List for local
2025-01-27T01:03:24.155717056Z [INFO] Returning Cached Channel List for local
2025-01-27T01:46:17.005503907Z [INFO] Returning Cached Channel List for local
2025-01-27T02:47:42.837366817Z [INFO] Running EPG Scheduler for local
2025-01-27T02:47:42.840989467Z [INFO] Retrieving local EPG data for 2025-01-28 through 2025-01-28
2025-01-27T02:48:29.149205106Z [INFO] Continuing to retrive local EPG data....Elapsed time: 46.31 seconds. 150 Channels parsed
2025-01-27T02:49:22.647306518Z [INFO] Continuing to retrive local EPG data....Elapsed time: 99.81 seconds. 300 Channels parsed. Please wait
2025-01-27T02:50:10.322274763Z [INFO] Continuing to retrive local EPG data....Elapsed time: 147.48 seconds. 450 Channels parsed
2025-01-27T02:51:04.926229296Z [INFO] Continuing to retrive local EPG data....Elapsed time: 202.09 seconds. 600 Channels parsed. Please wait
2025-01-27T02:51:08.182439660Z [INFO] Retrieving local EPG data complete. Elapsed time: 205.34 seconds. 616 Channels parsed.
2025-01-27T02:52:06.530566000Z [INFO] EPG Scheduler Complete for local
2025-01-27T04:52:06.790410431Z [INFO] Running EPG Scheduler for local
2025-01-27T04:52:07.358427011Z [INFO] New token for local generated at 2025-01-27 04:52.07 +0000
2025-01-27T04:52:07.361043391Z [INFO] Retrieving local EPG data for 2025-01-29 through 2025-01-29
2025-01-27T04:52:54.614557837Z [INFO] Continuing to retrive local EPG data....Elapsed time: 47.25 seconds. 150 Channels parsed
2025-01-27T04:53:48.973281940Z [INFO] Continuing to retrive local EPG data....Elapsed time: 101.61 seconds. 300 Channels parsed. Please wait
2025-01-27T04:54:34.520317995Z [INFO] Continuing to retrive local EPG data....Elapsed time: 147.16 seconds. 450 Channels parsed
2025-01-27T04:55:28.652300224Z [INFO] Continuing to retrive local EPG data....Elapsed time: 201.29 seconds. 600 Channels parsed. Please wait
2025-01-27T04:55:32.036905345Z [INFO] Retrieving local EPG data complete. Elapsed time: 204.68 seconds. 616 Channels parsed.
2025-01-27T04:57:02.168616421Z [INFO] EPG Scheduler Complete for local
2025-01-27T06:57:02.281269742Z [INFO] Running EPG Scheduler for local
2025-01-27T06:57:02.282933185Z [INFO] Retrieving local EPG data for 2025-01-30 through 2025-01-30
2025-01-27T06:57:48.036262117Z [INFO] Continuing to retrive local EPG data....Elapsed time: 45.75 seconds. 150 Channels parsed
2025-01-27T06:58:40.627368607Z [INFO] Continuing to retrive local EPG data....Elapsed time: 98.34 seconds. 300 Channels parsed. Please wait
2025-01-27T06:59:26.772260026Z [INFO] Continuing to retrive local EPG data....Elapsed time: 144.49 seconds. 450 Channels parsed
2025-01-27T07:00:19.364293073Z [INFO] Continuing to retrive local EPG data....Elapsed time: 197.08 seconds. 600 Channels parsed. Please wait
2025-01-27T07:00:22.406909663Z [INFO] Retrieving local EPG data complete. Elapsed time: 200.12 seconds. 616 Channels parsed.
2025-01-27T07:02:25.360768698Z [INFO] EPG Scheduler Complete for local
2025-01-27T08:55:04.212219540Z [INFO] New token for local generated at 2025-01-27 08:55.04 +0000
2025-01-27T08:55:04.217800087Z [INFO] Updating Channel List for local
2025-01-27T08:55:18.577484172Z [INFO] Channel Listing for local Complete
2025-01-27T08:56:15.990586758Z [INFO] Returning Cached Channel List for local
2025-01-27T09:02:25.769240177Z [INFO] Running EPG Scheduler for local
2025-01-27T09:04:29.729721127Z [INFO] EPG Scheduler Complete for local
2025-01-27T11:04:30.122385434Z [INFO] Running EPG Scheduler for local
2025-01-27T11:04:30.123275979Z 4:07:27.840981: Updating data for local
2025-01-27T11:04:30.771380919Z [INFO] Retrieving local EPG data for 2025-01-27 through 2025-01-27
2025-01-27T11:05:16.130510252Z [INFO] Continuing to retrive local EPG data....Elapsed time: 45.36 seconds. 150 Channels parsed
2025-01-27T11:06:08.471244134Z [INFO] Continuing to retrive local EPG data....Elapsed time: 97.70 seconds. 300 Channels parsed. Please wait
2025-01-27T11:06:53.054307365Z [INFO] Continuing to retrive local EPG data....Elapsed time: 142.28 seconds. 450 Channels parsed
2025-01-27T11:07:45.645165519Z [INFO] Continuing to retrive local EPG data....Elapsed time: 194.87 seconds. 600 Channels parsed. Please wait
2025-01-27T11:07:48.729070186Z [INFO] Retrieving local EPG data complete. Elapsed time: 197.96 seconds. 616 Channels parsed.
2025-01-27T11:09:51.275479232Z [INFO] EPG Scheduler Complete for local
2025-01-27T13:09:51.984346360Z [INFO] Running EPG Scheduler for local
2025-01-27T13:11:53.402774599Z [INFO] EPG Scheduler Complete for local
2025-01-27T15:11:53.905243961Z [INFO] Running EPG Scheduler for local
2025-01-27T15:11:53.906140113Z 4:07:23.782998: Updating data for local
2025-01-27T15:11:55.604963526Z [INFO] New token for local generated at 2025-01-27 15:11.55 +0000
2025-01-27T15:11:55.606798584Z [INFO] Retrieving local EPG data for 2025-01-27 through 2025-01-27
2025-01-27T15:12:41.058289683Z [INFO] Continuing to retrive local EPG data....Elapsed time: 45.45 seconds. 150 Channels parsed
2025-01-27T15:13:33.705270380Z [INFO] Continuing to retrive local EPG data....Elapsed time: 98.10 seconds. 300 Channels parsed. Please wait
2025-01-27T15:14:19.027265746Z [INFO] Continuing to retrive local EPG data....Elapsed time: 143.42 seconds. 450 Channels parsed
2025-01-27T15:15:11.763356194Z [INFO] Continuing to retrive local EPG data....Elapsed time: 196.16 seconds. 600 Channels parsed. Please wait
2025-01-27T15:15:15.037304473Z [INFO] Retrieving local EPG data complete. Elapsed time: 199.43 seconds. 616 Channels parsed.
2025-01-27T15:17:17.192172975Z [INFO] EPG Scheduler Complete for local
2025-01-27T17:17:17.915342488Z [INFO] Running EPG Scheduler for local
2025-01-27T17:19:20.543293315Z [INFO] EPG Scheduler Complete for local
Yes this is expected. When the container initially starts, it pulls only day one to get something in relatively fast (was part of when this was single threaded) instead of waiting for all the API calls to get multiple days: Thus "Day One Initialization of EPG data" for the logs. After that the scheduler will call the current day again plus additional days to have a complete listing for four days
Sorry if I didn't make my question clear.
When will it fetch guide data for tomorrow?
It already fetched guide data for today (2025-01-27) three times this morning.
2025-01-27T11:04:30.122385434Z [INFO] Running EPG Scheduler for local
2025-01-27T11:04:30.123275979Z 4:07:27.840981: Updating data for local
2025-01-27T11:04:30.771380919Z [INFO] Retrieving local EPG data for 2025-01-27 through 2025-01-27
2025-01-27T11:05:16.130510252Z [INFO] Continuing to retrive local EPG data....Elapsed time: 45.36 seconds. 150 Channels parsed
2025-01-27T11:06:08.471244134Z [INFO] Continuing to retrive local EPG data....Elapsed time: 97.70 seconds. 300 Channels parsed. Please wait
2025-01-27T11:06:53.054307365Z [INFO] Continuing to retrive local EPG data....Elapsed time: 142.28 seconds. 450 Channels parsed
2025-01-27T11:07:45.645165519Z [INFO] Continuing to retrive local EPG data....Elapsed time: 194.87 seconds. 600 Channels parsed. Please wait
2025-01-27T11:07:48.729070186Z [INFO] Retrieving local EPG data complete. Elapsed time: 197.96 seconds. 616 Channels parsed.
2025-01-27T11:09:51.275479232Z [INFO] EPG Scheduler Complete for local
2025-01-27T13:09:51.984346360Z [INFO] Running EPG Scheduler for local
2025-01-27T13:11:53.402774599Z [INFO] EPG Scheduler Complete for local
2025-01-27T15:11:53.905243961Z [INFO] Running EPG Scheduler for local
2025-01-27T15:11:53.906140113Z 4:07:23.782998: Updating data for local
2025-01-27T15:11:55.604963526Z [INFO] New token for local generated at 2025-01-27 15:11.55 +0000
2025-01-27T15:11:55.606798584Z [INFO] Retrieving local EPG data for 2025-01-27 through 2025-01-27
2025-01-27T15:12:41.058289683Z [INFO] Continuing to retrive local EPG data....Elapsed time: 45.45 seconds. 150 Channels parsed
2025-01-27T15:13:33.705270380Z [INFO] Continuing to retrive local EPG data....Elapsed time: 98.10 seconds. 300 Channels parsed. Please wait
2025-01-27T15:14:19.027265746Z [INFO] Continuing to retrive local EPG data....Elapsed time: 143.42 seconds. 450 Channels parsed
2025-01-27T15:15:11.763356194Z [INFO] Continuing to retrive local EPG data....Elapsed time: 196.16 seconds. 600 Channels parsed. Please wait
2025-01-27T15:15:15.037304473Z [INFO] Retrieving local EPG data complete. Elapsed time: 199.43 seconds. 616 Channels parsed.
2025-01-27T15:17:17.192172975Z [INFO] EPG Scheduler Complete for local
2025-01-27T17:17:17.915342488Z [INFO] Running EPG Scheduler for local
2025-01-27T17:19:20.543293315Z [INFO] EPG Scheduler Complete for local
2025-01-27T17:41:00.032306111Z [INFO] Returning Cached Channel List for local
2025-01-27T19:19:21.099337958Z [INFO] Running EPG Scheduler for local
2025-01-27T19:19:21.100333612Z 4:07:27.194025: Updating data for local
2025-01-27T19:19:22.283158686Z [INFO] New token for local generated at 2025-01-27 19:19.22 +0000
2025-01-27T19:19:22.285417323Z [INFO] Retrieving local EPG data for 2025-01-27 through 2025-01-27
2025-01-27T19:20:08.332293414Z [INFO] Continuing to retrive local EPG data....Elapsed time: 46.05 seconds. 150 Channels parsed
2025-01-27T19:21:01.826241349Z [INFO] Continuing to retrive local EPG data....Elapsed time: 99.54 seconds. 300 Channels parsed. Please wait
2025-01-27T19:21:48.034348380Z [INFO] Continuing to retrive local EPG data....Elapsed time: 145.75 seconds. 450 Channels parsed
2025-01-27T19:22:42.736337345Z [INFO] Continuing to retrive local EPG data....Elapsed time: 200.45 seconds. 600 Channels parsed. Please wait
2025-01-27T19:22:45.864654084Z [INFO] Retrieving local EPG data complete. Elapsed time: 203.58 seconds. 616 Channels parsed.
2025-01-27T19:24:47.982977561Z [INFO] EPG Scheduler Complete for local
Simple answer - if it has pulled data for tomorrow already it will not do so again until tomorrow.
Basically, The logic is to pull day 1 API, the next time the scheduler is called it will pull day 2 (tomorrow), third call will pull day 3 and so on until there is data for every day up to 4 days worth of EPG data. If no data is pulled during any of those first four days, it would reattempt that day on the subsequent pull. After that the scheduler will pull todays data again on the next attempt. This ensures any changes to the EPG for today would be caught relatively quickly so as to update the most recent programming changes if one occurs.
At 00:00 UTC the next subsequent call the scheduler would shift everything by 1 day, making tomorrow day 1 (i.e today) and then call the API for that day, again updating any changes to programming for the day. The call would call day 4 to bring in the fourth days programming would again continue to update todays EPG programming on subsequent calls.
That makes sense. Thanks for the explanation.
Any idea why the Plex container took more than 12 seconds to return the M3U playlist?
Channels timed out refreshing the M3U playlist. Pretty sure Channels only waits 12 seconds for a response.
2025/01/27 00:55:15.460914 [ERR] Failed to request m3u for Plex: Get "http://192.168.1.3:7781/plex/local/playlist.m3u": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
Plex container log shows this
2025-01-27T08:55:04.212219540Z [INFO] New token for local generated at 2025-01-27 08:55.04 +0000
2025-01-27T08:55:04.217800087Z [INFO] Updating Channel List for local
2025-01-27T08:55:18.577484172Z [INFO] Channel Listing for local Complete
2025-01-27T08:56:15.990586758Z [INFO] Returning Cached Channel List for local
no errors, just the typical retrieving data logs.
i've resorted to just closing the app on the apple tv and reopening it, which refreshes the data. i'd say this issue is on the channels side. i only see it for this source though.
Apologies if this is mentioned elsewhere and I've just missed it...I'm using Plex/Pluto/Tubi for Channels. The sources go into SLM and I get the combined HLS m3u and epg which go into a source for Channels DVR.
It all worked great, but sometime in the last week or two I have started seeing that the Plex channels keep getting recognized as new every time SLM pulls the Plex for Channels source - it's the same list, but every channel is enabled so I get a bunch I'd already disabled and the EPG info isn't matched. It's like the channel ID is changing. I would imagine the handling for these is all pretty consistent as they are all @jgomez177 containers, so I don't know what is wrong or how to fix it.
Any ideas? I can't keep setting up the "new" channels every day.
I'm not experiencing that feeding directly into Channels DVR.
Portainer Stack > plex-for-channels-jg
version: '3.9'
services:
# GitHub home for this project with setup instructions: https://github.com/jgomez177/plex-for-channels
# Docker container home for this project: https://ghcr.io/jgomez177/plex-for-channels
plex-for-channels:
image: ghcr.io/jgomez177/plex-for-channels:${TAG}
container_name: plex-for-channels
ports:
- ${HOST_PORT}:${PLEX_PORT}
environment:
- PLEX_PORT=${PLEX_PORT}
- PLEX_CODE=${PLEX_CODE}
restart: unless-stopped
Environment variables
TAG=latest
HOST_PORT=7781
PLEX_PORT=7777
PLEX_CODE=local
I'm not experiencing this issue in SLM, either, and I'm using Plex, as well:
Would need to see your settings, but I'm thinking you're either mixing sources or are not up to date with the Plex container or some combination thereof. A station is only "new" if the title, channel-id, or source playlist name change or are added. I'd recommend:
-
Confirm Plex container is up to date
-
Delete your Plex playlist(s) in SLM
-
Confirm you no longer have any Plex stations using Controls -> Files -> All Stations
If there are any, then you might have to do a manual fix.
- Add your Plex source(s) and do your assignments. Run a few manual updates to confirm there are no issues.
I'm testing a theory right now. The only part I overlooked about my flow is that it goes into Iptvboss, as this has been pretty transparent in passing everything through unaltered. BUT, I noticed in source settings it has an option to indicate if your source uses tokens. I've never had to touch that, but in looking at the P4C logs and seeing messages about token generation, I've enabled it on that source. Waiting to see if that helps resolve this. I definitely don't think it's SLM at all, rather IPTVB or P4C, and likely the former if no one else is seeing this.
I'll follow the steps above if this doesn't resolve it, and I'll report back either way.
Me neither