GithubHelp home page GithubHelp logo

maddox / pluto-for-channels Goto Github PK

View Code? Open in Web Editor NEW
79.0 22.0 29.0 280 KB

:tv: M3U generator optimized for Channels' custom channels.

License: MIT License

Dockerfile 2.82% Shell 8.03% HTML 3.87% JavaScript 85.28%
channels-dvr-server pluto custom-channels

pluto-for-channels's Introduction

Pluto for Channels

This simple Docker image will generate an M3U playlist and EPG optimized for use in Channels and expose them over HTTP.

Channels supports custom channels by utilizing streaming sources via M3U playlists.

Channels allows for additional extended metadata tags in M3U playlists that allow you to give it extra information and art to make the experience better. This project adds those extra tags to make things look great in Channels.

Set Up

Running the container is easy. Fire up the container as usual. You can set which port it runs on.

docker run -d --restart unless-stopped --name pluto-for-channels -p 8080:80 jonmaddox/pluto-for-channels

You can retrieve the playlist and EPG via the status page.

http://127.0.0.1:8080

Optionally have multiple feeds generated

By using the VERSIONS env var when starting the docker container, you can tell it to create multiple feeds that can be used elsewhere.

Simply provide a comma separated list of words without spaces with the VERSIONS env var.

docker run -d --restart unless-stopped --name pluto-for-channels -p 8080:80 -e VERSIONS=Dad,Bob,Joe jonmaddox/pluto-for-channels

Optionally provide a starting channel number

By using the START env var when starting the docker container, you can tell it to start channel numbers with this value. Original Pluto channel numbers will be added to this, keeping all of the channels in the same order they are on Pluto.

You should use a starting number greater than 10000, so that the channel numbers will be preserved but not conflict with any other channels you may have.

For example, channel 345 will be 10345. Channel 2102 will be 12102.

Simpley provide a starting number with the START env var.

docker run -d --restart unless-stopped --name pluto-for-channels -p 8080:80 -e START=80000 jonmaddox/pluto-for-channels

Add Source to Channels

Once you have your Pluto M3U and EPG XML available, you can use it to custom channels channels in the Channels app.

Add a new source in Channels DVR Server and choose M3U Playlist. Fill out the form using your new playlist URL.

Next, set the provider for your new source and choose custom URL.

Finally, enter your EPG xml url and set it to refresh every 6 hours.

pluto-for-channels's People

Contributors

irctrakz avatar maddox avatar tmm1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pluto-for-channels's Issues

Release 1.2.8 - Welcome to nginx!

Everything is probably fine, but just wanted to verify. I updated to 1.2.8. In a browser, when I go to the root page of my local Pluto IP I get the following. There is no mention of Pluto. But I believe it previously did mention "Pluto for Channels" or something like that. It might be nothing, but just wanted to make sure you're aware!

Welcome to nginx!
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.

Issue preventing the m3u and epg file creation 2

Started having the following issue. Did try to make sure I was using the latest image:

date stream content
2021-07-14 18:32:24 stdout Last ran: Wed Jul 14 18:32:24 UTC 2021
2021-07-14 18:32:24 stdout mv: can't rename '*epg.xml': No such file or directory
2021-07-14 18:32:24 stdout mv: can't rename '*playlist.m3u': No such file or directory
2021-07-14 18:32:24 stdout
2021-07-14 18:32:24 stdout (node:13) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
2021-07-14 18:32:24 stdout (node:13) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
2021-07-14 18:32:24 stdout at processTicksAndRejections (internal/process/task_queues.js:93:5)
2021-07-14 18:32:24 stdout at /usr/src/app/index.js:97:7
2021-07-14 18:32:24 stdout at /usr/src/app/index.js:322:5
2021-07-14 18:32:24 stdout at processChannels (/usr/src/app/index.js:171:12)
2021-07-14 18:32:24 stdout at Array.forEach ()
2021-07-14 18:32:24 stdout at /usr/src/app/index.js:188:27
2021-07-14 18:32:24 stdout at Array.forEach ()
2021-07-14 18:32:24 stdout at /usr/src/app/index.js:235:53
2021-07-14 18:32:24 stdout (node:13) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'originalReleaseDate' of null
2021-07-14 18:32:24 stdout [INFO] Adding instance of Pluto Headline News: Voting Bill Battle Heats Up & More to channel Pluto TV News.

'clip' property is null preventing m3u/epg creation

