Ejemplo n.º 1
0
 def onInit(self):
     log('script.onInit started')
     self.show_info = True
     self.aspect_keep = True
     self.last_seen_album_id = 0
     if Addon.getSetting('show_arrows') == 'false':
         self.getControl(self.CONTROL_ARROWS).setVisible(False)
     if Addon.getSetting('aspect_ratio2') == '0':
         self.getControl(self.CONTROL_ASPECT_KEEP).setVisible(False)
     self.showHelp()
     self.showAlbums()
     self.setFocus(self.getControl(self.CONTROL_MAIN_IMAGE))
     log('script.onInit finished')
Ejemplo n.º 2
0
 def download_album(self):
     log('script.download_album started')
     download_path = Addon.getSetting('download_path')
     if not download_path:
         s = Addon.getLocalizedString(32300)  # Choose default download path
         new_path = xbmcgui.Dialog().browse(3, s, 'pictures')
         if not new_path:
             return
         else:
             download_path = new_path
             Addon.setSetting('download_path', download_path)
     log('script.download_album using download_path="%s"' % download_path)
     album_url = self.getProperty('album_url')
     items = self.ScraperManager.get_photos(album_url)
     downloader.Downloader(items, download_path)
     log('script.download_album finished')
Ejemplo n.º 3
0
 def startSlideshow(self):
     log('script.startSlideshow started')
     params = {}
     params['scraper_id'] = self.ScraperManager.scraper_id
     params['mode'] = 'photos'
     params['album_url'] = self.getProperty('album_url')
     if Addon.getSetting('random_slideshow') == 'true':
         random = 'random'
     else:
         random = 'notrandom'
     url = 'plugin://%s/?%s' % (Addon.getAddonInfo('id'),
                                urllib.urlencode(params))
     log('script.startSlideshow using url=%s' % url)
     xbmc.executebuiltin('Slideshow(%s, recursive, %s)'
                         % (url, random))
     log('script.startSlideshow finished')
Ejemplo n.º 4
0
 def showHelp(self):
     if not Addon.getSetting('dont_show_help') == 'true':
         Addon.openSettings()