コード例 #1
0
ファイル: video_player.py プロジェクト: OpenELEQ/meta4kodi
 def onPlayBackStopped(self):
     clear_property('script.trakt.ids')
     clear_property('data')
     
     if self.totalTime > 0 and self.currentTime / self.totalTime >= .9:
         self.mark_as_watched()
     self.reset()
コード例 #2
0
ファイル: video_player.py プロジェクト: staycanuca/meta4kodi
    def onPlayBackStopped(self):
        clear_property('script.trakt.ids')
        clear_property('data')

        if self.totalTime > 0 and self.currentTime / self.totalTime >= .9:
            self.mark_as_watched()
        self.reset()
コード例 #3
0
ファイル: service.py プロジェクト: krzysztofuu/Bonitillonew
 def onDatabaseUpdated(self, database):
     if database == "video":
         if get_property("clean_library"):
             xbmc.executebuiltin("XBMC.CleanLibrary(video, false)")
             clear_property("clean_library")
     if database == "music":
         # need to manualy change the database file to add strm files to it
         music_directory = plugin.get_setting(SETTING_MUSIC_LIBRARY_FOLDER, unicode)
         self.add_folder_to_music_database(music_directory)
コード例 #4
0
ファイル: service.py プロジェクト: vphuc81/MyRepository
 def onDatabaseUpdated(self, database):
     if database == "video":
         if get_property("clean_library"):
             xbmc.executebuiltin("XBMC.CleanLibrary(video, false)")
             clear_property("clean_library")
     if database == "music":
         # need to manualy change the database file to add strm files to it
         music_directory = plugin.get_setting(SETTING_MUSIC_LIBRARY_FOLDER, unicode)
         self.add_folder_to_music_database(music_directory)
コード例 #5
0
ファイル: default.py プロジェクト: krzysztofuu/Bonitillonew
def update_library():
    is_updating = get_property("updating_library")
    now = time.time()
    if is_updating and now - int(is_updating) < 120:
        plugin.log.debug("Skipping library update")
        return
    if plugin.get_setting(SETTING_LIBRARY_UPDATES, bool) == True:
        try:
            set_property("updating_library", int(now))
            meta.library.tvshows.update_library()
            meta.library.movies.update_library()
            meta.library.music.update_library()
        finally: clear_property("updating_library")
    else: clear_property("updating_library")
コード例 #6
0
ファイル: addon.py プロジェクト: OpenELEQ/testing.meta.more
def update_library():
    is_updating = get_property("updating_library")
    
    now = time.time()
    if is_updating and now - int(is_updating) < 120:
        plugin.log.debug("Skipping library update")
        return
        
    try:
        set_property("updating_library", int(now))
        meta.library.tvshows.update_library()
        meta.library.movies.update_library()
    finally:
        clear_property("updating_library")
コード例 #7
0
ファイル: default.py プロジェクト: vphuc81/MyRepository
def update_library():
    is_updating = get_property("updating_library")
    is_syncing = get_property("syncing_library")
    now = time.time()
    if is_syncing and now - int(is_syncing) < plugin.get_setting(SETTING_UPDATE_LIBRARY_INTERVAL, int) * 60:
        plugin.log.info("Skipping library sync")
    else:
        if plugin.get_setting(SETTING_LIBRARY_SYNC_COLLECTION, bool) == True or plugin.get_setting(
                SETTING_LIBRARY_SYNC_WATCHLIST, bool) == True:
            try:
                set_property("syncing_library", int(now))
                if plugin.get_setting(SETTING_LIBRARY_SYNC_COLLECTION, bool) == True:
                    meta.library.tvshows.sync_trakt_collection()
                    meta.library.movies.sync_trakt_collection()
                if plugin.get_setting(SETTING_LIBRARY_SYNC_WATCHLIST, bool) == True:
                    meta.library.tvshows.sync_trakt_watchlist()
                    meta.library.movies.sync_trakt_watchlist()
            except: plugin.log.info("something went wrong")
            finally: clear_property("syncing_library")
        else: clear_property("syncing_library")
    if is_updating and now - int(is_updating) < 120:
        plugin.log.debug("Skipping library update")
        return
    if plugin.get_setting(SETTING_LIBRARY_UPDATES, bool) == True:
        try:
            set_property("updating_library", int(now))
            meta.library.tvshows.update_library()
            meta.library.movies.update_library()
            meta.library.music.update_library()
        finally: clear_property("updating_library")
    else: clear_property("updating_library")
