Exemplo n.º 1
0
        public string CreatePlayUri(PlayFileType ft = PlayFileType.HD)
        {
            if (PlayInfos != null && PlayInfos.Count > 0)
            {
                var ftype = (int)ft;
                while (!PlayInfos.ContainsKey(ftype) && ftype >= 0)
                {
                    ftype--;
                }

                PlayInfo info = null;
                if (ftype < 0)
                {
                    info = PlayInfos.Values.First();
                }
                else if (PlayInfos.ContainsKey(ftype))
                {
                    info = PlayInfos[ftype];
                }

                if (info != null)
                {
                    return(GetPlayUri(info));
                }
            }
            return(string.Empty);
        }
Exemplo n.º 2
0
        public string CreatePlayUri(PlayFileType ft = PlayFileType.HD)
        {
            if (PlayInfos != null && PlayInfos.Count > 0)
            {
                var ftype = (int)ft;
                while (!PlayInfos.ContainsKey(ftype) && ftype >= 0)
                {
                    ftype--;
                }

                PlayInfo info = null;
                if (ftype < 0)
                {
                    info = PlayInfos.Values.First();
                }
                else if (PlayInfos.ContainsKey(ftype))
                {
                    info = PlayInfos[ftype];
                }

                if (info != null)
                {
                    var key = KeyGenerator.GetKey(info.St);
                    return(string.Format("http://{0}:80/{1}?type={2}&w=1&key={3}", info.Sh, info.Rid, Utils.EpgUtils.PlatformName, key));
                }
            }
            return(string.Empty);
        }
Exemplo n.º 3
0
        public PlayInfo CreatePlayInfo(PlayFileType ft = PlayFileType.HD)
        {
            if (PlayInfos != null && PlayInfos.Count > 0)
            {
                var ftype = (int)ft;
                while (!PlayInfos.ContainsKey(ftype) && ftype >= 0)
                {
                    ftype--;
                }

                if (ftype < 0)
                {
                    return(PlayInfos.Values.First());
                }

                if (PlayInfos.ContainsKey(ftype))
                {
                    return(PlayInfos[ftype]);
                }
            }
            return(null);
        }