Permalink
Browse files

Merge pull request #15 from DanCooper/patch-7

Better solution for XBMC Trailer
  • Loading branch information...
2 parents 0ff6c16 + 9428a54 commit f2d8d8028c24c7d929baf9d27539f038bf23eea1 bodrick committed Apr 16, 2012
Showing with 7 additions and 4 deletions.
  1. +7 −4 Addons/scraper.EmberCore/scraperMovieNativeModule.vb
@@ -383,10 +383,13 @@ Public Class EmberNativeScraperModule
If Master.GlobalScrapeMod.Trailer AndAlso MySettings.DownloadTrailers Then
tURL = Trailer.DownloadSingleTrailer(DBMovie.Filename, DBMovie.Movie.IMDBID, DBMovie.isSingle, DBMovie.Movie.Trailer)
If Not String.IsNullOrEmpty(tURL) Then
- If tURL.Substring(0, 7) = "http://" Then
- DBMovie.Movie.Trailer = tURL
- 'doSave = True
- ElseIf tURL.Substring(0, 9) = "plugin://" Then
+ If tURL.Substring(0, 22) = "http://www.youtube.com" Then
+ If AdvancedSettings.GetBooleanSetting("UseTMDBTrailerXBMC", False) Then
+ DBMovie.Movie.Trailer = Replace(tURL, "http://www.youtube.com/watch?v=", "plugin://plugin.video.youtube/?action=play_video&videoid=")
+ Else
+ DBMovie.Movie.Trailer = tURL
+ End If
+ ElseIf tURL.Substring(0, 7) = "http://" Then
DBMovie.Movie.Trailer = tURL
Else
DBMovie.TrailerPath = tURL

0 comments on commit f2d8d80

Please sign in to comment.