コード例 #8
0
def update_library():
    is_updating = get_property("updating_library")

    now = time.time()
    if is_updating and now - int(is_updating) < 120:
        plugin.log.debug("Skipping library update")
        return

    try:
        set_property("updating_library", int(now))
        meta.library.tvshows.update_library()
        meta.library.movies.update_library()
    finally:
        clear_property("updating_library")
コード例 #9
0
def update_library():
    is_updating = get_property("updating_library")
    now = time.time()
    if is_updating and now - int(is_updating) < 120:
        plugin.log.debug("Skipping library update")
        return
    if plugin.get_setting(SETTING_LIBRARY_UPDATES, converter=bool) == True:
        #plugin.notify(msg=_('Library'), title=_('Updating'), delay=5000, image=get_icon_path("metalliq"))
        try:
            set_property("updating_library", int(now))
            meta.library.tvshows.update_library()
            meta.library.movies.update_library()
            meta.library.music.update_library()
        finally:
            clear_property("updating_library")
    else:
        #plugin.notify(msg=_('Library'), title=_('Not updating'), delay=5000, image=get_icon_path("metalliq"))
        clear_property("updating_library")
コード例 #10
0
ファイル: addon.py プロジェクト: noobsandnerds/noobsandnerds
def update_library():
    is_updating = get_property("updating_library")
    now = time.time()
    if is_updating and now - int(is_updating) < 120:
        plugin.log.debug("Skipping library update")
        return
    if plugin.get_setting(SETTING_LIBRARY_UPDATES, converter=bool) == True:
        # plugin.notify(msg=_('Library'), title=_('Updating'), delay=5000, image=get_icon_path("metalliq"))
        try:
            set_property("updating_library", int(now))
            meta.library.tvshows.update_library()
            meta.library.movies.update_library()
            meta.library.music.update_library()
        finally:
            clear_property("updating_library")
    else:
        # plugin.notify(msg=_('Library'), title=_('Not updating'), delay=5000, image=get_icon_path("metalliq"))
        clear_property("updating_library")
コード例 #11
0
ファイル: default.py プロジェクト: vanhung1710/MyRepository
def update_library():
    is_updating = get_property("updating_library")
    is_syncing = get_property("syncing_library")
    now = time.time()
    if is_syncing and now - int(is_syncing) < plugin.get_setting(
            SETTING_UPDATE_LIBRARY_INTERVAL, int) * 60:
        plugin.log.info("Skipping library sync")
    else:
        if plugin.get_setting(SETTING_LIBRARY_SYNC_COLLECTION,
                              bool) == True or plugin.get_setting(
                                  SETTING_LIBRARY_SYNC_WATCHLIST,
                                  bool) == True:
            try:
                set_property("syncing_library", int(now))
                if plugin.get_setting(SETTING_LIBRARY_SYNC_COLLECTION,
                                      bool) == True:
                    meta.library.tvshows.sync_trakt_collection()
                    meta.library.movies.sync_trakt_collection()
                if plugin.get_setting(SETTING_LIBRARY_SYNC_WATCHLIST,
                                      bool) == True:
                    meta.library.tvshows.sync_trakt_watchlist()
                    meta.library.movies.sync_trakt_watchlist()
            except:
                plugin.log.info("something went wrong")
            finally:
                clear_property("syncing_library")
        else:
            clear_property("syncing_library")
    if is_updating and now - int(is_updating) < 120:
        plugin.log.debug("Skipping library update")
        return
    if plugin.get_setting(SETTING_LIBRARY_UPDATES, bool) == True:
        try:
            set_property("updating_library", int(now))
            meta.library.tvshows.update_library()
            meta.library.movies.update_library()
            meta.library.music.update_library()
        finally:
            clear_property("updating_library")
    else:
        clear_property("updating_library")
コード例 #12
0
ファイル: video_player.py プロジェクト: vphuc81/MyRepository
 def onPlayBackEnded(self):
     clear_property('script.trakt.ids')
     clear_property('data')
     self.mark_as_watched()
     self.reset()
コード例 #13
0
 def onPlayBackEnded(self):
     clear_property('script.trakt.ids')
     clear_property('data')
     self.mark_as_watched()
     self.reset()
コード例 #14
0
 def onDatabaseUpdated(self, database):
     if database == "video":
         if get_property("clean_library"):
             xbmc.executebuiltin("XBMC.CleanLibrary(video, false)")
             clear_property("clean_library")
コード例 #15
0
 def onDatabaseUpdated(self, database):
     if database == "video":
         if get_property("clean_library"):
             xbmc.executebuiltin("XBMC.CleanLibrary(video, false)")
             clear_property("clean_library")