Closed Ved-un closed 1 year ago
It looks like iptv-org has changed the format of the underlying json. Looks like we have to change some of the json parsing for it to work.
as a temporary solution, you could export the environment variable TERMV_API_URL to point to a backup of the old json I have made and continue using termv. To do this -
termv - u
The changes to the json structure is pretty big for a quick fix. I suppose it would take some time to come up with a solution
I don't have a backup of json. Alright, I'll use pure mpv and my iptv playlists for now.
@Roshan-R dtill doesn't work automatically... And a lot of channels from your bellow tip don't work. May you please provide updated link or fix it? Thanks
I have implemented a fix for this issue into a new branch named fix
.
Could you check if it's working or not?
It kinda works thank you, but some channels error out like this
Fetching channel, please wait... [file] Cannot open file '': No such file or directory Failed to open .
Those are the channels which do not have a url in the json files. since both of them are split, it's very computationally heavy to filter out the channels which do not have a url
hi @Roshan-R , why not move the filtering to the update function? instead of just downloading both files and storing them in their original format, you can process them (merge both files into one, remove channels without url...)
we can also create a json schema specific to termv (easy to read, and easy to reproduce if the user wants to create his own channel list).
[
{
"id" : null,
"name" : "channel name",
"categories" : ["category1","category2"],
"languages" : ["en","ar"],
"countries" : ["US","MA"],
"url" : "http : //url.com/video.m3u8",
"headers" : {"user_agent" : null,"http_referrer" : null},
"logo" : null,
"website" : null
}
]
That seems like a great idea @odnar-dev, I too was thinking of making something like this.
I have updated the fix
branch having implemented the idea suggested by @odnar-dev, the two json files are merged into a single one in the update function.
This also fixes the issue raised by @divcyb about showing channels which do not have any urls pointed to it
:laughing: i was about to suggest
I guess we could merge the fix
branch with the main
branch?
I'd vote for "not yet":
$ termv parse error: Invalid numeric literal at line 1, column 10
I've run the latest version from fix / main
$ termv -v termv 1.4
edit: After deleting ~/.cache/termv I get this output:
$ termv Downloading https://iptv-org.github.io/api/channels.json... Done! Downloading https://iptv-org.github.io/api/streams.json... Done! jq: error: Could not open file /home/sekret/.cache/termv/data.json: No such file or directory
@sekret1 I have added a new commit to the fix
branch, could you see if it works now?
Works without flaws now :1st_place_medal:
Thank you so much for your project!
But today my termv stopped working for some reason. I clicked on the link https://iptv-org.github.io/iptv/channels.json and this page does not exist. They have this https://iptv-org.github.io/api/channels.json - I tried pasting this address but termv still doesn't work.
Did they change something or am I having a malfunction?