primaeval / script.tvguide.fullscreen

tv guide fullscreen
GNU General Public License v2.0
25 stars 26 forks source link

Import m3u list #107

Open eric859 opened 7 years ago

eric859 commented 7 years ago

I have a customized m3u file I use along with a customized xmltv file. The channel names match. It works well in the kodi iptv pvr. I figured out how to use the xmltv file in your addon, but I can't seem to find a way to import the m3u file. Can you help?

primaeval commented 7 years ago
  1. If the m3u doesn't change import it in "Menu \ Stream Setup \ Import Playlist".

  2. If it changes a bit use "Settings \ Optional \ Import addons.ini \ Enable addons.ini m3u Playlist Subscriptions \ Manage addons.ini m3u Playlist Subscriptions".

  3. If the channels match the xmltv ids and you don't want to use any other addons use: "Optional \ Import m3u"

  4. If the urls change all the time use my PVR Plugin Player or Stream Searcher addons.

eric859 commented 7 years ago

It's a local file, not a url. I found that to be an issue as well. Can I put in a "c:..." entry in the URL? Also, does your addon support m3u8 or just m3u?

unlocKing commented 7 years ago

if you can't host it, try sharing your m3u via dropbox..

the link will have ?dl=0 at the end which you need to change to ?raw=1

that should work

primaeval commented 7 years ago

@eric859 Which method are you trying to use? I'll see if I can add local file handling to that if you need it.

eric859 commented 7 years ago

I'm not sure what you mean by method I'm trying to use. I have a local m3u8 file that I use in Kodi with another local, customized xmltv file I created from Sched Dir. I rename the channel id's in the xmltv files to match the m3u8 file to ensure that the channels automatically match. I would like to use your addon with my local m3u8 and xmltv files to populate the channels, automatically channel match & populate the epg just like I do in the Kodi IPTV PVR Addon. Is this possible? Thank you so much for the replies!

primaeval commented 7 years ago

I've updated my first comment. I think you want to use method 3. Is that right?

primaeval commented 7 years ago

You can use local file names as urls in method 3. If you use the Kodi File Manager to add the location of your m3u file you can see the path in the file "userdata/sources.xml". For example I have an m3u on a windows share and the path is "smb://server/e$/xmltv/pvr.m3u8"

eric859 commented 7 years ago

Yes, method 3. I've added the m3u8 file in the Optional - Import m3u, but it doesn't seem to automatically link each channel from the xmltv file to the streams in the m3u8 file. I click on a channel in the EPG and I have to assign it manually. Is there a workaround to automatcially do it if the channel id's match? Thanks again!

primaeval commented 7 years ago

It is using the name in the m3u file to match the channel id of the xmltv file I think. https://github.com/primaeval/script.tvguide.fullscreen/blob/master/gui.py#L3882 Can you give me an example channel from your xmltv and m3u files.

eric859 commented 7 years ago

I had to remove personal info from the m3u8 file, so it won't work for you, but the xmltv file is original. Let me know if this is ok.

test.m3u8.txt

test.xml.zip

primaeval commented 7 years ago

The string match will just pick up the last part of the line after the last comma. eg HBO 2

What does the HBO 2 channel look like in the xmltv file?

eric859 commented 7 years ago

m3u8 file:

EXTINF:-1 tvg-id="HBO 2 HDTV (East)" tvg-name="HBO 2" tvg-logo="https://www.thelogodb.com/images/media/logo/ysqqqu1433944425.png/medium" group-title="USA TV",HBO 2

http://xxxxx.xx:2095/live/xxxxxx/xxxxxxxx/174.ts

XML file:

<channel id="HBO 2 HDTV (East)">
        <display-name>502 HBO2HD</display-name>
        <display-name>502</display-name>
        <display-name>HBO2HD</display-name>
        <display-name>HBO 2 HD</display-name>
        <icon src="https://s3.amazonaws.com/schedulesdirect/assets/stationLogos/s59368_h3_aa.png" width="360" height="270" />
    </channel>
