#NEWLINE# def getVideoInfo( self , content , name , year , imdb , tvdb ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# self . loadingTime = time . time ( ) #NEWLINE# self . totalTime = 0 #NEWLINE# self . currentTime = 0 #NEWLINE# self . folderPath = control . infoLabel ( 'Container.FolderPath' ) #NEWLINE# self . name = name #NEWLINE# self . year = year #NEWLINE# self . content = content #NEWLINE# self . file = ( self . name + '.strm' ) #NEWLINE# self . file = self . file . translate ( None , '\\/:*?"<>|' ) . strip ( '.' ) #NEWLINE# self . imdb = ( ( 'tt' + imdb ) if imdb . isdigit ( ) else imdb ) #NEWLINE# self . tvdb = ( tvdb if ( not ( tvdb == None ) ) else '0' ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# if ( self . content == 'movie' ) : #NEWLINE# #INDENT# self . title = re . compile ( '(.+?) [(]\\d{4}[)]$' ) . findall ( self . name ) [ 0 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . content == 'episode' ) : #NEWLINE# #INDENT# ( self . tvshowtitle , self . season , self . episode ) = re . compile ( '(.+?) S(\\d*)E(\\d*)$' ) . findall ( self . name ) [ 0 ] #NEWLINE# ( self . season , self . episode ) = ( ( '%01d' % int ( self . season ) ) , ( '%01d' % int ( self . episode ) ) ) #NEWLINE# self . file2 = ( '%s (%s) S%02dE%02d.strm' % ( self . tvshowtitle . translate ( None , '\\/:*?"<>|' ) , self . year , int ( self . season ) , int ( self . episode ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# except : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# if ( control . setting ( 'resume_playback' ) == 'true' ) : #NEWLINE# #INDENT# self . offset = bookmarks . getBookmark ( self . name , self . imdb ) #NEWLINE# if ( self . offset == '0' ) : #NEWLINE# #INDENT# raise Exception ( ) #NEWLINE# #UNINDENT# ( minutes , seconds ) = divmod ( float ( self . offset ) , 60 ) #NEWLINE# ( hours , minutes ) = divmod ( minutes , 60 ) #NEWLINE# yes = control . yesnoDialog ( ( '%s %02d:%02d:%02d' % ( control . lang ( 30461 ) . encode ( 'utf-8' ) , hours , minutes , seconds ) ) , '' , '' , self . name , control . lang ( 30463 ) . encode ( 'utf-8' ) , control . lang ( 30462 ) . encode ( 'utf-8' ) ) #NEWLINE# if yes : #NEWLINE# #INDENT# self . offset = '0' #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# except : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# if ( self . content == 'movie' ) : #NEWLINE# #INDENT# control . window . setProperty ( 'script.trakt.ids' , json . dumps ( { #NEWLINE# #INDENT# 'imdb' : self . imdb , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . content == 'episode' ) : #NEWLINE# #INDENT# control . window . setProperty ( 'script.trakt.ids' , json . dumps ( { #NEWLINE# #INDENT# 'tvdb' : self . tvdb , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# except : #NEWLINE# #INDENT# pass