Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Broke out logic for Episode Guide URL code to make more readable and …

…added comments explaining it
  • Loading branch information...
commit 38103b4e7d5d46cd13bb42b17b384cb56a6a309a 1 parent 554c100
Willie Slepecki authored
Showing with 12 additions and 1 deletion.
  1. +12 −1 Addons/scraper.EmberCore/TVScraper/clsScrapeTVDB.vb
View
13 Addons/scraper.EmberCore/TVScraper/clsScrapeTVDB.vb
@@ -1090,7 +1090,18 @@ Public Class Scraper
sID = xS(0).Element("id").Value
.ID = sID
If sInfo.Options.bShowTitle AndAlso (String.IsNullOrEmpty(.Title) OrElse Not Master.eSettings.ShowLockTitle) Then .Title = If(IsNothing(xS(0).Element("SeriesName")), .Title, xS(0).Element("SeriesName").Value)
- If sInfo.Options.bShowEpisodeGuide Then .EpisodeGuideURL = If(Not String.IsNullOrEmpty(Master.eSettings.ExternalTVDBAPIKey), String.Format("http://{0}/api/{1}/series/{2}/all/{3}.zip", Master.eSettings.TVDBMirror, Master.eSettings.ExternalTVDBAPIKey, sID, Master.eSettings.TVDBLanguage), String.Empty)
+
+ ' if the "scraper data:api key" setting in the settings dialog box is not empty, then include an
+ ' episode guide tag. otherwise, keep it blank.
+ If sInfo.Options.bShowEpisodeGuide Then
+ .EpisodeGuideURL = If(Not String.IsNullOrEmpty(Master.eSettings.ExternalTVDBAPIKey),
+ String.Format("http://{0}/api/{1}/series/{2}/all/{3}.zip",
+ Master.eSettings.TVDBMirror,
+ Master.eSettings.ExternalTVDBAPIKey,
+ sID,
+ Master.eSettings.TVDBLanguage), String.Empty)
+ End If
+
If sInfo.Options.bShowGenre AndAlso (String.IsNullOrEmpty(.Genre) OrElse Not Master.eSettings.ShowLockGenre) Then .Genre = If(IsNothing(xS(0).Element("Genre")), .Genre, Strings.Join(xS(0).Element("Genre").Value.Trim(Convert.ToChar("|")).Split(Convert.ToChar("|")), " / "))
If sInfo.Options.bShowMPAA Then .MPAA = If(IsNothing(xS(0).Element("ContentRating")), .MPAA, xS(0).Element("ContentRating").Value)
If sInfo.Options.bShowPlot AndAlso (String.IsNullOrEmpty(.Plot) OrElse Not Master.eSettings.ShowLockPlot) Then .Plot = If(IsNothing(xS(0).Element("Overview")), .Plot, xS(0).Element("Overview").Value.ToString.Replace(vbCrLf, vbLf).Replace(vbLf, vbCrLf))
Please sign in to comment.
Something went wrong with that request. Please try again.