def OpenTextFile(URL='', mediaitem=CMediaItem()): textwnd = CTextView() result = textwnd.OpenDocument(URL, mediaitem) if result == 0: textwnd.doModal() #textwnd.show() else: dialog = xbmcgui.Dialog() dialog.ok("Error", "Could not open file.")
def OpenTextFile(URL='', mediaitem=CMediaItem()): #if (mediaitem.background == 'default') and (self.pl_focus.background != 'default'): # mediaitem = copy.copy(mediaitem) # mediaitem.background = self.pl_focus.background # pass textwnd = CTextView() result = textwnd.OpenDocument(URL, mediaitem) # setInfoText(visible=0) #loading text off if result == 0: textwnd.doModal() #textwnd.show() else: dialog = xbmcgui.Dialog() dialog.ok("Error", "Could not open file.")