def _download_trailers( equivalent_mpaa, mpaa, genre, movie ): updated_trailers = [] utils.log( "Downloading Trailers: %s Trailers" % trailer_settings[ "trailer_count" ], xbmc.LOGNOTICE ) temp_destination = os.path.join( BASE_CURRENT_SOURCE_PATH, "temp_trailers" ).replace( "\\\\", "\\" ) if not xbmcvfs.exists( temp_destination ): xbmcvfs.mkdir( temp_destination ) trailers = _get_trailers( items=trailer_settings[ "trailer_count" ], equivalent_mpaa=equivalent_mpaa, mpaa=mpaa, genre=genre, movie=movie, mode="download" ) for trailer in trailers: updated_trailer = {} success = False destination = "" thumb = "" utils.log( "Attempting To Download Trailer: %s" % trailer[ 1 ], xbmc.LOGNOTICE ) filename, ext = os.path.splitext( os.path.basename( (trailer[ 2 ].split("|")[0] ).replace( "?","" ) ) ) filename = filename + "-trailer" + ext file_path = os.path.join( trailer_settings[ "trailer_download_folder" ], filename ).replace( "\\\\", "\\" ) # check to see if trailer is already downloaded if xbmcvfs.exists( file_path ): success = True destination = file_path thumb = os.path.splitext( file_path )[0] + ".tbn" else: success, destination = download( trailer[ 2 ], temp_destination, file_tag="-trailer" ) tsuccess, thumb = download( trailer[ 3 ], temp_destination, file_tag="-trailer", new_name=filename, extension=".tbn" ) if success: utils.log( "Successfully Download Trailer: %s" % trailer[ 1 ], xbmc.LOGNOTICE ) updated_trailer[ 0 ] = trailer[ 0 ] updated_trailer[ 1 ] = trailer[ 1 ] updated_trailer[ 2 ] = destination updated_trailer[ 3 ] = thumb updated_trailer[ 4 ] = trailer[ 4 ] updated_trailer[ 5 ] = trailer[ 5 ] updated_trailer[ 6 ] = trailer[ 6 ] updated_trailer[ 7 ] = trailer[ 7 ] updated_trailer[ 8 ] = trailer[ 8 ] updated_trailer[ 9 ] = trailer[ 9 ] updated_trailer[ 10 ] = trailer[ 10 ] updated_trailer[ 11 ] = trailer[ 11 ] _create_nfo_file( updated_trailer, os.path.join( temp_destination, filename).replace( "\\\\", "\\" ) ) else: utils.log( "Failed to Download Trailer: %s" % ( logmessage, trailer[ 1 ] ), xbmc.LOGNOTICE ) updated_trailer=[] xbmcvfs.copy( os.path.join( temp_destination, filename ).replace( "\\\\", "\\"), os.path.join( trailer_settings[ "trailer_download_folder" ], filename ).replace( "\\\\", "\\" ) ) xbmcvfs.copy( os.path.join( temp_destination, os.path.splitext( filename )[0] + ".tbn" ).replace( "\\\\", "\\"), os.path.join( trailer_settings[ "trailer_download_folder" ], os.path.splitext( filename )[0] + ".tbn" ).replace( "\\\\", "\\" ) ) xbmcvfs.copy( os.path.join( temp_destination, os.path.splitext( filename )[0] + ".nfo" ).replace( "\\\\", "\\"), os.path.join( trailer_settings[ "trailer_download_folder" ], os.path.splitext( filename )[0] + ".nfo" ).replace( "\\\\", "\\" ) ) xbmcvfs.delete( os.path.join( temp_destination, filename ).replace( "\\\\", "\\") ) xbmcvfs.delete( os.path.join( temp_destination, os.path.splitext( filename )[0] + ".tbn" ).replace( "\\\\", "\\") ) xbmcvfs.delete( os.path.join( temp_destination, os.path.splitext( filename )[0] + ".nfo" ).replace( "\\\\", "\\") ) updated_trailers += [ updated_trailer ] return updated_trailers
def _download_trailers( mpaa, genre, movie ): updated_trailers = [] xbmc.log( "%s - Downloading Trailers: %s Trailers" % ( logmessage, ( 0, 1, 2, 3, 4, 5, 10, )[ int( _S_( "trailer_count" ) ) ] ), level=xbmc.LOGNOTICE ) trailers = _get_trailers( items=( 0, 1, 2, 3, 4, 5, 10, )[ int( _S_( "trailer_count" ) ) ], mpaa=mpaa, genre=genre, movie=movie, mode="download" ) for trailer in trailers: updated_trailer= {} success = False destination = "" thumb = "" xbmc.log( "%s - Attempting To Download Trailer: %s" % ( logmessage, trailer[ 1 ] ), level=xbmc.LOGNOTICE ) filename, ext = os.path.splitext( os.path.basename( (trailer[ 2 ].split("|")[0] ).replace( "?","" ) ) ) filename = filename + "-trailer" + ext file_path = os.path.join( _S_( "trailer_download_folder" ), filename ).replace( "\\\\", "\\" ) # check to see if trailer is already downloaded if os.path.isfile( file_path ): success = True destination = file_path thumb = os.path.splitext( file_path )[0] + ".tbn" else: success, destination = download( trailer[ 2 ], _S_( "trailer_download_folder" ), file_tag="-trailer" ) tsuccess, thumb = download( trailer[ 3 ], _S_( "trailer_download_folder" ), file_tag="-trailer", new_name=filename, extension=".tbn" ) if success: xbmc.log( "%s - Successfully Download Trailer: %s" % ( logmessage, trailer[ 1 ] ), level=xbmc.LOGNOTICE ) updated_trailer[ 0 ] = trailer[ 0 ] updated_trailer[ 1 ] = trailer[ 1 ] updated_trailer[ 2 ] = destination updated_trailer[ 3 ] = thumb updated_trailer[ 4 ] = trailer[ 4 ] updated_trailer[ 5 ] = trailer[ 5 ] updated_trailer[ 6 ] = trailer[ 6 ] updated_trailer[ 7 ] = trailer[ 7 ] updated_trailer[ 8 ] = trailer[ 8 ] updated_trailer[ 9 ] = trailer[ 9 ] updated_trailer[ 10 ] = trailer[ 10 ] updated_trailer[ 11 ] = trailer[ 11 ] _create_nfo_file( updated_trailer, destination ) else: xbmc.log( "%s - Failed to Download Trailer: %s" % ( logmessage, trailer[ 1 ] ), level=xbmc.LOGNOTICE ) updated_trailer=[] updated_trailers += [ updated_trailer ] return updated_trailers
def _download_trailers( mpaa, genre, movie ): updated_trailers = [] log( "%s - Downloading Trailers: %s Trailers" % ( logmessage, ( 0, 1, 2, 3, 4, 5, 10, )[ int( _S_( "trailer_count" ) ) ] ), xbmc.LOGNOTICE ) trailers = _get_trailers( items=( 0, 1, 2, 3, 4, 5, 10, )[ int( _S_( "trailer_count" ) ) ], mpaa=mpaa, genre=genre, movie=movie, mode="download" ) for trailer in trailers: updated_trailer= {} log( "%s - Attempting To Download Trailer: %s" % ( logmessage, trailer[ 1 ] ), xbmc.LOGNOTICE ) filename, ext = os.path.splitext( os.path.basename( (trailer[ 2 ].split("|")[0] ).replace( "?","" ) ) ) filename = filename + "-trailer" + ext file_path = os.path.join( _S_( "trailer_download_folder" ), filename ).replace( "\\\\", "\\" ) # check to see if trailer is already downloaded if os.path.isfile( file_path ): success = True destination = file_path else: success, destination = download( trailer[ 2 ], _S_( "trailer_download_folder" ), file_tag="-trailer" ) tsuccess, thumb = download( trailer[ 3 ], _S_( "trailer_download_folder" ), file_tag="-trailer", new_name=filename, extension=".tbn" ) if success: log( "%s - Successfully Download Trailer: %s" % ( logmessage, trailer[ 1 ] ), xbmc.LOGNOTICE ) updated_trailer[ 0 ] = trailer[ 0 ] updated_trailer[ 1 ] = trailer[ 1 ] updated_trailer[ 2 ] = destination updated_trailer[ 3 ] = thumb updated_trailer[ 4 ] = trailer[ 4 ] updated_trailer[ 5 ] = trailer[ 5 ] updated_trailer[ 6 ] = trailer[ 6 ] updated_trailer[ 7 ] = trailer[ 7 ] updated_trailer[ 8 ] = trailer[ 8 ] updated_trailer[ 9 ] = trailer[ 9 ] updated_trailer[ 10 ] = trailer[ 10 ] updated_trailer[ 11 ] = trailer[ 11 ] _create_nfo_file( updated_trailer, destination ) else: log( "%s - Failed to Download Trailer: %s" % ( logmessage, trailer[ 1 ] ), xbmc.LOGNOTICE ) updated_trailer=[] updated_trailers += [ updated_trailer ] return updated_trailers
def _create_playlist( self, mpaa, audio, genre, movie, equivalent_mpaa ): # TODO: try to get a local thumb for special videos? log( "Building Cinema Experience Playlist", xbmc.LOGNOTICE ) # Add Countdown video log( "Adding Countdown Videos: %s Video(s)" % video_settings[ "countdown_video" ], xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=video_settings[ "countdown_video" ], path=( video_settings[ "countdown_video_file" ], video_settings[ "countdown_video_folder" ], )[ video_settings[ "countdown_video_type" ] == "folder" ], genre="Countdown", writer="Countdown", index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Countdown Label into Trigger List self.trigger_list.insert( 0, "Countdown" ) # get Dolby/DTS videos if video_settings[ "enable_audio" ] and video_settings[ "audio_videos_folder" ]: log( "Adding Audio Format Video", xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=1 * ( video_settings[ "audio_videos_folder" ] != "" ), path=video_settings[ "audio_videos_folder" ] + audio_formats.get( audio, "Other" ) + video_settings[ "audio_videos_folder" ][ -1 ], genre="Audio Format", writer="Audio Format", index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Audio Format Label into Trigger List self.trigger_list.insert( 0, "Audio Format" ) # get rating video if video_settings[ "enable_ratings" ]: log( "Adding Ratings Video", xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=1 * ( video_settings[ "rating_videos_folder" ] != "" ), path=video_settings[ "rating_videos_folder" ] + mpaa + ".avi", genre="MPAA Rating", writer="MPAA Rating", index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Rating Label into Trigger List self.trigger_list.insert( 0, "MPAA Rating" ) # get feature presentation intro videos log( "Adding Feature Presentation Intro Videos: %s Videos" % video_settings[ "fpv_intro" ], xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=video_settings[ "fpv_intro" ], path=( video_settings[ "fpv_intro_file" ], video_settings[ "fpv_intro_folder" ], )[ video_settings[ "fpv_intro_type" ] == "folder" ], genre="Feature Presentation Intro", writer="Feature Presentation Intro", index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Feature Presentation Label into Trigger List self.trigger_list.insert( 0, "Feature Presentation Intro" ) # get trailers log( "Retriving Trailers: %s Trailers" % trailer_settings[ "trailer_count" ], xbmc.LOGNOTICE ) trailers = _get_trailers( items=trailer_settings[ "trailer_count" ], equivalent_mpaa=equivalent_mpaa, mpaa=mpaa, genre=genre, movie=movie, mode="playlist" ) # get coming attractions outro videos log( "Adding Coming Attraction Outro Video: %s Videos" % video_settings[ "cav_outro" ], xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=video_settings[ "cav_outro" ] * ( len( trailers ) > 0 ), path=( video_settings[ "cav_outro_file" ], video_settings[ "cav_outro_folder" ], )[ video_settings[ "cav_outro_type" ] == "folder" ], genre="Coming Attractions Outro", writer="Coming Attractions Outro", index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Coming Attraction Outro Label into Trigger List self.trigger_list.insert( 0, "Coming Attractions Outro" ) # enumerate through our list of trailers and add them to our playlist log( "Adding Trailers: %s Trailers" % len( trailers ), xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() for trailer in trailers: # get trailers _get_special_items( playlist=self.playlist, items=1, path=trailer[ 2 ], genre=trailer[ 9 ] or "Movie Trailer", title=trailer[ 1 ], thumbnail=trailer[ 3 ], plot=trailer[ 4 ], runtime=trailer[ 5 ], mpaa=trailer[ 6 ], release_date=trailer[ 7 ], studio=trailer[ 8 ] or "Movie Trailer", writer= "Movie Trailer", director=trailer[ 11 ], index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Trailer Label into Trigger List self.trigger_list.insert( 0, "Movie Trailer" ) # get coming attractions intro videos log( "Adding Coming Attraction Intro Videos: %s Videos" % video_settings[ "cav_intro" ], xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=video_settings[ "cav_intro" ] * ( len( trailers ) > 0 ), path=( video_settings[ "cav_intro_file" ], video_settings[ "cav_intro_folder" ], )[ video_settings[ "cav_intro_type" ] == "folder" ], genre="Coming Attractions Intro", writer="Coming Attractions Intro", index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Coming Attraction Intro Label into Trigger List self.trigger_list.insert( 0, "Coming Attractions Intro" ) # get movie theater experience intro videos log( "Adding Movie Theatre Intro Videos: %s Videos" % video_settings[ "mte_intro" ], xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=video_settings[ "mte_intro" ], path=( video_settings[ "mte_intro_file" ], video_settings[ "mte_intro_folder" ], )[ video_settings[ "mte_intro_type" ] == "folder" ], genre="Movie Theater Intro", writer="Movie Theater Intro", index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Movie Theatre Intro Label into Trigger List self.trigger_list.insert( 0, "Movie Theater Intro" ) # get trivia outro video(s) if trivia_settings[ "trivia_mode" ] != 0: log( "Adding Trivia Outro Videos: %s Videos" % video_settings[ "trivia_outro" ], xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=video_settings[ "trivia_outro" ], path=( video_settings[ "trivia_outro_file" ], video_settings[ "trivia_outro_folder" ], )[ video_settings[ "trivia_outro_type" ] == "folder" ], genre="Trivia Outro", writer="Trivia Outro", index=0 #media_type="video/picture" ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Trivia Outro Label into Trigger List self.trigger_list.insert( 0, "Trivia Outro" ) # get feature presentation outro videos log( "Adding Feature Presentation Outro Videos: %s Videos" % video_settings[ "fpv_outro" ], xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=video_settings[ "fpv_outro" ], path=( video_settings[ "fpv_outro_file" ], video_settings[ "fpv_outro_folder" ], )[ video_settings[ "fpv_outro_type" ] == "folder" ], genre="Feature Presentation Outro", writer="Feature Presentation Outro", ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Feature Presentation Outro Label into Trigger List self.trigger_list.append( "Feature Presentation Outro" ) # get movie theater experience outro videos log( "Adding Movie Theatre Outro Videos: %s Videos" % video_settings[ "mte_outro" ], xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=video_settings[ "mte_outro" ], path=( video_settings[ "mte_outro_file" ], video_settings[ "mte_outro_folder" ], )[ video_settings[ "mte_outro_type" ] == "folder" ], genre="Movie Theatre Outro", writer="Movie Theatre Outro", ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Movie Theatre Outro Label into Trigger List self.trigger_list.append( "Movie Theatre Outro" ) log( "Playlist Size: %s" % xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size(), xbmc.LOGNOTICE ) log( "Trigger List Size: %d" % len(self.trigger_list), xbmc.LOGNOTICE ) return self.trigger_list
def _create_playlist( self, mpaa, audio, genre, movie, equivalent_mpaa, is_3d_movie ): # TODO: try to get a local thumb for special videos? utils.log( "Building Cinema Experience Playlist", xbmc.LOGNOTICE ) # setup for 3d videos if is_3d_movie and _3d_settings[ "enable_3d_intro" ]: if _3d_settings[ "3d_enable_audio" ] and video_settings[ "enable_audio" ]: audio_videos_folder = _3d_settings[ "3d_audio_videos_folder" ] elif not ( _3d_settings[ "3d_override" ] ) and video_settings[ "enable_audio" ]: audio_videos_folder = video_settings[ "audio_videos_folder" ] if _3d_settings[ "3d_enable_ratings" ] and video_settings[ "enable_ratings" ]: rating_videos_folder = _3d_settings[ "3d_rating_videos_folder" ] elif not ( _3d_settings[ "3d_override" ] ) and video_settings[ "enable_ratings" ]: rating_videos_folder = video_settings[ "rating_videos_folder" ] if _3d_settings[ "3d_fpv_intro" ]: fpv_intro_file = _3d_settings[ "3d_fpv_intro_file" ] fpv_intro_folder = _3d_settings[ "3d_fpv_intro_folder" ] fpv_intro = _3d_settings[ "3d_fpv_intro" ] fpv_intro_type = _3d_settings[ "3d_fpv_intro_type" ] elif not ( _3d_settings[ "3d_override" ] ): fpv_intro_file = video_settings[ "fpv_intro_file" ] fpv_intro_folder = video_settings[ "fpv_intro_folder" ] fpv_intro = video_settings[ "fpv_intro" ] fpv_intro_type = video_settings[ "fpv_intro_type" ] if _3d_settings[ "3d_outro" ]: fpv_outro_file = _3d_settings[ "3d_fpv_outro_file" ] fpv_outro_folder = _3d_settings[ "3d_fpv_outro_folder" ] fpv_outro = _3d_settings[ "3d_fpv_outro" ] fpv_outro_type = _3d_settings[ "3d_fpv_outro_type" ] elif not ( _3d_settings[ "3d_override" ] ): fpv_outro_file = video_settings[ "fpv_outro_file" ] fpv_outro_folder = video_settings[ "fpv_outro_folder" ] fpv_outro = video_settings[ "fpv_outro" ] fpv_outro_type = video_settings[ "fpv_outro_type" ] if _3d_settings[ "3d_countdown_video" ]: countdown_video = _3d_settings[ "3d_countdown_video" ] countdown_video_type = _3d_settings[ "3d_countdown_video_type" ] countdown_video_file = _3d_settings[ "3d_countdown_video_file" ] countdown_video_folder = _3d_settings[ "3d_countdown_video_folder" ] elif not ( _3d_settings[ "3d_override" ] ): countdown_video = video_settings[ "countdown_video" ] countdown_video_type = video_settings[ "countdown_video_type" ] countdown_video_file = video_settings[ "countdown_video_file" ] countdown_video_folder = video_settings[ "countdown_video_folder" ] else: audio_videos_folder = video_settings[ "audio_videos_folder" ] rating_videos_folder = video_settings[ "rating_videos_folder" ] fpv_intro = video_settings[ "fpv_intro" ] fpv_intro_type = video_settings[ "fpv_intro_type" ] fpv_intro_file = video_settings[ "fpv_intro_file" ] fpv_intro_folder = video_settings[ "fpv_intro_folder" ] fpv_outro = video_settings[ "fpv_outro" ] fpv_outro_type = video_settings[ "fpv_outro_type" ] fpv_outro_file = video_settings[ "fpv_outro_file" ] fpv_outro_folder = video_settings[ "fpv_outro_folder" ] countdown_video = video_settings[ "countdown_video" ] countdown_video_type = video_settings[ "countdown_video_type" ] countdown_video_file = video_settings[ "countdown_video_file" ] countdown_video_folder = video_settings[ "countdown_video_folder" ] # get Dolby/DTS videos if video_settings[ "enable_audio" ] and audio_videos_folder: utils.log( "Adding Audio Format Video", xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=1 * ( audio_videos_folder != "" ), path=audio_videos_folder + audio_formats.get( audio, "Other" ) + audio_videos_folder[ -1 ], genre="Audio Format", writer="Audio Format", index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Audio Format Label into Trigger List self.trigger_list.insert( 0, "Audio Format" ) # get rating video if video_settings[ "enable_ratings" ]: utils.log( "Adding Ratings Video", xbmc.LOGNOTICE ) utils.log( " Path: %s" % rating_videos_folder ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=1 * ( rating_videos_folder != "" ), path=rating_videos_folder + mpaa + ".avi", genre="MPAA Rating", writer="MPAA Rating", index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Rating Label into Trigger List self.trigger_list.insert( 0, "MPAA Rating" ) # get feature presentation intro videos if video_settings[ "fpv_intro" ] > 0: utils.log( "Adding Feature Presentation Intro Videos: %s Videos" % fpv_intro, xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=fpv_intro, path=( fpv_intro_file, fpv_intro_folder, )[ fpv_intro_type == "folder" ], genre="Feature Presentation Intro", writer="Feature Presentation Intro", index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Feature Presentation Label into Trigger List self.trigger_list.insert( 0, "Feature Presentation Intro" ) # Add Countdown video if video_settings[ "countdown_video" ] > 0: utils.log( "Adding Countdown Videos: %s Video(s)" % countdown_video, xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=countdown_video, path=( countdown_video_file, countdown_video_folder, )[ countdown_video_type == "folder" ], genre="Countdown", writer="Countdown", index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Countdown Label into Trigger List self.trigger_list.insert( 0, "Countdown" ) # get 3D Trailers if is_3d_movie and _3d_settings[ "3d_trailers" ]: utils.log( "Retriving 3D Trailers: %s Trailers" % _3d_settings[ "3d_trailer_count" ], xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _3d_trailers = _get_trailers( items=_3d_settings[ "3d_trailer_count" ], equivalent_mpaa=equivalent_mpaa, mpaa=mpaa, genre=genre, movie=movie, mode="3D" ) for trailer in _3d_trailers: # get trailers _get_special_items( playlist=self.playlist, items=1, path=trailer[ 2 ], genre=trailer[ 9 ] or "3D Movie Trailer", title=trailer[ 1 ], thumbnail=trailer[ 3 ], plot=trailer[ 4 ], runtime=trailer[ 5 ], mpaa=trailer[ 6 ], release_date=trailer[ 7 ], studio=trailer[ 8 ] or "3D Movie Trailer", writer= "3D Movie Trailer", director=trailer[ 11 ], index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert 3D Trailer Label into Trigger List self.trigger_list.insert( 0, "3D Movie Trailer" ) # 3D Intro Video if is_3d_movie and _3d_settings[ "3d_intro" ]: utils.log( "Adding 3D Intro Video: %s Videos" % _3d_settings[ "3d_intro" ], xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=_3d_settings[ "3d_intro" ], path=( _3d_settings[ "3d_intro_file" ], _3d_settings[ "3d_intro_folder" ], )[ _3d_settings[ "3d_intro_type" ] == "folder" ], genre="3D Intro", writer="3D Intro", index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert 3D Intro Label into Trigger List self.trigger_list.insert( 0, "3D Intro" ) # get trailers if trailer_settings[ "trailer_count" ] > 0: utils.log( "Retriving Trailers: %s Trailers" % trailer_settings[ "trailer_count" ], xbmc.LOGNOTICE ) trailers = _get_trailers( items=trailer_settings[ "trailer_count" ], equivalent_mpaa=equivalent_mpaa, mpaa=mpaa, genre=genre, movie=movie, mode="playlist" ) # get coming attractions outro videos if video_settings[ "cav_outro" ] > 0: utils.log( "Adding Coming Attraction Outro Video: %s Videos" % video_settings[ "cav_outro" ], xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=video_settings[ "cav_outro" ] * ( len( trailers ) > 0 ), path=( video_settings[ "cav_outro_file" ], video_settings[ "cav_outro_folder" ], )[ video_settings[ "cav_outro_type" ] == "folder" ], genre="Coming Attractions Outro", writer="Coming Attractions Outro", index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Coming Attraction Outro Label into Trigger List self.trigger_list.insert( 0, "Coming Attractions Outro" ) # enumerate through our list of trailers and add them to our playlist utils.log( "Adding Trailers: %s Trailers" % len( trailers ), xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() for trailer in trailers: # get trailers _get_special_items( playlist=self.playlist, items=1, path=trailer[ 2 ], genre=trailer[ 9 ] or "Movie Trailer", title=trailer[ 1 ], thumbnail=trailer[ 3 ], plot=trailer[ 4 ], runtime=trailer[ 5 ], mpaa=trailer[ 6 ], release_date=trailer[ 7 ], studio=trailer[ 8 ] or "Movie Trailer", writer= "Movie Trailer", director=trailer[ 11 ], index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Trailer Label into Trigger List self.trigger_list.insert( 0, "Movie Trailer" ) # get coming attractions intro videos if video_settings[ "cav_intro" ] > 0: utils.log( "Adding Coming Attraction Intro Videos: %s Videos" % video_settings[ "cav_intro" ], xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=video_settings[ "cav_intro" ] * ( len( trailers ) > 0 ), path=( video_settings[ "cav_intro_file" ], video_settings[ "cav_intro_folder" ], )[ video_settings[ "cav_intro_type" ] == "folder" ], thumbnail="DefaultVideo.png", genre="Coming Attractions Intro", writer="Coming Attractions Intro", index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Coming Attraction Intro Label into Trigger List self.trigger_list.insert( 0, "Coming Attractions Intro" ) # get movie theater experience intro videos if video_settings[ "mte_intro" ] > 0: utils.log( "Adding Movie Theatre Intro Videos: %s Videos" % video_settings[ "mte_intro" ], xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=video_settings[ "mte_intro" ], path=( video_settings[ "mte_intro_file" ], video_settings[ "mte_intro_folder" ], )[ video_settings[ "mte_intro_type" ] == "folder" ], genre="Movie Theater Intro", writer="Movie Theater Intro", index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Movie Theatre Intro Label into Trigger List self.trigger_list.insert( 0, "Movie Theater Intro" ) # get trivia outro video(s) if trivia_settings[ "trivia_mode" ] != 0: utils.log( "Adding Trivia Outro Videos: %s Videos" % video_settings[ "trivia_outro" ], xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=video_settings[ "trivia_outro" ], path=( video_settings[ "trivia_outro_file" ], video_settings[ "trivia_outro_folder" ], )[ video_settings[ "trivia_outro_type" ] == "folder" ], genre="Trivia Outro", writer="Trivia Outro", index=0 #media_type="video/picture" ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Trivia Outro Label into Trigger List self.trigger_list.insert( 0, "Trivia Outro" ) # get feature presentation outro videos if video_settings[ "fpv_outro" ] > 0: utils.log( "Adding Feature Presentation Outro Videos: %s Videos" % fpv_outro, xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=fpv_outro, path=( fpv_outro_file, fpv_outro_folder, )[ fpv_outro_type == "folder" ], genre="Feature Presentation Outro", writer="Feature Presentation Outro", ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Feature Presentation Outro Label into Trigger List self.trigger_list.append( "Feature Presentation Outro" ) # 3D Outro Video if is_3d_movie and _3d_settings[ "3d_outro" ]: utils.log( "Adding 3D Outro Video: %s Videos" % _3d_settings[ "3d_outro" ], xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=_3d_settings[ "3d_outro" ], path=( _3d_settings[ "3d_outro_file" ], _3d_settings[ "3d_outro_folder" ], )[ _3d_settings[ "3d_outro_type" ] == "folder" ], genre="3D Outro", writer="3D Outro", ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert 3D Outro Label into Trigger List self.trigger_list.append( "3D Outro" ) # get movie theater experience outro videos if video_settings[ "mte_outro" ] > 0: utils.log( "Adding Movie Theatre Outro Videos: %s Videos" % video_settings[ "mte_outro" ], xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=video_settings[ "mte_outro" ], path=( video_settings[ "mte_outro_file" ], video_settings[ "mte_outro_folder" ], )[ video_settings[ "mte_outro_type" ] == "folder" ], genre="Movie Theatre Outro", writer="Movie Theatre Outro", ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Movie Theatre Outro Label into Trigger List self.trigger_list.append( "Movie Theatre Outro" ) utils.log( "Playlist Size: %s" % xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size(), xbmc.LOGNOTICE ) utils.log( "Trigger List Size: %d" % len(self.trigger_list), xbmc.LOGNOTICE ) return self.trigger_list
def _create_playlist(self, mpaa, audio, genre, movie, equivalent_mpaa): # TODO: try to get a local thumb for special videos? log("Building Cinema Experience Playlist", xbmc.LOGNOTICE) # Add Countdown video log( "Adding Countdown Videos: %s Video(s)" % video_settings["countdown_video"], xbmc.LOGNOTICE) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=video_settings["countdown_video"], path=( video_settings["countdown_video_file"], video_settings["countdown_video_folder"], )[video_settings["countdown_video_type"] == "folder"], genre="Countdown", writer="Countdown", index=0) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert Countdown Label into Trigger List self.trigger_list.insert(0, "Countdown") # get Dolby/DTS videos if video_settings["enable_audio"] and video_settings[ "audio_videos_folder"]: log("Adding Audio Format Video", xbmc.LOGNOTICE) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items(playlist=self.playlist, items=1 * (video_settings["audio_videos_folder"] != ""), path=video_settings["audio_videos_folder"] + audio_formats.get(audio, "Other") + video_settings["audio_videos_folder"][-1], genre="Audio Format", writer="Audio Format", index=0) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert Audio Format Label into Trigger List self.trigger_list.insert(0, "Audio Format") # get rating video if video_settings["enable_ratings"]: log("Adding Ratings Video", xbmc.LOGNOTICE) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=1 * (video_settings["rating_videos_folder"] != ""), path=video_settings["rating_videos_folder"] + mpaa + ".avi", genre="MPAA Rating", writer="MPAA Rating", index=0) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert Rating Label into Trigger List self.trigger_list.insert(0, "MPAA Rating") # get feature presentation intro videos log( "Adding Feature Presentation Intro Videos: %s Videos" % video_settings["fpv_intro"], xbmc.LOGNOTICE) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items(playlist=self.playlist, items=video_settings["fpv_intro"], path=( video_settings["fpv_intro_file"], video_settings["fpv_intro_folder"], )[video_settings["fpv_intro_type"] == "folder"], genre="Feature Presentation Intro", writer="Feature Presentation Intro", index=0) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert Feature Presentation Label into Trigger List self.trigger_list.insert(0, "Feature Presentation Intro") # get trailers log( "Retriving Trailers: %s Trailers" % trailer_settings["trailer_count"], xbmc.LOGNOTICE) trailers = _get_trailers(items=trailer_settings["trailer_count"], equivalent_mpaa=equivalent_mpaa, mpaa=mpaa, genre=genre, movie=movie, mode="playlist") # get coming attractions outro videos log( "Adding Coming Attraction Outro Video: %s Videos" % video_settings["cav_outro"], xbmc.LOGNOTICE) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items(playlist=self.playlist, items=video_settings["cav_outro"] * (len(trailers) > 0), path=( video_settings["cav_outro_file"], video_settings["cav_outro_folder"], )[video_settings["cav_outro_type"] == "folder"], genre="Coming Attractions Outro", writer="Coming Attractions Outro", index=0) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert Coming Attraction Outro Label into Trigger List self.trigger_list.insert(0, "Coming Attractions Outro") # enumerate through our list of trailers and add them to our playlist log("Adding Trailers: %s Trailers" % len(trailers), xbmc.LOGNOTICE) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() for trailer in trailers: # get trailers _get_special_items(playlist=self.playlist, items=1, path=trailer[2], genre=trailer[9] or "Movie Trailer", title=trailer[1], thumbnail=trailer[3], plot=trailer[4], runtime=trailer[5], mpaa=trailer[6], release_date=trailer[7], studio=trailer[8] or "Movie Trailer", writer="Movie Trailer", director=trailer[11], index=0) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert Trailer Label into Trigger List self.trigger_list.insert(0, "Movie Trailer") # get coming attractions intro videos log( "Adding Coming Attraction Intro Videos: %s Videos" % video_settings["cav_intro"], xbmc.LOGNOTICE) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items(playlist=self.playlist, items=video_settings["cav_intro"] * (len(trailers) > 0), path=( video_settings["cav_intro_file"], video_settings["cav_intro_folder"], )[video_settings["cav_intro_type"] == "folder"], genre="Coming Attractions Intro", writer="Coming Attractions Intro", index=0) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert Coming Attraction Intro Label into Trigger List self.trigger_list.insert(0, "Coming Attractions Intro") # get movie theater experience intro videos log( "Adding Movie Theatre Intro Videos: %s Videos" % video_settings["mte_intro"], xbmc.LOGNOTICE) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items(playlist=self.playlist, items=video_settings["mte_intro"], path=( video_settings["mte_intro_file"], video_settings["mte_intro_folder"], )[video_settings["mte_intro_type"] == "folder"], genre="Movie Theater Intro", writer="Movie Theater Intro", index=0) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert Movie Theatre Intro Label into Trigger List self.trigger_list.insert(0, "Movie Theater Intro") # get trivia outro video(s) if trivia_settings["trivia_mode"] != 0: log( "Adding Trivia Outro Videos: %s Videos" % video_settings["trivia_outro"], xbmc.LOGNOTICE) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=video_settings["trivia_outro"], path=( video_settings["trivia_outro_file"], video_settings["trivia_outro_folder"], )[video_settings["trivia_outro_type"] == "folder"], genre="Trivia Outro", writer="Trivia Outro", index=0 #media_type="video/picture" ) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert Trivia Outro Label into Trigger List self.trigger_list.insert(0, "Trivia Outro") # get feature presentation outro videos log( "Adding Feature Presentation Outro Videos: %s Videos" % video_settings["fpv_outro"], xbmc.LOGNOTICE) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=video_settings["fpv_outro"], path=( video_settings["fpv_outro_file"], video_settings["fpv_outro_folder"], )[video_settings["fpv_outro_type"] == "folder"], genre="Feature Presentation Outro", writer="Feature Presentation Outro", ) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert Feature Presentation Outro Label into Trigger List self.trigger_list.append("Feature Presentation Outro") # get movie theater experience outro videos log( "Adding Movie Theatre Outro Videos: %s Videos" % video_settings["mte_outro"], xbmc.LOGNOTICE) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=video_settings["mte_outro"], path=( video_settings["mte_outro_file"], video_settings["mte_outro_folder"], )[video_settings["mte_outro_type"] == "folder"], genre="Movie Theatre Outro", writer="Movie Theatre Outro", ) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert Movie Theatre Outro Label into Trigger List self.trigger_list.append("Movie Theatre Outro") log("Playlist Size: %s" % xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size(), xbmc.LOGNOTICE) log("Trigger List Size: %d" % len(self.trigger_list), xbmc.LOGNOTICE) return self.trigger_list
def _download_trailers(equivalent_mpaa, mpaa, genre, movie): updated_trailers = [] utils.log( "Downloading Trailers: %s Trailers" % trailer_settings["trailer_count"], xbmc.LOGNOTICE) temp_destination = os.path.join(BASE_CURRENT_SOURCE_PATH, "temp_trailers").replace("\\\\", "\\") if not xbmcvfs.exists(temp_destination): xbmcvfs.mkdir(temp_destination) trailers = _get_trailers(items=trailer_settings["trailer_count"], equivalent_mpaa=equivalent_mpaa, mpaa=mpaa, genre=genre, movie=movie, mode="download") for trailer in trailers: updated_trailer = {} success = False destination = "" thumb = "" utils.log("Attempting To Download Trailer: %s" % trailer[1], xbmc.LOGNOTICE) filename, ext = os.path.splitext( os.path.basename((trailer[2].split("|")[0]).replace("?", ""))) filename = filename + "-trailer" + ext file_path = os.path.join(trailer_settings["trailer_download_folder"], filename).replace("\\\\", "\\") # check to see if trailer is already downloaded if xbmcvfs.exists(file_path): success = True destination = file_path thumb = os.path.splitext(file_path)[0] + ".tbn" else: success, destination = download(trailer[2], temp_destination, file_tag="-trailer") tsuccess, thumb = download(trailer[3], temp_destination, file_tag="-trailer", new_name=filename, extension=".tbn") if success: utils.log("Successfully Download Trailer: %s" % trailer[1], xbmc.LOGNOTICE) updated_trailer[0] = trailer[0] updated_trailer[1] = trailer[1] updated_trailer[2] = destination updated_trailer[3] = thumb updated_trailer[4] = trailer[4] updated_trailer[5] = trailer[5] updated_trailer[6] = trailer[6] updated_trailer[7] = trailer[7] updated_trailer[8] = trailer[8] updated_trailer[9] = trailer[9] updated_trailer[10] = trailer[10] updated_trailer[11] = trailer[11] _create_nfo_file( updated_trailer, os.path.join(temp_destination, filename).replace("\\\\", "\\")) else: utils.log( "Failed to Download Trailer: %s" % (logmessage, trailer[1]), xbmc.LOGNOTICE) updated_trailer = [] xbmcvfs.copy( os.path.join(temp_destination, filename).replace("\\\\", "\\"), os.path.join(trailer_settings["trailer_download_folder"], filename).replace("\\\\", "\\")) xbmcvfs.copy( os.path.join(temp_destination, os.path.splitext(filename)[0] + ".tbn").replace( "\\\\", "\\"), os.path.join(trailer_settings["trailer_download_folder"], os.path.splitext(filename)[0] + ".tbn").replace( "\\\\", "\\")) xbmcvfs.copy( os.path.join(temp_destination, os.path.splitext(filename)[0] + ".nfo").replace( "\\\\", "\\"), os.path.join(trailer_settings["trailer_download_folder"], os.path.splitext(filename)[0] + ".nfo").replace( "\\\\", "\\")) xbmcvfs.delete( os.path.join(temp_destination, filename).replace("\\\\", "\\")) xbmcvfs.delete( os.path.join(temp_destination, os.path.splitext(filename)[0] + ".tbn").replace( "\\\\", "\\")) xbmcvfs.delete( os.path.join(temp_destination, os.path.splitext(filename)[0] + ".nfo").replace( "\\\\", "\\")) updated_trailers += [updated_trailer] return updated_trailers
def _create_playlist(self, mpaa, audio, genre, movie, equivalent_mpaa, is_3d_movie): # TODO: try to get a local thumb for special videos? utils.log("Building Cinema Experience Playlist", xbmc.LOGNOTICE) # setup for 3d videos if is_3d_movie and _3d_settings["enable_3d_intro"]: if _3d_settings["3d_enable_audio"] and video_settings[ "enable_audio"]: audio_videos_folder = _3d_settings["3d_audio_videos_folder"] elif not (_3d_settings["3d_override"] ) and video_settings["enable_audio"]: audio_videos_folder = video_settings["audio_videos_folder"] if _3d_settings["3d_enable_ratings"] and video_settings[ "enable_ratings"]: rating_videos_folder = _3d_settings["3d_rating_videos_folder"] elif not (_3d_settings["3d_override"] ) and video_settings["enable_ratings"]: rating_videos_folder = video_settings["rating_videos_folder"] if _3d_settings["3d_fpv_intro"]: fpv_intro_file = _3d_settings["3d_fpv_intro_file"] fpv_intro_folder = _3d_settings["3d_fpv_intro_folder"] fpv_intro = _3d_settings["3d_fpv_intro"] fpv_intro_type = _3d_settings["3d_fpv_intro_type"] elif not (_3d_settings["3d_override"]): fpv_intro_file = video_settings["fpv_intro_file"] fpv_intro_folder = video_settings["fpv_intro_folder"] fpv_intro = video_settings["fpv_intro"] fpv_intro_type = video_settings["fpv_intro_type"] if _3d_settings["3d_outro"]: fpv_outro_file = _3d_settings["3d_fpv_outro_file"] fpv_outro_folder = _3d_settings["3d_fpv_outro_folder"] fpv_outro = _3d_settings["3d_fpv_outro"] fpv_outro_type = _3d_settings["3d_fpv_outro_type"] elif not (_3d_settings["3d_override"]): fpv_outro_file = video_settings["fpv_outro_file"] fpv_outro_folder = video_settings["fpv_outro_folder"] fpv_outro = video_settings["fpv_outro"] fpv_outro_type = video_settings["fpv_outro_type"] if _3d_settings["3d_countdown_video"]: countdown_video = _3d_settings["3d_countdown_video"] countdown_video_type = _3d_settings["3d_countdown_video_type"] countdown_video_file = _3d_settings["3d_countdown_video_file"] countdown_video_folder = _3d_settings[ "3d_countdown_video_folder"] elif not (_3d_settings["3d_override"]): countdown_video = video_settings["countdown_video"] countdown_video_type = video_settings["countdown_video_type"] countdown_video_file = video_settings["countdown_video_file"] countdown_video_folder = video_settings[ "countdown_video_folder"] else: audio_videos_folder = video_settings["audio_videos_folder"] rating_videos_folder = video_settings["rating_videos_folder"] fpv_intro = video_settings["fpv_intro"] fpv_intro_type = video_settings["fpv_intro_type"] fpv_intro_file = video_settings["fpv_intro_file"] fpv_intro_folder = video_settings["fpv_intro_folder"] fpv_outro = video_settings["fpv_outro"] fpv_outro_type = video_settings["fpv_outro_type"] fpv_outro_file = video_settings["fpv_outro_file"] fpv_outro_folder = video_settings["fpv_outro_folder"] countdown_video = video_settings["countdown_video"] countdown_video_type = video_settings["countdown_video_type"] countdown_video_file = video_settings["countdown_video_file"] countdown_video_folder = video_settings["countdown_video_folder"] # get Dolby/DTS videos if video_settings["enable_audio"] and audio_videos_folder: utils.log("Adding Audio Format Video", xbmc.LOGNOTICE) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items(playlist=self.playlist, items=1 * (audio_videos_folder != ""), path=audio_videos_folder + audio_formats.get(audio, "Other") + audio_videos_folder[-1], genre="Audio Format", writer="Audio Format", index=0) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert Audio Format Label into Trigger List self.trigger_list.insert(0, "Audio Format") # get rating video if video_settings["enable_ratings"]: utils.log("Adding Ratings Video", xbmc.LOGNOTICE) utils.log(" Path: %s" % rating_videos_folder) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items(playlist=self.playlist, items=1 * (rating_videos_folder != ""), path=rating_videos_folder + mpaa + ".avi", genre="MPAA Rating", writer="MPAA Rating", index=0) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert Rating Label into Trigger List self.trigger_list.insert(0, "MPAA Rating") # get feature presentation intro videos if video_settings["fpv_intro"] > 0: utils.log( "Adding Feature Presentation Intro Videos: %s Videos" % fpv_intro, xbmc.LOGNOTICE) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items(playlist=self.playlist, items=fpv_intro, path=( fpv_intro_file, fpv_intro_folder, )[fpv_intro_type == "folder"], genre="Feature Presentation Intro", writer="Feature Presentation Intro", index=0) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert Feature Presentation Label into Trigger List self.trigger_list.insert(0, "Feature Presentation Intro") # Add Countdown video if video_settings["countdown_video"] > 0: utils.log("Adding Countdown Videos: %s Video(s)" % countdown_video, xbmc.LOGNOTICE) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items(playlist=self.playlist, items=countdown_video, path=( countdown_video_file, countdown_video_folder, )[countdown_video_type == "folder"], genre="Countdown", writer="Countdown", index=0) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert Countdown Label into Trigger List self.trigger_list.insert(0, "Countdown") # get 3D Trailers if is_3d_movie and _3d_settings["3d_trailers"]: utils.log( "Retriving 3D Trailers: %s Trailers" % _3d_settings["3d_trailer_count"], xbmc.LOGNOTICE) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _3d_trailers = _get_trailers( items=_3d_settings["3d_trailer_count"], equivalent_mpaa=equivalent_mpaa, mpaa=mpaa, genre=genre, movie=movie, mode="3D") for trailer in _3d_trailers: # get trailers _get_special_items(playlist=self.playlist, items=1, path=trailer[2], genre=trailer[9] or "3D Movie Trailer", title=trailer[1], thumbnail=trailer[3], plot=trailer[4], runtime=trailer[5], mpaa=trailer[6], release_date=trailer[7], studio=trailer[8] or "3D Movie Trailer", writer="3D Movie Trailer", director=trailer[11], index=0) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert 3D Trailer Label into Trigger List self.trigger_list.insert(0, "3D Movie Trailer") # 3D Intro Video if is_3d_movie and _3d_settings["3d_intro"]: utils.log( "Adding 3D Intro Video: %s Videos" % _3d_settings["3d_intro"], xbmc.LOGNOTICE) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items(playlist=self.playlist, items=_3d_settings["3d_intro"], path=( _3d_settings["3d_intro_file"], _3d_settings["3d_intro_folder"], )[_3d_settings["3d_intro_type"] == "folder"], genre="3D Intro", writer="3D Intro", index=0) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert 3D Intro Label into Trigger List self.trigger_list.insert(0, "3D Intro") # get trailers if trailer_settings["trailer_count"] > 0: utils.log( "Retriving Trailers: %s Trailers" % trailer_settings["trailer_count"], xbmc.LOGNOTICE) trailers = _get_trailers(items=trailer_settings["trailer_count"], equivalent_mpaa=equivalent_mpaa, mpaa=mpaa, genre=genre, movie=movie, mode="playlist") # get coming attractions outro videos if video_settings["cav_outro"] > 0: utils.log( "Adding Coming Attraction Outro Video: %s Videos" % video_settings["cav_outro"], xbmc.LOGNOTICE) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=video_settings["cav_outro"] * (len(trailers) > 0), path=( video_settings["cav_outro_file"], video_settings["cav_outro_folder"], )[video_settings["cav_outro_type"] == "folder"], genre="Coming Attractions Outro", writer="Coming Attractions Outro", index=0) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert Coming Attraction Outro Label into Trigger List self.trigger_list.insert(0, "Coming Attractions Outro") # enumerate through our list of trailers and add them to our playlist utils.log("Adding Trailers: %s Trailers" % len(trailers), xbmc.LOGNOTICE) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() for trailer in trailers: # get trailers _get_special_items(playlist=self.playlist, items=1, path=trailer[2], genre=trailer[9] or "Movie Trailer", title=trailer[1], thumbnail=trailer[3], plot=trailer[4], runtime=trailer[5], mpaa=trailer[6], release_date=trailer[7], studio=trailer[8] or "Movie Trailer", writer="Movie Trailer", director=trailer[11], index=0) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert Trailer Label into Trigger List self.trigger_list.insert(0, "Movie Trailer") # get coming attractions intro videos if video_settings["cav_intro"] > 0: utils.log( "Adding Coming Attraction Intro Videos: %s Videos" % video_settings["cav_intro"], xbmc.LOGNOTICE) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=video_settings["cav_intro"] * (len(trailers) > 0), path=( video_settings["cav_intro_file"], video_settings["cav_intro_folder"], )[video_settings["cav_intro_type"] == "folder"], thumbnail="DefaultVideo.png", genre="Coming Attractions Intro", writer="Coming Attractions Intro", index=0) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert Coming Attraction Intro Label into Trigger List self.trigger_list.insert(0, "Coming Attractions Intro") # get movie theater experience intro videos if video_settings["mte_intro"] > 0: utils.log( "Adding Movie Theatre Intro Videos: %s Videos" % video_settings["mte_intro"], xbmc.LOGNOTICE) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items(playlist=self.playlist, items=video_settings["mte_intro"], path=( video_settings["mte_intro_file"], video_settings["mte_intro_folder"], )[video_settings["mte_intro_type"] == "folder"], genre="Movie Theater Intro", writer="Movie Theater Intro", index=0) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert Movie Theatre Intro Label into Trigger List self.trigger_list.insert(0, "Movie Theater Intro") # get trivia outro video(s) if trivia_settings["trivia_mode"] != 0: utils.log( "Adding Trivia Outro Videos: %s Videos" % video_settings["trivia_outro"], xbmc.LOGNOTICE) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=video_settings["trivia_outro"], path=( video_settings["trivia_outro_file"], video_settings["trivia_outro_folder"], )[video_settings["trivia_outro_type"] == "folder"], genre="Trivia Outro", writer="Trivia Outro", index=0 #media_type="video/picture" ) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert Trivia Outro Label into Trigger List self.trigger_list.insert(0, "Trivia Outro") # get feature presentation outro videos if video_settings["fpv_outro"] > 0: utils.log( "Adding Feature Presentation Outro Videos: %s Videos" % fpv_outro, xbmc.LOGNOTICE) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=fpv_outro, path=( fpv_outro_file, fpv_outro_folder, )[fpv_outro_type == "folder"], genre="Feature Presentation Outro", writer="Feature Presentation Outro", ) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert Feature Presentation Outro Label into Trigger List self.trigger_list.append("Feature Presentation Outro") # 3D Outro Video if is_3d_movie and _3d_settings["3d_outro"]: utils.log( "Adding 3D Outro Video: %s Videos" % _3d_settings["3d_outro"], xbmc.LOGNOTICE) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=_3d_settings["3d_outro"], path=( _3d_settings["3d_outro_file"], _3d_settings["3d_outro_folder"], )[_3d_settings["3d_outro_type"] == "folder"], genre="3D Outro", writer="3D Outro", ) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert 3D Outro Label into Trigger List self.trigger_list.append("3D Outro") # get movie theater experience outro videos if video_settings["mte_outro"] > 0: utils.log( "Adding Movie Theatre Outro Videos: %s Videos" % video_settings["mte_outro"], xbmc.LOGNOTICE) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=video_settings["mte_outro"], path=( video_settings["mte_outro_file"], video_settings["mte_outro_folder"], )[video_settings["mte_outro_type"] == "folder"], genre="Movie Theatre Outro", writer="Movie Theatre Outro", ) for count in range( 0, (xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size)): # Insert Movie Theatre Outro Label into Trigger List self.trigger_list.append("Movie Theatre Outro") utils.log( "Playlist Size: %s" % xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size(), xbmc.LOGNOTICE) utils.log("Trigger List Size: %d" % len(self.trigger_list), xbmc.LOGNOTICE) return self.trigger_list
def _create_playlist( self, mpaa, audio, genre, movie, equivalent_mpaa ): # TODO: try to get a local thumb for special videos? xbmc.log( "[script.cinema.experience] - Building Cinema Experience Playlist",level=xbmc.LOGNOTICE ) # get Dolby/DTS videos xbmc.log( "[script.cinema.experience] - Adding Audio Format Video",level=xbmc.LOGNOTICE ) if ( _S_( "enable_audio" ) ) == "true" and ( _S_( "audio_videos_folder" ) ): p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=1 * ( _S_( "audio_videos_folder" ) != "" ), path=xbmc.translatePath( _S_( "audio_videos_folder" ) ) + { "dca": "DTS", "ac3": "Dolby", "dtsma": "DTSHD-MA", "dtshd_ma": "DTSHD-MA", "a_truehd": "Dolby TrueHD", "truehd": "Dolby TrueHD" }.get( audio, "Other" ) + xbmc.translatePath( _S_( "audio_videos_folder" ) )[ -1 ], genre=_L_( 32606 ), writer=_L_( 32606 ), index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Audio Format Label into Trigger List self.trigger_list.insert( 0, _L_( 32606 ) ) # Add Countdown video xbmc.log( "[script.cinema.experience] - Adding Countdown Videos: %s Video(s)" % (0, 1, 1, 2, 3, 4, 5,)[ int( _S_( "countdown_video" ) ) ], level=xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=( 0, 1, 1, 2, 3, 4, 5, )[ int( _S_( "countdown_video" ) ) ], path=( xbmc.translatePath( _S_( "countdown_video_file" ) ), xbmc.translatePath( _S_( "countdown_video_folder" ) ), )[ int( _S_( "countdown_video" ) ) > 1 ], genre=_L_( 32611 ), writer=_L_( 32611 ), index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Countdown Label into Trigger List self.trigger_list.insert( 0, _L_( 32611 ) ) # get rating video xbmc.log( "[script.cinema.experience] - Adding Ratings Video",level=xbmc.LOGNOTICE ) if ( _S_( "enable_ratings" ) ) == "true" : p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=1 * ( _S_( "rating_videos_folder" ) != "" ), path=xbmc.translatePath( _S_( "rating_videos_folder" ) ) + mpaa + ".avi", genre=_L_( 32603 ), writer=_L_( 32603 ), index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Rating Label into Trigger List self.trigger_list.insert( 0, _L_( 32603 ) ) # get feature presentation intro videos xbmc.log( "[script.cinema.experience] - Adding Feature Presentation Intro Videos: %s Videos" % (0, 1, 1, 2, 3, 4, 5,)[ int( _S_( "fpv_intro" ) ) ], level=xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=( 0, 1, 1, 2, 3, 4, 5, )[ int( _S_( "fpv_intro" ) ) ], path=( xbmc.translatePath( _S_( "fpv_intro_file" ) ), xbmc.translatePath( _S_( "fpv_intro_folder" ) ), )[ int( _S_( "fpv_intro" ) ) > 1 ], genre=_L_( 32601 ), writer=_L_( 32601 ), index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Feature Presentation Label into Trigger List self.trigger_list.insert( 0, _L_( 32601 ) ) # get trailers xbmc.log( "[script.cinema.experience] - Retriving Trailers: %s Trailers" % (0, 1, 2, 3, 4, 5, 10,)[ int( _S_( "trailer_count" ) ) ],level=xbmc.LOGNOTICE ) trailers = _get_trailers( items=( 0, 1, 2, 3, 4, 5, 10, )[ int( _S_( "trailer_count" ) ) ], mpaa=equivalent_mpaa, genre=genre, movie=movie, mode = "playlist" ) # get coming attractions outro videos xbmc.log( "[script.cinema.experience] - Adding Coming Attraction Outro Video: %s Videos" % ( 0, 1, 1, 2, 3, 4, 5, )[ int( _S_( "cav_outro" ) ) ], level=xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=( 0, 1, 1, 2, 3, 4, 5, )[ int( _S_( "cav_outro" ) ) ] * ( len( trailers ) > 0 ), path=( xbmc.translatePath( _S_( "cav_outro_file" ) ), xbmc.translatePath( _S_( "cav_outro_folder" ) ), )[ int( _S_( "cav_outro" ) ) > 1 ], genre=_L_( 32608 ), writer=_L_( 32608 ), index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Coming Attraction Outro Label into Trigger List self.trigger_list.insert( 0, _L_( 32608 ) ) # enumerate through our list of trailers and add them to our playlist xbmc.log( "[script.cinema.experience] - Adding Trailers: %s Trailers" % len( trailers ),level=xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() for trailer in trailers: # get trailers _get_special_items( playlist=self.playlist, items=1, path=trailer[ 2 ], genre=trailer[ 9 ] or _L_( 32605 ), title=trailer[ 1 ], thumbnail=trailer[ 3 ], plot=trailer[ 4 ], runtime=trailer[ 5 ], mpaa=trailer[ 6 ], release_date=trailer[ 7 ], studio=trailer[ 8 ] or _L_( 32605 ), writer= _L_( 32605 ), director=trailer[ 11 ], index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Trailer Label into Trigger List self.trigger_list.insert( 0, _L_( 32605 ) ) # get coming attractions intro videos xbmc.log( "[script.cinema.experience] - Adding Coming Attraction Intro Videos: %s Videos" % ( 0, 1, 1, 2, 3, 4, 5, )[ int( _S_( "cav_intro" ) ) ], level=xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=( 0, 1, 1, 2, 3, 4, 5, )[ int( _S_( "cav_intro" ) ) ] * ( len( trailers ) > 0 ), path=( xbmc.translatePath( _S_( "cav_intro_file" ) ), xbmc.translatePath( _S_( "cav_intro_folder" ) ), )[ int( _S_( "cav_intro" ) ) > 1 ], genre=_L_( 32600 ), writer=_L_( 32600 ), index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Coming Attraction Intro Label into Trigger List self.trigger_list.insert( 0, _L_( 32600 ) ) # get movie theater experience intro videos xbmc.log( "[script.cinema.experience] - Adding Movie Theatre Intro Videos: %s Videos" % ( 0, 1, 1, 2, 3, 4, 5, )[ int( _S_( "mte_intro" ) ) ], level=xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=( 0, 1, 1, 2, 3, 4, 5, )[ int( _S_( "mte_intro" ) ) ], path=( xbmc.translatePath( _S_( "mte_intro_file" ) ), xbmc.translatePath( _S_( "mte_intro_folder" ) ), )[ int( _S_( "mte_intro" ) ) > 1 ], genre=_L_( 32607 ), writer=_L_( 32607 ), index=0 ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Movie Theatre Intro Label into Trigger List self.trigger_list.insert( 0, _L_( 32607 ) ) # get trivia outro video(s) print _S_( "trivia_mode" ) if int( _S_( "trivia_mode" ) ) != 0: xbmc.log( "[script.cinema.experience] - Adding Trivia Outro Videos: %s Videos" % ( 0, 1, 1, 2, 3, 4, 5, )[ int( _S_( "trivia_outro" ) ) ], level=xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=( 0, 1, 1, 2, 3, 4, 5, )[ int( _S_( "trivia_outro" ) ) ], path=( xbmc.translatePath( _S_( "trivia_outro_file" ) ), xbmc.translatePath( _S_( "trivia_outro_folder" ) ), )[ int( _S_( "trivia_outro" ) ) > 1 ], genre=_L_( 32610 ), writer=_L_( 32610 ), index=0 #media_type="video/picture" ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Trivia Outro Label into Trigger List self.trigger_list.insert( 0, _L_( 32610) ) # get feature presentation outro videos xbmc.log( "[script.cinema.experience] - Adding Feature Presentation Outro Videos: %s Videos" % ( 0, 1, 1, 2, 3, 4, 5, )[ int( _S_( "fpv_outro" ) ) ], level=xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=( 0, 1, 1, 2, 3, 4, 5, )[ int( _S_( "fpv_outro" ) ) ], path=( xbmc.translatePath( _S_( "fpv_outro_file" ) ), xbmc.translatePath( _S_( "fpv_outro_folder" ) ), )[ int( _S_( "fpv_outro" ) ) > 1 ], genre=_L_( 32602 ), writer=_L_( 32602 ), ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Feature Presentation Outro Label into Trigger List self.trigger_list.append( _L_( 32602 ) ) # get movie theater experience outro videos xbmc.log( "[script.cinema.experience] - Adding Movie Theatre Outro Videos: %s Videos" % ( 0, 1, 1, 2, 3, 4, 5, )[ int( _S_( "mte_outro" ) ) ], level=xbmc.LOGNOTICE ) p_size = xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() _get_special_items( playlist=self.playlist, items=( 0, 1, 1, 2, 3, 4, 5, )[ int( _S_( "mte_outro" ) ) ], path=( xbmc.translatePath( _S_( "mte_outro_file" ) ), xbmc.translatePath( _S_( "mte_outro_folder" ) ), )[ int( _S_( "mte_outro" ) ) > 1 ], genre=_L_( 32617 ), writer=_L_( 32617 ), ) for count in range( 0, ( xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size() - p_size ) ): # Insert Movie Theatre Outro Label into Trigger List self.trigger_list.append( _L_( 32617 ) ) xbmc.log( "[script.cinema.experience] - Playlist Size: %s" % xbmc.PlayList(xbmc.PLAYLIST_VIDEO).size(), level=xbmc.LOGNOTICE ) xbmc.log( "[script.cinema.experience] - Trigger List Size: %d" % len(self.trigger_list), level=xbmc.LOGNOTICE ) return self.trigger_list