private void ForceInitialLoadTvShowImages() { FanartUrl.RefreshImage(Path.Combine(_path, "fanart.jpg")); PosterUrl.RefreshImage(Path.Combine(_path, "poster.jpg")); BannerUrl.RefreshImage(Path.Combine(_path, "banner.jpg")); foreach (ISeasonImagesViewModel season in SeasonImages) { season.Refresh(); } }
public override void DownloadAndParseData() { //base.DownloadAndParseData(); var html = streamDownloader.Download(BaseUrl); var titleMatch = Regex.Match(html, @"""title"":""(.+?)"""); if (titleMatch.Success) { Title = UnEscapeString(titleMatch.Groups[1].Value); } var imageMatch = Regex.Match(html, @"""image"":""(.+?)"""); if (imageMatch.Success) { PosterUrl = UnEscapeString(imageMatch.Groups[1].Value); PosterUrl = PosterUrl.StartsWith("//") ? "https:" + PosterUrl : PosterUrl; PosterImage = streamDownloader.DownloadImage(PosterUrl); } var hlsMatch = Regex.Match(html, @"""hls_file"":""(.+?)"""); var playlist = string.Empty; if (hlsMatch.Success) { playlist = UnEscapeString(hlsMatch.Groups[1].Value); } var durationMatch = Regex.Match(html, @"""duration"":(\d+)"); if (durationMatch.Success) { Duration = int.Parse(durationMatch.Groups[1].Value); } var streamHdMatch = Regex.Match(html, @"""file_http_hd"":""(.+?)"""); if (streamHdMatch.Success) { var streamUrl = _urBaseurl + UnEscapeString(streamHdMatch.Groups[1].Value) + playlist; ParseStreams(streamDownloader.Download(streamUrl), UnEscapeString(streamHdMatch.Groups[1].Value), ""); } var streamHdSubMatch = Regex.Match(html, @"""file_http_sub_hd"":""(.+?)"""); if (streamHdSubMatch.Success) { var streamUrl = _urBaseurl + UnEscapeString(streamHdSubMatch.Groups[1].Value) + playlist; ParseStreams(streamDownloader.Download(streamUrl), UnEscapeString(streamHdSubMatch.Groups[1].Value), "TEXT"); } }
public override int GetHashCode() { unchecked { var hashCode = (int)Type; hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (PosterUrl != null ? PosterUrl.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0); var hash = 17; foreach (var schedule in Schedules) { hash *= 23; hash += schedule.GetHashCode(); } hashCode = (hashCode * 397) ^ (Schedules != null ? hash : 0); hashCode = (hashCode * 397) ^ (SourceUrl != null ? SourceUrl.GetHashCode() : 0); return(hashCode); } }
public void Refresh() { PosterUrl.RefreshImage(); BannerUrl.RefreshImage(); }