[INFO] Adding instance of LUCHA LIBRE AAA: SPECIAL EVENT  REY DE REYES to channel Lucha Libre AAA.
[INFO] Adding instance of LUCHA LIBRE AAA to channel Lucha Libre AAA.
[INFO] Adding instance of LUCHA LIBRE AAA to channel Lucha Libre AAA.
[INFO] Adding instance of LUCHA LIBRE AAA to channel Lucha Libre AAA.
[INFO] Adding instance of LUCHA LIBRE AAA to channel Lucha Libre AAA.
/usr/src/app/index.js:235
                text: moment(programme.episode.clip.originalReleaseDate).format('YYYYMMDD'),
                                                    ^

TypeError: Cannot read property 'originalReleaseDate' of null
    at /usr/src/app/index.js:235:53
    at Array.forEach (<anonymous>)
    at /usr/src/app/index.js:188:27
    at Array.forEach (<anonymous>)
    at processChannels (/usr/src/app/index.js:171:12)
    at /usr/src/app/index.js:322:5
    at Object.grabJSON (/usr/src/app/index.js:39:9)
    at /usr/src/app/index.js:321:13
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (/usr/src/app/index.js:320:10)

mv: can't rename '*playlist.m3u': No such file or directory
mv: can't rename '*epg.xml': No such file or directory

Minor issue in 1.0.18 reaching index.html

Hi,
Been running 1.0.17 for a couple weeks with no real issues.

I just upgraded to 1.0.18 on my qnap.

I had to of course use a different port (8282) as qnap uses 8080 . and all seems fine with one minor glitch:

Calling the url:

http://192.168.2.102:8282

Brings up the generic NGINX welcome page, I had to append /index.html to see the status page.

So not a major issue, but thought you'd like to know.

Why is Docker needed?

Hi there. What does Docker have to do with Channels?
From what I understand, Docker is like VMWare or VirtualBox.
This seems like bloatware.
There are already Pluto TV EPG and M3U8 generators out there. What makes this project so unique?
I don't meant to sound rude or anything. I'm genuinely curious.

does this suffer from the same....

Does this suffer from the same Stuttering/freezing on commercials as the other Pluto TV solutions do?

If it does, No sense in installing it to find out it does.

Welcome to nginx! displayed when accessing

Since updating to the latest version, it now just loads the nginx welcome screen when trying to access it in a browser. Access to the playlist and epg pages still function correctly.

xml date fields reversed

Not sure if Pluto made a recent change, but in index.js the position of
firstAired and originalReleaseDate are reversed

Noticed because the dates in the guide showing the Movie release were all showing as 2020.

Quotation marks in tvc-guide-description field are not entirely removed

I'm using your docker image to import the Pluto Channels to TvHeadend, thanks for providing it!
During import, I saw some weird data parsed from the m3u. I could also reproduce this parsing error with VLC player.

