Jump to content

Naming and Ordering IPTV.m3u


bubs
 Share

Recommended Posts

Hello!

 

Can someone please tell me how the emby server deal with a .m3u list?

 

I am trying to add one that is like this:

#EXTM3U

#EXTINF:-1 channel-id="100" channel-name="channel ABC" tvg-logo="http://some.logo.link.100.png"group-title="group A",channel name

http;//some.stream.link.100.m3u8

#EXTINF:-1 channel-id="101" channel-name="channel DEF" tvg-logo="http://some.logo.link.101.png"group-title="group A",channel name

http;//some.stream.link.102.m3u8

#EXTINF:-1 channel-id="102" channel-name="channel GHI" tvg-logo="http://some.logo.link.102.png"group-title="group A",channel name

http;//some.stream.link.103.m3u8

and so on.....

 

In live-tv section on web-browser, in channels tab, the channel 101 and 707 are displayed before everything else (see image). Is any reason that happen?

 

I did a new installation of emby-server on my local machine and the list is displayed correctly.

I did a clean cache in the server, remove and re-add, refresh channels, change name of the list from aaa.m3u to bbb.m3u, change the link of the channel, remove the lines of that tow channels e re-add. The result is all the same, if the channels are in the list the order in web-browser is that one.

 

In the emby add-on for kodi its even worst, because the order is by name and not by the number.

 

I have a lots of channels, they all organized in the .m3u file, they are ordered properly. I think if the order in the web-browser, and in the order apps by the way, should be the order of the .m3u file. Or in alternative, it should be possible to order manually or by order criteria. 

If i add a xmtv file the order in the mapping list is the order in the files, so i cant understand way the view of the daily basis its not the same.

 

I think this problem should be resolved if i do a clean install, but since i have the server running on a slow machine and i have a lots of media added to him, the reconfiguration will be a nightmare.

I moved the data folder to a backup (for tests) and start emby-server, its basically a new installation because all the settings are gone, i added the list and everything is fine.

_______

 

In other scenario if i add the list with tvg-id tag, the names of every channel appear 2 times like 101 101, i don't understand why too. Maybe because the tvg-id is used to get the number and the name, but if that's the case the interface should display only one of them, even if i use the tvg-id and the channel-name, the interface shows the same.

_______

 

Last but not least It would be awesome if the emby deal with the time-in xmltv, like, my xmltv have channels from different countries, and the hours are displayed like 201609011200 -0200, in this case the program is start 10:00 UTC, so if i am in UTC +1 in my time should start at 11:00. 

_______

 

To all developers a huge thank you for this awesome media server.Keep up the good work!!

post-64635-0-96519100-1474921395_thumb.png

Link to comment
Share on other sites

  • 2 weeks later...

I have the same problem... any solution?

 

Until now it seems to be the same.

 

I am in beta installation so maybe in the near future they fix this! Now the ordering is even worst because if i have the channel 101, 102 and 1012. The system order 101, 1012, 102, that doesn't make any sense to me.

Link to comment
Share on other sites

It seems to me that in Version 3.0.73 the channels sorting was by channel name only. Clicking on the icon on the top left of the guide there was no way to sort the channels.

I just installed the new 3.0.8 and now the sorting function are back and is possible to order by channel number and last watched.

Unfortunately I can't still get the channels ordered without loosing my xmltv mapping.I tried even manipulating my m3u file but i think there is fix. Please could you add a Not Sorted checkbox? Note the also the sort title field in the channels options is not working.

 

I took a look at the source code on github and the channel number attribution is not working in my case

