Skip to content

Commit

Permalink
workaround for 12b3 xbmc log issue - this DISABLES spotimc loggin but…
Browse files Browse the repository at this point in the history
… at least it runs
  • Loading branch information
kib committed Dec 13, 2012
1 parent 160a8f0 commit 7bdb7bb
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 23 deletions.
39 changes: 22 additions & 17 deletions resources/libs/spotimcgui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

__all__ = ["mainwindow"]


global kibistesting

import os
import os.path
Expand Down Expand Up @@ -86,8 +86,8 @@ def __init__(self, mainloop, audio_buffer, app):

def logged_in(self, session, error_num):
#Log this event
xbmc.log("libspotify: logged in: %d" % error_num)
#xbmc.log("libspotify: logged in: %d" % error_num)

#Store last error code
self.__app.set_var('login_last_error', error_num)

Expand All @@ -104,21 +104,25 @@ def logged_in(self, session, error_num):


def logged_out(self, session):
xbmc.log("libspotify: logged out")
#xbmc.log("libspotify: logged out")
self.__app.get_var('logout_event').set()

def connection_error(self, session, error):
xbmc.log("libspotify: conn error: %d" % error)

#xbmc.log("libspotify: conn error: %d" % error)
kibistesting=True

def message_to_user(self, session, data):
xbmc.log("libspotify: msg: %s" % data)

#xbmc.log("libspotify: msg: %s" % data)
kibistesting=True

def log_message(self, session, data):
xbmc.log("libspotify log: %s" % data)

#xbmc.log("libspotify log: %s" % data)
kibistesting=True

def streaming_error(self, session, error):
xbmc.log("libspotify: streaming error: %d" % error)

#xbmc.log("libspotify: streaming error: %d" % error)
kibistesting=True

def play_token_lost(self, session):
xbmc.executebuiltin('playercontrol(stop)')
dlg = xbmcgui.Dialog()
Expand Down Expand Up @@ -197,11 +201,12 @@ def get_audio_buffer_size():
buffer_size += int(value)

except:
xbmc.log(
'Failed reading crossfade setting. Using default value.',
xbmc.LOGERROR
)

#xbmc.log(
# 'Failed reading crossfade setting. Using default value.',
# xbmc.LOGERROR
#)
kibistesting=True

return buffer_size


Expand Down
8 changes: 4 additions & 4 deletions resources/libs/spotimcgui/playback.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ def get_shuffle_status(self):
return value == 'true'

except:
xbmc.log(
'Failed reading shuffle setting.',
xbmc.LOGERROR
)
#xbmc.log(
# 'Failed reading shuffle setting.',
# xbmc.LOGERROR
#)
return False


Expand Down
5 changes: 3 additions & 2 deletions resources/libs/spotimcgui/views/playlists/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,9 @@ def _load_container(self):
#Check and print errors for not loaded playlists
for idx, item in enumerate(self.__playlists):
if item is not None and item.has_errors():
xbmc.log('Playlist #%s failed loading.' % idx, xbmc.LOGERROR)

#xbmc.log('Playlist #%s failed loading.' % idx, xbmc.LOGERROR)
kibistesting=True

#Finally tell the gui we are done
xbmc.executebuiltin("Action(Noop)")

Expand Down

0 comments on commit 7bdb7bb

Please sign in to comment.