With V1.2.9, not all quotation marks are removed from the tvc-guide-description field of the m3u file.
Example:
#EXTINF:0 channel-id="chaos-city-de" channel-number="130" tvg-logo="http://images.pluto.tv/channels/60afbad343e3840007164348/colorLogoPNG.png" tvc-guide-art="http://images.pluto.tv/channels/60afbad343e3840007164348/featuredImage.jpg?fill=blur&fit=fill&fm=jpg&h=562&q=75&w=1000" tvc-guide-title="Chaos City" tvc-guide-description="In der US Sitcom Chaos City" ist Chaos vorprogrammiert! Begleitet Michael J. Fox und Charlie Sheen dabei, wie sie den chaotischen Arbeitsalltag in einem New Yorker Rathaus meistern." group-title="Serien", Chaos City
(see " after 'US Sitcom Chaos City')

I suppose this is due to index.js:366 removing only the first occurrence of " and ”, not all.

let guideDescription = channel.summary
        .replace(/(\r\n|\n|\r)/gm, " ")
        .replace('"', "")
        .replace("”", "");

Not a js expert, but this might fix it:

let guideDescription = channel.summary
        .replace(/(\r\n|\n|\r)/gm, " ")
        .replaceAll('"', "")
        .replaceAll("”", "");

Other providers?

Hi, I appreciate this is a solution for Pluto.tv but it strikes me that this could also be used to help with other providers, especially if you have more than the 500 channel limit that's currently in place with Channels.

Would it be possible to develop it (or a separate branch) so you can feed in a custom m3u and xml file that is then parsed correctly for Channels. It would also be useful to have the ability to target a specific group in the m3u to get around the 500 channel limit.

Thanks

Error on EPG

Hi
My EPG is not updating.
Error from docker logs is>

PS C:\Windows\system32> docker logs pluto-for-channels
[INFO] Grabbing EPG...
http://api.pluto.tv/v2/channels?start=2021-05-03%2013%3A00%3A00.000%2B0000&stop=2021-05-03%2019%3A00%3A00.000%2B0000
http://api.pluto.tv/v2/channels?start=2021-05-03%2019%3A00%3A00.000%2B0000&stop=2021-05-04%2001%3A00%3A00.000%2B0000
http://api.pluto.tv/v2/channels?start=2021-05-04%2001%3A00%3A00.000%2B0000&stop=2021-05-04%2007%3A00%3A00.000%2B0000
http://api.pluto.tv/v2/channels?start=2021-05-04%2007%3A00%3A00.000%2B0000&stop=2021-05-04%2013%3A00%3A00.000%2B0000
undefined:1
undefined
^

SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse ()
at Request._callback (/usr/src/app/index.js:120:26)
at self.callback (/usr/src/app/node_modules/request/request.js:185:22)
at Request.emit (events.js:210:5)
at Request.onRequestError (/usr/src/app/node_modules/request/request.js:877:8)
at ClientRequest.emit (events.js:210:5)
at Socket.socketErrorListener (_http_client.js:407:9)
at Socket.emit (events.js:210:5)
at emitErrorNT (internal/streams/destroy.js:84:8)
at processTicksAndRejections (internal/process/task_queues.js:80:21)

mv: can't rename '*playlist.m3u': No such file or directory
Last ran: Mon May 3 13:37:17 UTC 2021
mv: can't rename '*epg.xml': No such file or directory
2021/05/03 13:37:41 [error] 10#10: *1 open() "/usr/share/nginx/html/playlist.m3u" failed (2: No such file or directory), client: 192.168.1.250, server: localhost, request: "GET /playlist.m3u HTTP/1.1", host: "192.168.1.250:7979"
192.168.1.250 - - [03/May/2021:13:37:41 +0000] "GET /playlist.m3u HTTP/1.1" 404 153 "-" "Go-http-client/1.1" "-"
2021/05/03 13:38:02 [error] 10#10: *2 open() "/usr/share/nginx/html/epg.xml" failed (2: No such file or directory), client: 192.168.1.250, server: localhost, request: "GET /epg.xml HTTP/1.1", host: "192.168.1.250:7979"
192.168.1.250 - - [03/May/2021:13:38:02 +0000] "GET /epg.xml HTTP/1.1" 404 153 "-" "Mozilla/5.0 ChannelsDVR+XMLTV/1.0" "-"
192.168.1.250 - - [03/May/2021:13:42:38 +0000] "GET /playlist.m3u HTTP/1.1" 404 153 "-" "Go-http-client/1.1" "-"
2021/05/03 13:42:38 [error] 10#10: *3 open() "/usr/share/nginx/html/playlist.m3u" failed (2: No such file or directory), client: 192.168.1.250, server: localhost, request: "GET /playlist.m3u HTTP/1.1", host: "192.168.1.250:7979"
192.168.1.250 - - [03/May/2021:13:42:41 +0000] "GET /epg.xml HTTP/1.1" 404 153 "-" "Mozilla/5.0 ChannelsDVR+XMLTV/1.0" "-"
2021/05/03 13:42:41 [error] 10#10: *4 open() "/usr/share/nginx/html/epg.xml" failed (2: No such file or directory), client: 192.168.1.250, server: localhost, request: "GET /epg.xml HTTP/1.1", host: "192.168.1.250:7979"

Can't update to 1.0.18

This is probably just me being dumb, but I am unable to update to Synology docker container to v1.0.18.

I have the latest image: (I have actually tried :latest as well as :1.0.18)
image

And my container is using :latest. I have tried clearing the container and ever completely removing and recreating it
image

But no matter what I do, it still thinks I have v1.0.17
image

Please tell me what stupid thing I am doing here!

Unable to tune Pluto CNN Headlines channel

I have been unable to tune the Pluto CNN Headlines channel for some time now. Most or all of my other Pluto channels work. And I am able to tune this channel directly on the Pluto website. Error from Channels log below.

2024/02/21 17:40:40.444343 [ERR] Could not start stream for M3U-PlutoTV ch9563 CNN HEADLINES: M3U: Could not fetch playlist from cfd-v4-service-channel-stitcher-use1-1.prd.pluto.tv: GET: https://cfd-v4-service-channel-stitcher-use1-1.prd.pluto.tv/stitch/hls/channel/5421f71da6af422839419cb3/master.m3u8?advertisingId=&appName=web&appStoreUrl=&appVersion=unknown&architecture=&buildVersion=&clientTime=0&deviceDNT=0&deviceId=3d45a5dd-d10a-11ee-ae63-0011329a6dcf&deviceMake=Chrome&deviceModel=web&deviceType=web&deviceVersion=unknown&includeExtendedEvents=false&serverSideAds=true&sid=56ac3835-5910-4b61-9802-4a9c54357907&userId=: 401 Unauthorized

empty sub-title causes formatting problems

Using the shorthand for an empty sub-title in epg.xml
<sub-title lang="en"/>
can cause formatting problems in the timeline display (not sure what you are calling this) when the stream is playing. The show name partially overlays the timeline.

Can be corrected by using the full version
<sub-title lang="en"> </sub-title>

Vevo 2K no longer appearing

Up until a few days ago, I was able to watch and record Pluto TV's channel "Vevo 2k" in the Channels app, by way of this Docker. Now that channel is no longer showing.

Thanks for any updates or info. Much appreciated!

Videos Don't Load

Is Pluto blocking by referrer? Can't seem to get any links to load locally or thru an online M3U player.

Referencing property of null object results in guide not building

[INFO] Adding instance of Monkey King 2 to channel Flicks of Fury.
[INFO] Adding instance of Tsui Hark's Vampire Hunters to channel Flicks of Fury.
[INFO] Adding instance of Detective Dee and the Mystery of the Phantom Flame to channel Flicks of Fury.
[INFO] Adding instance of Detective Dee and the Mystery of the Phantom Flame to channel Flicks of Fury.
[INFO] Adding instance of Executioners From Shaolin to channel Flicks of Fury.
/usr/src/app/index.js:207
airingArt = programme.episode.poster.path
^
TypeError: Cannot read property 'path' of undefined
at /usr/src/app/index.js:207:50
at Array.forEach ()
at /usr/src/app/index.js:182:27
at Array.forEach ()
at /usr/src/app/index.js:165:12
at Object.grabJSON (/usr/src/app/index.js:33:9)
at Object. (/usr/src/app/index.js:99:11)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1103:10)
at Module.load (internal/modules/cjs/loader.js:914:32)
mv: can't rename 'playlist.m3u': No such file or directory
mv: can't rename 'epg.xml': No such file or directory
Last ran: Sun Dec 27 00:28:42 UTC 2020