private M3UChannel GetChannelnfo(string extInf, string tunerHostId, string mediaUrl)
        {
            var titleIndex = extInf.LastIndexOf(',');
            var channel = new M3UChannel();
            channel.TunerHostId = tunerHostId;

            channel.Number = extInf.Trim().Split(' ')[0] ?? "0";
            channel.Name = extInf.Substring(titleIndex + 1);

            //Check for channel number with the format from SatIp            
            int number;                   
            var numberIndex = channel.Name.IndexOf('.');
            if (numberIndex > 0)
            {
                if (int.TryParse(channel.Name.Substring(0, numberIndex), out number))
                {
                    channel.Number = number.ToString();
                    channel.Name = channel.Name.Substring(numberIndex + 1);
                }
            }

            if (string.Equals(channel.Number, "-1", StringComparison.OrdinalIgnoreCase) && !string.IsNullOrWhiteSpace(mediaUrl))
            {
                channel.Number = Path.GetFileNameWithoutExtension(mediaUrl.Split('/').Last());
            }

            if (string.Equals(channel.Number, "-1", StringComparison.OrdinalIgnoreCase))
            {
                channel.Number = "0";
            }

            channel.ImageUrl = FindProperty("tvg-logo", extInf, null);
            channel.Number = FindProperty("tvg-id", extInf, channel.Number);
            channel.Number = FindProperty("channel-id", extInf, channel.Number);
            channel.Name = FindProperty("tvg-name", extInf, channel.Name);
            channel.Name = FindProperty("tvg-id", extInf, channel.Name);
            return channel;

}

channel-id is the property used for guide/channel mapping and i think shouldn't be used as channel number

 

could we remove this line? channel.Number = FindProperty("channel-id", extInf, channel.Number);

Link to comment
Share on other sites

I have not yet had a chance to give a full response to this topic but it is on my list to review.

 

As for above, there was another community member using that for channel number. where are you putting your channel number?

Link to comment
Share on other sites

Hi thanks for replying,

The problem is that the channel-id is the one used by the guide to map the channels (ie, Eurosport1.it, TopCrime.it) and it overwrite the channel number that i am trying to set with tvg-id.

channel.ImageUrl = FindProperty("tvg-logo", extInf, null);
channel.Number = FindProperty("tvg-id", extInf, channel.Number);
channel.Number = FindProperty("channel-id", extInf, channel.Number);
channel.Name = FindProperty("tvg-name", extInf, channel.Name);
channel.Name = FindProperty("tvg-id", extInf, channel.Name);

Until the previous version i was using a workaround prefixing the tvg-name with the channel number but as you can see there is no way now to set both channel nuber and channel id. Probably changing the order would work better...

channel.Number = FindProperty("tvg-id", extInf, channel.Number);
channel.Number = FindProperty("channel-id", extInf, channel.Number);
channel.Number = FindProperty("channel-id", extInf, channel.Number);
channel.Number = FindProperty("tvg-id", extInf, channel.Number);

By the way a not sorted option would be probably the most useful

Edited by gmb
Link to comment
Share on other sites

Ok, that should be fine, thanks.

 

Hi luke,

 

If you don't addressed this issue yet, i would like to give some suggestions. 

 

As for the matching with the xmltv, i suggest to use any of the possible "tag's" available (tvg-id, channel-id, channel-name, and even the channel name after the coma that is present in most of m3u lists in the end of every first line of every channel) this way all possibilities of syntax are covered, and we only need to do manual matching if all that tag's fail to match with xmltv file. Another suggestion is to use xmltvid and channel name of the xmltv file and not only the xmltvid.

 

As for the order, i think that the most easy way to order the channels in the interface is from the order from m3u, like is displayed in the matching screen.

But if you like more suggestions or options, maybe it would be useful, after the emby server analise the m3u file, choose what is the "tag" used for number, and what is the "tag" used to give name to the channel. After that it would be awesome to chose what is the order criteria, number, name, the original order in the m3u or a personal order that anyone could choose manually.

 

Again, thanks for the help.

Link to comment
Share on other sites

Hi Luke, may thanks for addressing this issue

i just installed the version 3.0.8.1 and i see you changed the order of the above lines. Unfirtunately i can't still find a solution to my problem.

 

here are some hints

 

