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. If not, see <http://www.gnu.org/licenses/>. """ import xbmc from common import kodi, log_utils import api, utils, cache from constants import Keys, LINE_LENGTH from converter import JsonListItemConverter ID = kodi.get_id() monitor = xbmc.Monitor() converter = JsonListItemConverter(LINE_LENGTH) class TwitchPlayer(xbmc.Player): window = kodi.Window(10000) player_keys = {'twitch_playing': ID + '-twitch_playing'} seek_keys = { 'seek_time': ID + '-seek_time', } reconnect_keys = {'stream': ID + '-livestream'} def __init__(self, *args, **kwargs): log_utils.log('Player: Start', log_utils.LOGDEBUG) self.reset()
def get_refresh_stamp(): window = kodi.Window(10000) return window.getProperty(key='%s-lpr_stamp' % kodi.get_id())
def set_refresh_stamp(): window = kodi.Window(10000) window.setProperty(key='%s-lpr_stamp' % kodi.get_id(), value=str(datetime.now()))
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. If not, see <http://www.gnu.org/licenses/>. """ import xbmc from common import kodi, log_utils import api, utils, cache from constants import Keys, LINE_LENGTH from converter import JsonListItemConverter ID = kodi.get_id() monitor = xbmc.Monitor() converter = JsonListItemConverter(LINE_LENGTH) class TwitchPlayer(xbmc.Player): window = kodi.Window(10000) player_keys = { 'twitch_playing': ID + '-twitch_playing' } seek_keys = { 'seek_time': ID + '-seek_time', } reconnect_keys = { 'stream': ID + '-livestream' }