Issue preventing the m3u and epg file creation

There seems to be an issue that I'm encountering which is preventing the creation of the m3u and epg files. Below is the information in the docker logs. The Playlist and EPG links both generate 404 errors because the files are not being created as a result of the error.

INFO] Grabbing EPG...
http://api.pluto.tv/v2/channels?start=2021-02-02%2020%3A00%3A00.000%2B0000&stop=2021-02-03%2002%3A00%3A00.000%2B0000
http://api.pluto.tv/v2/channels?start=2021-02-03%2002%3A00%3A00.000%2B0000&stop=2021-02-03%2008%3A00%3A00.000%2B0000
http://api.pluto.tv/v2/channels?start=2021-02-03%2008%3A00%3A00.000%2B0000&stop=2021-02-03%2014%3A00%3A00.000%2B0000
http://api.pluto.tv/v2/channels?start=2021-02-03%2014%3A00%3A00.000%2B0000&stop=2021-02-03%2020%3A00%3A00.000%2B0000
undefined:1
undefined
^

SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse ()
at Request._callback (/usr/src/app/index.js:70:24)
at self.callback (/usr/src/app/node_modules/request/request.js:185:22)
at Request.emit (events.js:210:5)
at Request.onRequestError (/usr/src/app/node_modules/request/request.js:877:8)
at ClientRequest.emit (events.js:210:5)
at Socket.socketErrorListener (_http_client.js:407:9)
at Socket.emit (events.js:210:5)
at emitErrorNT (internal/streams/destroy.js:84:8)
at processTicksAndRejections (internal/process/task_queues.js:80:21)

mv: can't rename '*playlist.m3u': No such file or directory
mv: can't rename '*epg.xml': No such file or directory
Last ran: Tue Feb 2 20:49:20 UTC 2021

Close captions

Hi
Thank you very much for this.
It woks great, but i miss close captions on channels DVR.
On Pluto TV app for android TV or Apple TV they have close captions available on most channels.
It is possible to include this on future update?
Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.