Permalink
Browse files

Add setting to enable/disable YouTube Trailers in the Library Trailer…

… scraper
  • Loading branch information...
1 parent bb1bfcd commit 74167543238aefc1ceaf7d0b50a4535e33bf6c8d @Giftie committed Feb 20, 2013
Showing with 13 additions and 10 deletions.
  1. +2 −1 addon.py
  2. +1 −1 addon.xml
  3. +1 −0 resources/language/English/strings.xml
  4. +1 −1 resources/lib/scrapers/xbmc_library/scraper.py
  5. +8 −7 resources/settings.xml
View
@@ -56,7 +56,8 @@
"trailer_limit_genre": eval( __setting__( "trailer_limit_genre" ) ),
"trailer_rating": __setting__( "trailer_rating" ),
"trailer_unwatched_movie_only": eval( __setting__( "trailer_unwatched_movie_only" ) ),
- "trailer_unwatched_only": eval( __setting__( "trailer_unwatched_only" ) )
+ "trailer_unwatched_only": eval( __setting__( "trailer_unwatched_only" ) ),
+ "trailer_skip_youtube": eval( __setting__( "trailer_skip_youtube" ) )
}
video_settings = { "mte_intro": ( 0, 1, 1, 2, 3, 4, 5, )[ int( float( __setting__( "mte_intro" ) ) ) ],
View
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.cinema.experience"
name="Cinema Experience"
- version="3.0.2"
+ version="3.0.3"
provider-name="Giftie - nuka1195">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
@@ -203,4 +203,5 @@
<string id="32920">Enable the Home Automation Script</string>
<string id="32921">Must use Trivia Slide Show as well to provide time for script to download trailer(s)</string>
<string id="32922">Override Play button - Very Experimental(may not work for everyone)</string>
+ <string id="32923"> - Skip trailers that use the YouTube Plug-in</string>
</strings>
@@ -76,7 +76,7 @@ def fetch_trailers( self ):
else:
trailer_rating = ( trailer_rating, "NR", )[ trailer_rating not in ( "12", "12A", "PG", "15", "18", "R18", "MA", "U", ) ]
# add trailer to our final list
- if not trailer['trailer'].startswith( 'plugin://' ):
+ if not trailer['trailer'].startswith( 'plugin://' ) and self.settings['trailer_skip_youtube'] :
trailer_info = ( xbmc.getCacheThumbName( trailer['trailer'] ), # id
trailer['label'], # title
trailer['trailer'], # trailer
View
@@ -73,13 +73,14 @@
<setting id="trailer_amt_db_file" type="file" visible="!eq(-12,0) + eq(-5,0)" source="local" mask="AMT.db" label="32120" default="special://profile/addon_data/script.apple.movie.trailers/AMT.db" />
<setting id="trailer_newest_only" type="bool" visible="!eq(-13,0) + eq(-6,0)" label="32160" default="false" />
<setting id="trailer_quality" type="enum" visible="!eq(-14,0) + !eq(-7,2) + !eq(-7,3)" enable="!eq(-7,2) + !eq(-7,3)" lvalues="32171|32172|32173|32174" label="32170" default="0" />
- <setting id="trailer_hd_only" type="bool" visible="!eq(-15,0) + eq(-8,0)" enable="gt(-1,1)" label="32180" default="false" />
- <setting id="trailer_limit_mpaa" type="bool" visible="!eq(-16,0)" label="32140" default="true" />
- <setting id="trailer_limit_genre" type="bool" visible="!eq(-17,0)" label="32141" default="true" />
- <setting id="trailer_rating" type="labelenum" visible="!eq(-18,0) + !eq(-7,2)" enable="eq(-2,false)" values="G|PG|PG-13|R|NC-17|--" label="32150" default="--" />
- <setting id="trailer_unwatched_movie_only" type="bool" visible="eq(-12,3)" label="Only use trailers from unwatched movies" default="true" />
- <setting id="trailer_unwatched_only" type="bool" visible="!eq(-20,0)" label="32190" default="false" />
- <setting type="action" label="32191" visible="!eq(-21,0)" enable="eq(-1,true)" action="RunScript($CWD/addon.py,ClearWatchedTrailers)" />
+ <setting id="trailer_skip_youtube" type="bool" visible="!eq(-15,0) + eq(-8,3)" enable="eq(-8,3)" label="32923" default="true" />
+ <setting id="trailer_hd_only" type="bool" visible="!eq(-16,0) + eq(-9,0)" enable="gt(-2,1)" label="32180" default="false" />
+ <setting id="trailer_limit_mpaa" type="bool" visible="!eq(-17,0)" label="32140" default="true" />
+ <setting id="trailer_limit_genre" type="bool" visible="!eq(-18,0)" label="32141" default="true" />
+ <setting id="trailer_rating" type="labelenum" visible="!eq(-19,0) + !eq(-8,2)" enable="eq(-3,false)" values="G|PG|PG-13|R|NC-17|--" label="32150" default="--" />
+ <setting id="trailer_unwatched_movie_only" type="bool" visible="eq(-13,3)" label="Only use trailers from unwatched movies" default="true" />
+ <setting id="trailer_unwatched_only" type="bool" visible="!eq(-21,0)" label="32190" default="false" />
+ <setting type="action" label="32191" visible="!eq(-22,0)" enable="eq(-1,true)" action="RunScript($CWD/addon.py,ClearWatchedTrailers)" />
</category>
<!-- Feature Presentations -->

0 comments on commit 7416754

Please sign in to comment.