Ejemplo n.º 1
0
        public static MvcHtmlString PVServiceIcons(this HtmlHelper htmlHelper, PVServices services)
        {
            var sb = new StringBuilder();

            if (services.HasFlag(PVServices.NicoNicoDouga))
            {
                sb.Append(Image(htmlHelper, VideoServiceLinkUrl(htmlHelper, PVService.NicoNicoDouga), "NicoNicoDouga"));
            }

            if (services.HasFlag(PVServices.Youtube))
            {
                sb.Append(Image(htmlHelper, VideoServiceLinkUrl(htmlHelper, PVService.Youtube), "Youtube"));
            }

            return(new MvcHtmlString(sb.ToString()));
        }
Ejemplo n.º 2
0
        protected string GetPvUrl(Song song, PVType?type, PVServices services)
        {
            var pv = song.PVs.FirstOrDefault(p => (type == null || p.PVType == type) && services.HasFlag((PVServices)p.Service));

            return(pv != null ? pv.Url : string.Empty);
        }