#EXTINF:-1 channel-id="RaiUno.it" tvg-name="Rai 1 HD" tvg-logo="http://epgstar.ovh/picon/1_0_1_1072_3EE_1_C00000_0_0_0.png"group-title="Tivusat",Rai 1 HD

it sort the list by channel-id and it keeps the mapping with the xmltv file

 

#EXTINF:-1 tvg-id="001" channel-id="RaiUno.it" tvg-name="Rai 1 HD" tvg-logo="http://epgstar.ovh/picon/1_0_1_1072_3EE_1_C00000_0_0_0.png"group-title="Tivusat",Rai 1 HD

it sort the list by tvg-id and but loose the mapping with the xmltv file and it replaces the name of the channel with tgv-id

channel.Number = FindProperty("tvg-id", extInf, channel.Number);
channel.Number = FindProperty("channel-id", extInf, channel.Number);
channel.Name = FindProperty("tvg-name", extInf, channel.Name);
channel.Name = FindProperty("tvg-id", extInf, channel.Name);

i cant find in the source code where the xmltv is mapped to the channels but

are those substitution even necessary if the name and number are already setted?

 

ultimately the not sorting option would be great

 

 

Thanks for the effort

Link to comment
Share on other sites

yes that would definitely fix the sorting and naming but i cant understand why the xmltv mapping is lost.

is the guide mapping by channel-id or tvg-id?

 

#EXTINF:-1 tvg-id="001" channel-id="RaiUno.it" tvg-name="Rai 1 HD" tvg-logo="http://epgstar.ovh/p...0000_0_0_0.png"group-title="Tivusat",Rai 1 HD

mapping by channel-id, sorting by tvg-id and naming by  tvg-name would work?

Edited by gmb
Link to comment
Share on other sites

taylorbourne
#EXTINF:-1 channel-id="27" tvg-id="ABC" tvg-logo="http://smashtv.ddns.net:9090/logos/abc.png" group-title="Entertainment",ABC
http://smashtv.ddns.net:9090/load/xxx/9.mpegts

This is the format I'm currently using that was working fine to map guide data using Schedules Direct. With the latest release, only 2 of my channels are picking up data. Previously I was matching the channel-id property to the channel number on schedules direct. Should I be using the tvg-id to map, or is it able to map using the channel name now? I'm a little confused. 

Link to comment
Share on other sites

For starters I think we can all agree tvg-name should be channel name, since there is a dedicated field for it. The problem with channel-id is that i see examples where it sometimes corresponds to channel number, and other times is channel name.

 

like here for example

http://xmtvplayer.com/build-m3u-file

Link to comment
Share on other sites

taylorbourne

Absolutely – that makes sense, I'll add tvg-name to my playlist on my next run through. However since the update I'm seeing some other odd behavior. So after reading this thread I switched the tvg-id property to match the channel number listed in the SD lineup. This cleared up my mapping issues and my guide data now appears. However I'm now seeing a new problem. For some reason some of my channel logos are being used incorrectly.

 

post-89925-0-04624100-1476739530_thumb.png

 

You see here channel 33 has the logo for TNT, however when you click the channel to view more information the correct channel name and image (PBS) are shown. Also, the data being used appears to be correct.

 

post-89925-0-02148900-1476739620_thumb.png

 

Or in this example, you'll notice the Hallmark channel logo is used twice. 

 

post-89925-0-69013700-1476739641_thumb.png

 

Here is the relevant section of my m3u playlist.

#EXTINF:-1 channel-id="312" tvg-id="312" tvg-logo="http://www.thelogodb.com/images/media/logo/tyvvss1433452956.png/medium" group-title="Entertainment",Hallmark
http://smashtv.ddns.net:9090/load/xxx/298.mpegts
#EXTINF:-1 channel-id="329" tvg-id="329" tvg-logo="https://www.thelogodb.com/images/media/logo/usxvry1434468747.png/medium" group-title="Entertainment",BET
http://smashtv.ddns.net:9090/load/xxx/6956.mpegts
#EXTINF:-1 channel-id="331" tvg-id="331" tvg-logo="https://www.thelogodb.com/images/media/logo/yrutpr1433945579.png/medium" group-title="Entertainment",MTV
http://smashtv.ddns.net:9090/load/xxx/6958.mpegts

