Пример #1
0
 def run(self):
     while not xbmc.abortRequested and not self.sourceInitializedHandler.isClosing:
         try:
             source = src.instantiateSource(ADDON)
             xbmc.log("[script.tvguide] Using source: %s" % str(type(source)), xbmc.LOGDEBUG)
             self.sourceInitializedHandler.onSourceInitialized(source)
             break
         except src.SourceUpdateInProgressException, ex:
             xbmc.log('[script.tvguide] database update in progress...: %s' % str(ex), xbmc.LOGDEBUG)
             xbmc.sleep(1000)
Пример #2
0
#
#  This Program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this Program; see the file LICENSE.txt.  If not, write to
#  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#  http://www.gnu.org/copyleft/gpl.html
#
import xbmcaddon
import notification
import xbmc
import source as src

try:
    ADDON = xbmcaddon.Addon(id = 'script.tvguide')
    source = src.instantiateSource(ADDON)
    if ADDON.getSetting('cache.data.on.xbmc.startup') == 'true':
        channelList = None
        if source._isChannelListCacheExpired():
            channelList = source.updateChannelAndProgramListCaches()

    if ADDON.getSetting('notifications.enabled') == 'true':
        n = notification.Notification(source, ADDON.getAddonInfo('path'))
        n.scheduleNotifications()

except Exception, ex:
    xbmc.log('[script.tvguide] Uncaugt exception in service.py: %s' % str(ex) , xbmc.LOGDEBUG)
Пример #3
0
#  This Program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this Program; see the file LICENSE.txt.  If not, write to
#  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#  http://www.gnu.org/copyleft/gpl.html
#
import xbmcaddon
import notification
import xbmc
import source as src

try:
    ADDON = xbmcaddon.Addon(id='script.tvguide')
    source = src.instantiateSource(ADDON)
    if ADDON.getSetting('cache.data.on.xbmc.startup') == 'true':
        channelList = None
        if source._isChannelListCacheExpired():
            channelList = source.updateChannelAndProgramListCaches()

    if ADDON.getSetting('notifications.enabled') == 'true':
        n = notification.Notification(source, ADDON.getAddonInfo('path'))
        n.scheduleNotifications()

except Exception, ex:
    xbmc.log('[script.tvguide] Uncaugt exception in service.py: %s' % str(ex),
             xbmc.LOGDEBUG)