Frndly TV for Channels

@matthuisman
Could you update the stationid's to Decades=122694, Heroes & Icons=120460.
The current stationid 74916 is correct for StartTV.

Thanks

1 Like

I signed up for the trial account an trying to use the non-docker version on Raspberry Pi 3 running debian stretch based raspbian.

python app.py --PORT 8183 --USERNAME "[email protected]" --PASSWORD "secret"

File "app.py", line 27
self.wfile.write(f'Error: {message}'.encode('utf8'))

Not sure where to go with that. This is why I usually avoid python, perl and the like. When it fails I have no idea what to do.

Try upgrading to python 3.

I did that for something else , believe me it was a big "PITA " and that is the very reason I HATE python . Its now at 3.8 .

These forums suck. Too much scrolling with page loads.

I got it to run now on a different machine with the same version of Python (i'll never understand python and its quirks). It starts a server but did not create any files there..

update
had a bad password!
Working now .

@matthuisman StartTV stationid should be changed to 122695.

Using the method I described here Picking the correct tvc-guide-stationid for a channel
and looking at 16 days of airings (386 airings), stationid's 74916, 109454 and 122772 are identical.
stationid 122695 has 11 of 386 airings different.
I recorded 3 of the differences and found stationid 122695 has the correct listings.
Here's 2 of them from last Sunday.and stationid 122695 on the right side was correct.

If anyone wants to verify, the next difference is airing tonight at 9pm PT.
The listing on the left side is stationid 74916
The listing on the right side is stationid 122695

The one after that is tomorrow night at 9PM PT.
left side is stationid 74916, right side is stationid 122695

And here's all 11 differences in 16 days of listings, not much

3 Likes

:astonished: Very nice investigation work!:+1:

1 Like

have updated starttv to 122695

2 Likes

ok, my FrndlyTV seven day trial is quickly running out and still no joy...

First to the author of FrndlyTV for Channels.... Good work but Channels looks like they have no free tier. I do not want to be a cord cutter getting nickeled and dimed to death on small fees here and there that add up to the same cost as a basic cable subscription.

So I have tried a few other DVRs and I have very similar results with them . some like NextPVR will not take the epg.xml generated by this script at all. Others like TVMosacCE take it but seem to not recognize it. I am pretty sure something does not come out quite right from the script with the epg.xml file..

Also there are issues with some other DVRs not playing these links. I can see they point to my Raspberry Pi where I am running the script. and the script generates the following error when I try to access it from TVMosaic.

Someone will probably say it is a python problem or something but I can extract the link from the m3u8 file and open the link from a desktop computer with VLC or Celluloid without issue. I can see there is no error and the "frndlytv-for-channels" is happy with VLC or Celluloid, but not with some of the servers..

10.0.0.230 - - [13/May/2022 21:35:09] "GET /play/4.m3u8 HTTP/1.1" 500 -
----------------------------------------
Exception happened during processing of request from ('10.0.0.230', 58019)
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/socketserver.py", line 650, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/local/lib/python3.8/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/opt/xmltv/frndlytv/app.py", line 22, in __init__
    super().__init__(*args, **kwargs)
  File "/usr/local/lib/python3.8/socketserver.py", line 720, in __init__
    self.handle()
  File "/usr/local/lib/python3.8/http/server.py", line 426, in handle
    self.handle_one_request()
  File "/usr/local/lib/python3.8/http/server.py", line 414, in handle_one_request
    method()
  File "/opt/xmltv/frndlytv/app.py", line 51, in do_GET
    self._error(e)
  File "/opt/xmltv/frndlytv/app.py", line 49, in do_GET
    routes[func]()
  File "/opt/xmltv/frndlytv/app.py", line 55, in _play
    url = frndly.play(slug)
  File "/opt/xmltv/frndlytv/frndly.py", line 36, in play
    path = self._channel_path(slug)
  File "/opt/xmltv/frndlytv/frndly.py", line 94, in _channel_path
    for row in self.guide([channel_id])[channel_id]:
KeyError: '4'
----------------------------------------
10.0.0.230 - - [13/May/2022 21:35:11] "GET /play/4.m3u8 HTTP/1.1" 500 -
----------------------------------------
Exception happened during processing of request from ('10.0.0.230', 58020)
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/socketserver.py", line 650, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/local/lib/python3.8/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/opt/xmltv/frndlytv/app.py", line 22, in __init__
    super().__init__(*args, **kwargs)
  File "/usr/local/lib/python3.8/socketserver.py", line 720, in __init__
    self.handle()
  File "/usr/local/lib/python3.8/http/server.py", line 426, in handle
    self.handle_one_request()
  File "/usr/local/lib/python3.8/http/server.py", line 414, in handle_one_request
    method()
  File "/opt/xmltv/frndlytv/app.py", line 51, in do_GET
    self._error(e)
  File "/opt/xmltv/frndlytv/app.py", line 49, in do_GET
    routes[func]()
  File "/opt/xmltv/frndlytv/app.py", line 55, in _play
    url = frndly.play(slug)
  File "/opt/xmltv/frndlytv/frndly.py", line 36, in play
    path = self._channel_path(slug)
  File "/opt/xmltv/frndlytv/frndly.py", line 94, in _channel_path
    for row in self.guide([channel_id])[channel_id]:
KeyError: '4'
----------------------------------------
10.0.0.230 - - [13/May/2022 21:35:14] "GET /play/4.m3u8 HTTP/1.1" 500 -
----------------------------------------
Exception happened during processing of request from ('10.0.0.230', 58021)
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/socketserver.py", line 650, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/local/lib/python3.8/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/opt/xmltv/frndlytv/app.py", line 22, in __init__
    super().__init__(*args, **kwargs)
  File "/usr/local/lib/python3.8/socketserver.py", line 720, in __init__
    self.handle()
  File "/usr/local/lib/python3.8/http/server.py", line 426, in handle
    self.handle_one_request()
  File "/usr/local/lib/python3.8/http/server.py", line 414, in handle_one_request
    method()
  File "/opt/xmltv/frndlytv/app.py", line 51, in do_GET
    self._error(e)
  File "/opt/xmltv/frndlytv/app.py", line 49, in do_GET
    routes[func]()
  File "/opt/xmltv/frndlytv/app.py", line 55, in _play
    url = frndly.play(slug)
  File "/opt/xmltv/frndlytv/frndly.py", line 36, in play
    path = self._channel_path(slug)
  File "/opt/xmltv/frndlytv/frndly.py", line 94, in _channel_path
    for row in self.guide([channel_id])[channel_id]:
KeyError: '4'
----------------------------------------
10.0.0.230 - - [13/May/2022 21:35:17] "GET /play/4.m3u8 HTTP/1.1" 500 -
----------------------------------------
Exception happened during processing of request from ('10.0.0.230', 58022)
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/socketserver.py", line 650, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/local/lib/python3.8/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/opt/xmltv/frndlytv/app.py", line 22, in __init__
    super().__init__(*args, **kwargs)
  File "/usr/local/lib/python3.8/socketserver.py", line 720, in __init__
    self.handle()
  File "/usr/local/lib/python3.8/http/server.py", line 426, in handle
    self.handle_one_request()
  File "/usr/local/lib/python3.8/http/server.py", line 414, in handle_one_request
    method()
  File "/opt/xmltv/frndlytv/app.py", line 51, in do_GET
    self._error(e)
  File "/opt/xmltv/frndlytv/app.py", line 49, in do_GET
    routes[func]()
  File "/opt/xmltv/frndlytv/app.py", line 55, in _play
    url = frndly.play(slug)
  File "/opt/xmltv/frndlytv/frndly.py", line 36, in play
    path = self._channel_path(slug)
  File "/opt/xmltv/frndlytv/frndly.py", line 94, in _channel_path
    for row in self.guide([channel_id])[channel_id]:
KeyError: '4'
----------------------------------------
10.0.0.230 - - [13/May/2022 21:35:20] "GET /play/4.m3u8 HTTP/1.1" 500 -
----------------------------------------
Exception happened during processing of request from ('10.0.0.230', 58023)
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/socketserver.py", line 650, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/local/lib/python3.8/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/opt/xmltv/frndlytv/app.py", line 22, in __init__
    super().__init__(*args, **kwargs)
  File "/usr/local/lib/python3.8/socketserver.py", line 720, in __init__
    self.handle()
  File "/usr/local/lib/python3.8/http/server.py", line 426, in handle
    self.handle_one_request()
  File "/usr/local/lib/python3.8/http/server.py", line 414, in handle_one_request
    method()
  File "/opt/xmltv/frndlytv/app.py", line 51, in do_GET
    self._error(e)
  File "/opt/xmltv/frndlytv/app.py", line 49, in do_GET
    routes[func]()
  File "/opt/xmltv/frndlytv/app.py", line 55, in _play
    url = frndly.play(slug)
  File "/opt/xmltv/frndlytv/frndly.py", line 36, in play
    path = self._channel_path(slug)
  File "/opt/xmltv/frndlytv/frndly.py", line 94, in _channel_path
    for row in self.guide([channel_id])[channel_id]:
KeyError: '4'
----------------------------------------
10.0.0.230 - - [13/May/2022 21:35:23] "GET /play/4.m3u8 HTTP/1.1" 500 -
----------------------------------------
Exception happened during processing of request from ('10.0.0.230', 58024)
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/socketserver.py", line 650, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/local/lib/python3.8/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/opt/xmltv/frndlytv/app.py", line 22, in __init__
    super().__init__(*args, **kwargs)
  File "/usr/local/lib/python3.8/socketserver.py", line 720, in __init__
    self.handle()
  File "/usr/local/lib/python3.8/http/server.py", line 426, in handle
    self.handle_one_request()
  File "/usr/local/lib/python3.8/http/server.py", line 414, in handle_one_request
    method()
  File "/opt/xmltv/frndlytv/app.py", line 51, in do_GET
    self._error(e)
  File "/opt/xmltv/frndlytv/app.py", line 49, in do_GET
    routes[func]()
  File "/opt/xmltv/frndlytv/app.py", line 55, in _play
    url = frndly.play(slug)
  File "/opt/xmltv/frndlytv/frndly.py", line 36, in play
    path = self._channel_path(slug)
  File "/opt/xmltv/frndlytv/frndly.py", line 94, in _channel_path
    for row in self.guide([channel_id])[channel_id]:
KeyError: '4'
----------------------------------------
10.0.0.230 - - [13/May/2022 21:35:27] "GET /play/4.m3u8 HTTP/1.1" 500 -
----------------------------------------
Exception happened during processing of request from ('10.0.0.230', 58025)
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/socketserver.py", line 650, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/local/lib/python3.8/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/opt/xmltv/frndlytv/app.py", line 22, in __init__
    super().__init__(*args, **kwargs)
  File "/usr/local/lib/python3.8/socketserver.py", line 720, in __init__
    self.handle()
  File "/usr/local/lib/python3.8/http/server.py", line 426, in handle
    self.handle_one_request()
  File "/usr/local/lib/python3.8/http/server.py", line 414, in handle_one_request
    method()
  File "/opt/xmltv/frndlytv/app.py", line 51, in do_GET
    self._error(e)
  File "/opt/xmltv/frndlytv/app.py", line 49, in do_GET
    routes[func]()
  File "/opt/xmltv/frndlytv/app.py", line 55, in _play
    url = frndly.play(slug)
  File "/opt/xmltv/frndlytv/frndly.py", line 36, in play
    path = self._channel_path(slug)
  File "/opt/xmltv/frndlytv/frndly.py", line 94, in _channel_path
    for row in self.guide([channel_id])[channel_id]:
KeyError: '4'
----------------------------------------
10.0.0.230 - - [13/May/2022 21:35:30] "GET /play/4.m3u8 HTTP/1.1" 500 -
----------------------------------------
Exception happened during processing of request from ('10.0.0.230', 58026)
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/socketserver.py", line 650, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/local/lib/python3.8/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/opt/xmltv/frndlytv/app.py", line 22, in __init__
    super().__init__(*args, **kwargs)
  File "/usr/local/lib/python3.8/socketserver.py", line 720, in __init__
    self.handle()
  File "/usr/local/lib/python3.8/http/server.py", line 426, in handle
    self.handle_one_request()
  File "/usr/local/lib/python3.8/http/server.py", line 414, in handle_one_request
    method()
  File "/opt/xmltv/frndlytv/app.py", line 51, in do_GET
    self._error(e)
  File "/opt/xmltv/frndlytv/app.py", line 49, in do_GET
    routes[func]()
  File "/opt/xmltv/frndlytv/app.py", line 55, in _play
    url = frndly.play(slug)
  File "/opt/xmltv/frndlytv/frndly.py", line 36, in play
    path = self._channel_path(slug)
  File "/opt/xmltv/frndlytv/frndly.py", line 94, in _channel_path
    for row in self.guide([channel_id])[channel_id]:
KeyError: '4'
----------------------------------------
10.0.0.230 - - [13/May/2022 21:35:33] "GET /play/4.m3u8 HTTP/1.1" 500 -
----------------------------------------
Exception happened during processing of request from ('10.0.0.230', 58027)
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/socketserver.py", line 650, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/local/lib/python3.8/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/opt/xmltv/frndlytv/app.py", line 22, in __init__
    super().__init__(*args, **kwargs)
  File "/usr/local/lib/python3.8/socketserver.py", line 720, in __init__
    self.handle()
  File "/usr/local/lib/python3.8/http/server.py", line 426, in handle
    self.handle_one_request()
  File "/usr/local/lib/python3.8/http/server.py", line 414, in handle_one_request
    method()
  File "/opt/xmltv/frndlytv/app.py", line 51, in do_GET
    self._error(e)
  File "/opt/xmltv/frndlytv/app.py", line 49, in do_GET
    routes[func]()
  File "/opt/xmltv/frndlytv/app.py", line 55, in _play
    url = frndly.play(slug)
  File "/opt/xmltv/frndlytv/frndly.py", line 36, in play
    path = self._channel_path(slug)
  File "/opt/xmltv/frndlytv/frndly.py", line 94, in _channel_path
    for row in self.guide([channel_id])[channel_id]:
KeyError: '4'
----------------------------------------
10.0.0.230 - - [13/May/2022 21:35:36] "GET /play/4.m3u8 HTTP/1.1" 500 -
----------------------------------------
Exception happened during processing of request from ('10.0.0.230', 58028)
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/socketserver.py", line 650, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/local/lib/python3.8/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/opt/xmltv/frndlytv/app.py", line 22, in __init__
    super().__init__(*args, **kwargs)
  File "/usr/local/lib/python3.8/socketserver.py", line 720, in __init__
    self.handle()
  File "/usr/local/lib/python3.8/http/server.py", line 426, in handle
    self.handle_one_request()
  File "/usr/local/lib/python3.8/http/server.py", line 414, in handle_one_request
    method()
  File "/opt/xmltv/frndlytv/app.py", line 51, in do_GET
    self._error(e)
  File "/opt/xmltv/frndlytv/app.py", line 49, in do_GET
    routes[func]()
  File "/opt/xmltv/frndlytv/app.py", line 55, in _play
    url = frndly.play(slug)
  File "/opt/xmltv/frndlytv/frndly.py", line 36, in play
    path = self._channel_path(slug)
  File "/opt/xmltv/frndlytv/frndly.py", line 94, in _channel_path
    for row in self.guide([channel_id])[channel_id]:
KeyError: '4'
----------------------------------------
10.0.0.230 - - [13/May/2022 21:35:40] "GET /play/4.m3u8 HTTP/1.1" 500 -
----------------------------------------
Exception happened during processing of request from ('10.0.0.230', 58029)
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/socketserver.py", line 650, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/local/lib/python3.8/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/opt/xmltv/frndlytv/app.py", line 22, in __init__
    super().__init__(*args, **kwargs)
  File "/usr/local/lib/python3.8/socketserver.py", line 720, in __init__
    self.handle()
  File "/usr/local/lib/python3.8/http/server.py", line 426, in handle
    self.handle_one_request()
  File "/usr/local/lib/python3.8/http/server.py", line 414, in handle_one_request
    method()
  File "/opt/xmltv/frndlytv/app.py", line 51, in do_GET
    self._error(e)
  File "/opt/xmltv/frndlytv/app.py", line 49, in do_GET
    routes[func]()
  File "/opt/xmltv/frndlytv/app.py", line 55, in _play
    url = frndly.play(slug)
  File "/opt/xmltv/frndlytv/frndly.py", line 36, in play
    path = self._channel_path(slug)
  File "/opt/xmltv/frndlytv/frndly.py", line 94, in _channel_path
    for row in self.guide([channel_id])[channel_id]:
KeyError: '4'
----------------------------------------

I found the bug in your epg.xml file. You do not have a proper header

<?xml version="1.0" encoding="UTF-8"?><tv>

you should probably have something like:

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE tv SYSTEM "xmltv.dtd"><tv generator-info-name="www.matthuisman.nz">

Making that change manually and testing, now allows the epg data to work in TVMosaic and NextPVR. I have not yet tested with TVHeadend.

With TV Mosaic the streams still do not play

markosjal the latest github code and docker container should hopefully solve both your issues.

It is odd your playlist is generating urls like /play/4.m3u8
It should be more like /play/pixl.m3u8

Maybe whatever your running the code on can't retrieve the data from https://i.mjh.nz/frndly_tv/app.json

You'd probably want to sort that out :slight_smile:

And fyi: the container and code is meant for channels (hence its name). Consider yourself lucky if it works elsewhere

I have seen at least one error related to that .json file but it was only once then came back. It was about 20 hours ago.

I am not running docker so hopefully I will not have to switch to try it.

And yes it does say "for Channels" but then again there is other similar code out there says it is for XYZ but works with others because it generates standard files. Would there be a reason you do not want to conform to standards? You know there is a lot of chatter on forums about using this script with other PVRs , so I am not alone.

Personally I am put off of by Channels for the claims that there is a free tier but come to find out there is none. I also believe they are not up-front with this until AFER you install it. Very misleading....

Thanks for the response and hopefully the fix. will check it out.
Mark

You are mis-informed. Where did you see that?
There is a free trial period. There is no free tier to Channels DVR.
The only thing I know of that is free is their iOS app for use with an SD HDHR tuner.

1 Like

That is not the same as "has free trial".

Also for matthuisman..you may or may not be interested in this link...

its about the output of your script , which BTW still does not work in NextPVR , even after your fixes. the xml does work in TVMosaic but channels do not play.

i've just added display-name to epg

as for TVMosaic - I suspect it doesn't follow redirects or something like that - you'd need to ask them

Also, I'm sure when I created my blog post there was a free tier - but maybe i was mistaken.
Have now changed.

You shouldn't rely on 3rd party blog posts anyway as they can get outdated etc.
Get your information from the source.

This is the last response you'll get from me in regards to non-channels integration.

3 Likes

YOUR post, Mr Matt, is a 3rd party blog post from where you speak of a non-existent "free tier"

I think if you were concerned about conforming to any standard you would make your code comply with standards not just "make it work"

Do not imply in any way how I should or should not, choose to spend my money.

It is ridiculous to cut the cord only to pay just as much for replacement services that you then have to manage yourself, and rely on third party code (that can end at any time) to make it work.

1 Like

exactly what I said - my blog post is a 3rd party post - so don't take it as gospel.
Get your information from Channels themselves.
I don't work for Channels...

Your just trolling at this point.
You've come to Channels community and not even using Channels...

10 Likes

It is this kind of ingratitude, obnoxiousness, and sense of entitlement that has made some wonderful services and content disappear from the internet.

You need to get some perspective and appreciate Matt's contributions to the community, even if you deem them imperfect.

4 Likes

Matt,

Most of us appreciate what you do for us. You have our sincere thanks.

--BJ

10 Likes

I felt the same way as you for a long time. Tried every free DVR system out there but they all had one issue or another. Finally pulled the trigger on a Channels subscription and I am so glad that I did. The software just works. No fiddling around with buggy or complicated interfaces. It’s worth the $80 a year.

5 Likes