pvr channel numbers in python?
#1
Hi,

I'm creating an python add on that includes an epg with the live channels. I've connected to the Epg##.DB file and can generate an epg for each channel and all it's listings from the database.

However when launching channel the only way I know is to provide the Player with actual channel number e.g. "pvr://channels/tv/All TV channels/##.pvr". However the channel number is not located in the Epg##.DB. Is the channel number stored elsewhere and if so is there a simple way to access it and relate it to the epg database id's? Alternatively is there a way to launch a live channel using just the information from the epg##.db?

If this should go in the addon forum instead feel free to move it Smile
Reply
#2
Ok I found the id's in the TVXX.db file.

We have iChannel (assuming thats the id for the pvr link), clientChannelNumber and idEpg.

idEpg seems like the obvious choice for look-ups, however for many of these are set to 0 in TVxx.db but have the correct id in Epgxx.db. The only other applicable value for a look-up seems to be the sChannelName which seems like really bad practice. Any suggestion?
Reply
#3
The ID you are searching for within the URL pvr://channels/tv/All TV channels/ID.pvr is the current index of the selected group.
https://github.com/xbmc/xbmc/blob/51e425...l.cpp#L506
https://github.com/xbmc/xbmc/blob/99a77f...al.cpp#L86
Reply
#4
(2014-07-07, 14:03)ianuk2005 Wrote: Hi,

I'm creating an python add on that includes an epg with the live channels. I've connected to the Epg##.DB file and can generate an epg for each channel and all it's listings from the database.

However when launching channel the only way I know is to provide the Player with actual channel number e.g. "pvr://channels/tv/All TV channels/##.pvr". However the channel number is not located in the Epg##.DB. Is the channel number stored elsewhere and if so is there a simple way to access it and relate it to the epg database id's? Alternatively is there a way to launch a live channel using just the information from the epg##.db?

If this should go in the addon forum instead feel free to move it Smile

Json can return channel numbers, btw I would be interested in reviewing your epg3.db parser do you have a git?
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#5
(2014-07-09, 01:50)Lunatixz Wrote:
(2014-07-07, 14:03)ianuk2005 Wrote: Hi,

I'm creating an python add on that includes an epg with the live channels. I've connected to the Epg##.DB file and can generate an epg for each channel and all it's listings from the database.

However when launching channel the only way I know is to provide the Player with actual channel number e.g. "pvr://channels/tv/All TV channels/##.pvr". However the channel number is not located in the Epg##.DB. Is the channel number stored elsewhere and if so is there a simple way to access it and relate it to the epg database id's? Alternatively is there a way to launch a live channel using just the information from the epg##.db?

If this should go in the addon forum instead feel free to move it Smile

Json can return channel numbers, btw I would be interested in reviewing your epg3.db parser do you have a git?

Thanks i'll take a look at the json calls and hopefully they have some properties that are consistent with the epg database.

I don't have a git for it yet as nothing's in a finalised state. I may end up splitting a few things into modules such as the livetv channel generator. Quite a long way to go yet though but once it's finished it will be a very similar addon to pseudotv Smile.
Reply
#6
(2014-07-09, 11:52)ianuk2005 Wrote:
(2014-07-09, 01:50)Lunatixz Wrote:
(2014-07-07, 14:03)ianuk2005 Wrote: Hi,

I'm creating an python add on that includes an epg with the live channels. I've connected to the Epg##.DB file and can generate an epg for each channel and all it's listings from the database.

However when launching channel the only way I know is to provide the Player with actual channel number e.g. "pvr://channels/tv/All TV channels/##.pvr". However the channel number is not located in the Epg##.DB. Is the channel number stored elsewhere and if so is there a simple way to access it and relate it to the epg database id's? Alternatively is there a way to launch a live channel using just the information from the epg##.db?

If this should go in the addon forum instead feel free to move it Smile

Json can return channel numbers, btw I would be interested in reviewing your epg3.db parser do you have a git?

Thanks i'll take a look at the json calls and hopefully they have some properties that are consistent with the epg database.

I don't have a git for it yet as nothing's in a finalised state. I may end up splitting a few things into modules such as the livetv channel generator. Quite a long way to go yet though but once it's finished it will be a very similar addon to pseudotv Smile.

Hmm wonder if we are both working on the same thing... I've developed a pvr client for pseudotv. It's still very basic, but works...
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#7
(2014-07-09, 12:00)Lunatixz Wrote:
(2014-07-09, 11:52)ianuk2005 Wrote:
(2014-07-09, 01:50)Lunatixz Wrote: Json can return channel numbers, btw I would be interested in reviewing your epg3.db parser do you have a git?

Thanks i'll take a look at the json calls and hopefully they have some properties that are consistent with the epg database.

I don't have a git for it yet as nothing's in a finalised state. I may end up splitting a few things into modules such as the livetv channel generator. Quite a long way to go yet though but once it's finished it will be a very similar addon to pseudotv Smile.

Hmm wonder if we are both working on the same thing... I've developed a pvr client for pseudotv. It's still very basic, but works...

Probably as mine is basically taking everything I like from pseudo and rewriting it from scratch with a new architecture and features Smile
Reply
#8
(2014-07-09, 12:37)ianuk2005 Wrote:
(2014-07-09, 12:00)Lunatixz Wrote:
(2014-07-09, 11:52)ianuk2005 Wrote: Thanks i'll take a look at the json calls and hopefully they have some properties that are consistent with the epg database.

I don't have a git for it yet as nothing's in a finalised state. I may end up splitting a few things into modules such as the livetv channel generator. Quite a long way to go yet though but once it's finished it will be a very similar addon to pseudotv Smile.

Hmm wonder if we are both working on the same thing... I've developed a pvr client for pseudotv. It's still very basic, but works...

Probably as mine is basically taking everything I like from pseudo and rewriting it from scratch with a new architecture and features Smile

Interesting... why you wouldn't just chip in and help with pseudotv is lost on me, but good luck.
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#9
(2014-07-09, 14:16)Lunatixz Wrote:
(2014-07-09, 12:37)ianuk2005 Wrote:
(2014-07-09, 12:00)Lunatixz Wrote: Hmm wonder if we are both working on the same thing... I've developed a pvr client for pseudotv. It's still very basic, but works...

Probably as mine is basically taking everything I like from pseudo and rewriting it from scratch with a new architecture and features Smile

Interesting... why you wouldn't just chip in and help with pseudotv is lost on me, but good luck.

My first thought was to change psuedotv but I wanted to change quite a lot that would be awkward to modify without having knock on effects. So i decided it would be better and more fun to start from scratch Smile
Reply
#10
(2014-07-09, 14:39)ianuk2005 Wrote:
(2014-07-09, 14:16)Lunatixz Wrote:
(2014-07-09, 12:37)ianuk2005 Wrote: Probably as mine is basically taking everything I like from pseudo and rewriting it from scratch with a new architecture and features Smile

Interesting... why you wouldn't just chip in and help with pseudotv is lost on me, but good luck.

My first thought was to change psuedotv but I wanted to change quite a lot that would be awkward to modify without having knock on effects. So i decided it would be better and more fun to start from scratch Smile

True, good luck... feel free to pm me if you need help.

If you don't mind me asking what don't you like about PseudoTV or PseudoTV Live. I'm always looking to improve...
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply

Logout Mark Read Team Forum Stats Members Help
pvr channel numbers in python?0