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); }
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); }
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); }