Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Future potential env variable to determine what lists to add #14

Open
Mikoshi-nyudo opened this issue Feb 22, 2025 · 10 comments
Open

Future potential env variable to determine what lists to add #14

Mikoshi-nyudo opened this issue Feb 22, 2025 · 10 comments
Labels
Type ◦ Feature Feature request

Comments

@Mikoshi-nyudo
Copy link

As requested on discord - for the future. Is it possible to incorporate user variables to enable or disable lists to add i.e. TVapp.to, TVpass.org, MOJ, etc..

For example, I still run dtank's two dockers (with minor mods) TVapp.to and FreeIPTV channels with US SamsungTV and US PlexTV playlists (using mfirewire's updating channels.json rather than dtank's obsolete and missing file), and would love the option in the future to select just those extra two for a combined merged US-IP-based m3u playlist (and potentially proxy all 3 through the docker on a dedicated VPN box, as outside USA).

I understand that atm it's just MOJ, and that there maybe plans to add other lists down the track. It would be nice feature to have a single docker solution that proxies streams like TVapp.to does now for all of the above US content - compared to currently needing the enable a VPN on the client for just Samsung and Plex US channels.

So in part this is a feature request for

a.) user variables to enable/disable specific streaming playlist/s
b.) and to enable proxying of stream like TVapp.to does already for other US region playlist like SamsungTVPlus and Plex.

Thanks for considering it.

@Aetherinox Aetherinox added the Type ◦ Feature Feature request label Feb 22, 2025
@Aetherinox
Copy link
Collaborator

Thanks for this. We'll add it to the list and see where we can fit it into the schedule.

@craftcm
Copy link

craftcm commented Feb 24, 2025

I'll second this. I really appreciate the work being invested into this project. I'm seeing duplicate channels in Jellyfin which I assume is because some channels are being included from two or more sources, but please correct me if I am mistaken.

@iFlip721
Copy link
Collaborator

That's right. When we started to recover and rebuild on the work dtank started we included 3 different sources based on some input from other users early on. Thought this was a novel idea to include in a single M3U as redundancy/backup in case one source stream was either down or experiencing latency. This proves to be fairly useful depending on the client. But, in some cases, people may want to have a choice as to whether one or more source is included. We're looking at env variables along side bootstrap to customize the output. Unfortunately me and the family are recovering from a nasty flu that hit us all around the same time. More to come on this feature. Thanks for the input.

@Aetherinox
Copy link
Collaborator

Aetherinox commented Feb 25, 2025

For the record in case @iFlip721 did not see it. Env variable implementation is ready to go in the project (through s6). I integrated it (yesterday?) or Saturday. Env vars can be defined in the Dockerfile and then just called in the index.js as they would with any other NodeJS project.

Dockerfile

ENV VAR_NAME=Timmy

Index.js

console.log( ${process.env.VAR_NAME} ) // Timmy

docker-compose.yml

User can then specify the env var in their docker-compose or docker run command. The example below overrides Timmy with Bob when the container is spun up.

services:
    tvapp2:
        container_name: tvapp2
        image: ghcr.io/thebinaryninja/tvapp2:latest
        environment:
            VAR_NAME: "Bob"

Index.js

Timmy has been replaced by the new favorite, Bob; poor Timmy.

console.log( ${process.env.VAR_NAME} ) // Bob

@Mikoshi-nyudo
Copy link
Author

I guess some users might prefer combined m3u playlists and others separate ones. And then others to have control over which playlists they enable/disable. Hard to cater for everyone in any case I guess.

Personally, I liked the simplicity of dtank's free-iptv-channels docker for the reason it allowed one to merely call via customisable URLs for whatever they wanted. I just wished it proxy'd those streams like the TVapp docker does for all clients on my lan for the US IP required playlists, rather than feeding the direct server host addresses to the clients.

His Plex feed was most impressive, and worth checking out in how he handled it if you haven't already.

Appreciate the thought you're both putting into it, and hopefully you figure out the best way to handle and cater for it earlier on in the roadmap, so as to make it easier for you in the longer term when deciding to add other lists/sources or even merge his other docker into it too.

@Aetherinox
Copy link
Collaborator

Aetherinox commented Feb 25, 2025

Yeah, we'll look into making it better. Unfortunately, right before we took on this project, I had come down with a major version of the flu. I was just recovering when I heard that dtank left. So I took a few days to reach out to him since him and I spoke on Discord.

After he went MIA, iFlip and I met up, and then shortly after that, flip got the flu (and his partner). So it was horrible timing to try and put this together, granted, it was quick. It wasn't without challenges. And this wasn't just a cold, this is probably the worst flu I ever experienced, not sure about flip, but I was awake for maybe 30 minutes at a time and then I was back in bed.

But we'll definitely look at implementing some of these features and polish it up.

@Mikoshi-nyudo
Copy link
Author

Mikoshi-nyudo commented Feb 25, 2025

Sorry to hear about the issues surrounding the timing and flu/s for both of you. All the more impressive and admirable with what you've done under the trying circumstances.

Given the varying needs and probably best to keep it as simple as possible yet cater as wide as possible I'd have thought that it makes sense to have environment variables for features/routines like enabling merged playlists and proxying streams on LAN.

And then have playlists to be called varied by customisable URL requests like dtank's free-iptv-channel docker. I appreciate however that would require a re-write of the TVapp.to source so it could be called via URLs, if one were to seek to merge the features of both of his dockers, and then add other sources like MOJ, DaddyLive etc..

Of course, it's easier to present an idea or concept than actually putting it in place and determining the best course of approach for implementation. Many thanks, and hope both of you (and families) recover from the nasty bugs.

@Aetherinox
Copy link
Collaborator

Aetherinox commented Feb 25, 2025

Actually, now that you mention it, I either didn't see it, or just didn't use it. But I don't recall a customizable URL setting. I'll have to grab the source code and go back through it. Flip probably recalls seeing it.

This repo was originally mine for another docker image I created which gave users an actual website for dtank's scripts, before dtank added his own webserver. (Here's a screenshot of it at the bottom in the readme if you don't remember or haven't seen it: https://github.com/TheBinaryNinja/tvapp2/tree/app-legacy or here's the image: https://github.com/TheBinaryNinja/tvapp2/blob/app-legacy/docs/img/banner.png )

Mine included a customizable URL env variable. It defaulted to dtank's repo, however, there was an option to override the URL to really enter any URL and provide a .m3u and .epg location. So really it works for any site with those files, even our new image. But I don't recall dtank's URL property. I'll have to go digging. I assume it was for filtering / excluding results.

But if I'm guessing right about it filtering, it shouldn't be too difficult to add. Flip can decide if he wants to take on this, or if not, I can implement it. I'm not sure what flip has planned in the pipeline since he's also working on bootstrap, and I don't want to override his work or what plans he has currently. So I'll let him take a look and decide the best course of action.

@Mikoshi-nyudo
Copy link
Author

Makes sense. You could also pull his docker https://hub.docker.com/r/dtankdemp/free-iptv-channels to check out the customizable URLs in action as it works well on the 2 playlists I use.

Also you can see his code in this fork https://github.com/mfirewire/free-iptv-channels (which updates the plex channels.json) so if you replace the CHANNELS_JSON_URL call from dtank's repository to mfirewire's it'll still work.

Or just review his index.s in the node folder for his routines/functions. HTH

@Aetherinox
Copy link
Collaborator

Thanks, I'll check those out. I have his original TheTVApp docker image, I pulled it about a day after he disappeared from Dockerhub and then extracted the image structure. I just never noticed he had a customizable URL parameter.

Once I get a second, I'll look at it and see how we can tie it into ours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type ◦ Feature Feature request
Projects
Status: No Status
Development

No branches or pull requests

4 participants