Notice that Hallmark and MTV use different channel-id's and different logo URLs – however the same logo displays for both.

 

Link to comment
Share on other sites

it's probably just mixed up due to the mappings changing. delete the logos that are incorrect and let the next guide refresh download them again.

Link to comment
Share on other sites

For starters I think we can all agree tvg-name should be channel name, since there is a dedicated field for it. The problem with channel-id is that i see examples where it sometimes corresponds to channel number, and other times is channel name.

 

like here for example

http://xmtvplayer.com/build-m3u-file

 

For me i could work with tvg-name for name and channel-id for number or like i said after the server analise the m3u, it would ask what is the field used for name and for number if applied obviously.

Link to comment
Share on other sites

I'd like to get it as automatic as possible but yes unfortunately we might be headed in the direction where you have to specify what field has the channel number.

Link to comment
Share on other sites

taylorbourne

As a user who has tried to implement several different IPTV providers into Emby – the more configurability and flexibility in this area the better. I guess it's unfortunate in the sense that it takes away from the automation, but in the long run this only makes things better. My current setup uses an m3u playlist that I created from my providers MPEGTS streams, however I will be switching to a provider that adds channels on the fly for sports so the actual make up of the file will be out of my control. With the option to specify which property is for the channel number, name, etc.. Emby is able to consume different types of playlists (like the tvg-id issue you talked about before) that may be out of the users control. What's more – after this is set up once you get the automation you're looking for.

  • Like 1
Link to comment
Share on other sites

taylorbourne

To make things even crazier, my new provider doesn't even have channel-id listed, only tvg-id. What would this mean for mapping?

 

Ex:

#EXTM3U
#EXTINF:0 tvg-id="abckgosanfrancisco.torula.com", ABC KGO San Francisco
http://streamexample.com:8000/abc-kgo-san-francisco/index.m3u8
Link to comment
Share on other sites

Hi Luke,

with the last update i am able to properly name and sort the channels. However as i said in the previous post i am loosing the mapping.

 

 

 

This format return the proper order and names of channels but it loose the mapping for some reson

#EXTINF:-1 tvg-id="001" channel-id="RaiUno.it" tvg-name="Rai 1 HD" tvg-logo="http://epgstar.ovh/p...0000_0_0_0.png"group-title="Tivusat",Rai 1 HD 

This format return the alphabetical order and loose the mapping

#EXTINF:-1 channel-id="001" tvg-id="RaiUno.it" tvg-name="Rai 1 HD" tvg-logo="http://epgstar.ovh/p...0000_0_0_0.png"group-title="Tivusat",Rai 1 HD

This format return the alphabetical order and keep the mapping

#EXTINF:-1 channel-id="RaiUno.it" tvg-name="Rai 1 HD" tvg-logo="http://epgstar.ovh/p...0000_0_0_0.png"group-title="Tivusat",Rai 1 HD

I still believe that the option to not order the channels and keep the m3u order would be very useful but if we could keep the mapping using the first format would be perfect in my opinion

Edited by gmb
Link to comment
Share on other sites

Just  reporting , with the last update (3.0.8300.0) the issue seems to be solved.

#EXTINF:-1 tvg-id="001" channel-id="RaiUno.it" tvg-name="Rai 1 HD" tvg-logo="http://epgstar.ovh/picon/1_0_1_1072_3EE_1_C00000_0_0_0.png" group-title="Tivusat",Rai 1 HD

this format works

 

Thanks so much Luke

 

Edit:

sorry my mistake, the  mapping with the xmtvl is lost with this format.  I thought it was solved but only the manually mapped channels are working in the guide

Edited by gmb
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...