コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }