Skip to content

Commit

Permalink
added: search by IMDB ID in TVDB search results dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
DanCooper committed May 28, 2016
1 parent 160077c commit 7ab9a53
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Addons/scraper.Data.TVDB/Scraper/clsScrapeTVDB.vb
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,19 @@ Namespace TVDBs
If String.IsNullOrEmpty(strID) OrElse strID.Length < 2 Then Return Nothing

Dim nTVShow As New MediaContainers.TVShow
Dim strTVDBID As String = String.Empty

If bwTVDB.CancellationPending Then Return Nothing

Dim APIResult As Task(Of TVDB.Model.SeriesDetails) = Task.Run(Function() GetFullSeriesById(CInt(strID)))
If strID.StartsWith("tt") Then
strTVDBID = GetTVDBbyIMDB(strID)
Else
strTVDBID = strID
End If

If String.IsNullOrEmpty(strTVDBID) Then Return Nothing

Dim APIResult As Task(Of TVDB.Model.SeriesDetails) = Task.Run(Function() GetFullSeriesById(CInt(strTVDBID)))
If APIResult Is Nothing OrElse APIResult.Result Is Nothing Then
Return Nothing
End If
Expand Down

0 comments on commit 7ab9a53

Please sign in to comment.