eric859 commented 7 years ago

I matched the tvg-id in the m3u file and the Channel id in the xml file to get it working in Kodi.

primaeval commented 7 years ago

It won't match because it is trying to match "HBO 2 HDTV (East)" to "HBO 2". I would pull it in with method 1 or 2 if I were you and let it guess. You'll only have to pick the right stream once for each channel and some will probably match without you having to do anything.

primaeval commented 7 years ago

Actually, if this is the normal way of doing it I could add in a search for tvg-id and match that to the channel id. I'll have a go at that tomorrow if you like.

eric859 commented 7 years ago

That would be great, but don't do it just for me. Do it if you think it would help others and if it adds functionality. Thanks again!

primaeval commented 7 years ago

It might do especially if that is the way the Kodi PVR is set up.

primaeval commented 7 years ago

Have a go with 0.0.356. I've added in a check to see if there is a tvg-id field and use that instead of the name. It should work in Optional \ Import m3u and Optional \ m3u subscriptions.

eric859 commented 6 years ago

It's giving me an error - "Stream Failed" with the channel (Ex: 502 HBO2HD) underneath - when I try to select the channel. Prior to the update it was bringing me to the stream setup screen when I selected a channel. If I try to manually setup the stream, I can go to the Addon tab and successfully set the channel stream from there.

Here is what I did after I updated the addon. 1. set the Optional \ Import m3u to point to the m3u8 file I use. 2. set the Optional \ enable addons.ini m3u playlist subscriptions to on and 3. set the Optional \ Manage addons.ini m3u Playlist Subscriptions and added a smb link to the m3u8 file. Not sure if I had to do setps 2 and 3, but I think that's what you were telling me to do with the "m3u subscriptions" in your last post. I also reset the database before I started the addon again.

It looks like it's linking to the Display Name of the xmltv channel instead of the Channel ID. Perhaps that is the issue??

primaeval commented 6 years ago

1 or 2and3 is really the choice. Not both.

Have a look in the file "userdata\addon_data\script.tvguide.fullscreen\custom_stream_urls_autosave.ini" to see if the right hbo stream url is mapped up to the channel name.

There is a lot of matching ids to channels to streams going on now that it is difficult to work out what you have got.

You might have to zip up your userdata\addon_data\script.tvguide.fullscreen folder and send me a link in the Kodi forum. If you do put it somewhere private like Dropbox.

eric859 commented 6 years ago

Yes, the correct channel url as seen in the m3u8 file is listed next to the channel in the custom_stream_urls_autosave.ini file. Not sure now why it's not working.

primaeval commented 6 years ago

If you really want to see what is going on use something like this to look in the source.db file. http://sqlitebrowser.org/

The channels table has the channel info from the xmltv file. The custom_stream_url table has the channel to stream mapping.

eric859 commented 6 years ago

Here is the line that gets created in the custom_stream_urls_autosave.ini: HBO 2 HDTV (East)=http://xxxx.xxx:2095/live/xxxxxx/xxxxx/174.ts

The channel name at the beginning of the line is the "tvg-id" in the m3u8 file and it matches the "channel id" in the xmltv file. Your addon seems to use the "display-name" of the channel id in the xmltv file.

  1. Should the channel id you have assigned in the custom_stream_urls_autosave.ini actually be the channel name?
  2. Alternately, should the addon use the channel id vs the display-name of the channel from the xmltv file?
primaeval commented 6 years ago

I can see the problem now. I had an invisible carriage return at the end of the stream url that was stopping it playing. Hold tight. I'll get a new version out.

primaeval commented 6 years ago

Try now. I think 0.0.357 should fix it.

eric859 commented 6 years ago

IT WORKS!!! Thanks you!!!

primaeval commented 6 years ago

Good. I had a nagging feeling something was missing. It didn't show up in the output because it is invisible.