From: stephendenham Date: Sat, 13 Nov 2010 14:04:51 +0000 (+0000) Subject: Remove some logging. X-Git-Url: https://git.hcoop.net/clinton/xbmc-groove.git/commitdiff_plain/9b1d8c96efe57fcf10c8290825b26fc302a7f666 Remove some logging. git-svn-id: svn://svn.code.sf.net/p/xbmc-groove/code@3 2dec19e3-eb1d-4749-8193-008c8bba0994 --- diff --git a/.project b/.project new file mode 100644 index 0000000..94895e7 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + xbmc-groove + + + + + + org.python.pydev.PyDevBuilder + + + + + + org.python.pydev.pythonNature + + diff --git a/default.py b/default.py index 3165eed..2faa23b 100644 --- a/default.py +++ b/default.py @@ -31,7 +31,7 @@ lastID = 0 resDir = xbmc.translatePath(os.path.join(os.getcwd(), 'resources')) libDir = xbmc.translatePath(os.path.join(resDir, 'lib')) imgDir = xbmc.translatePath(os.path.join(resDir, 'img')) -thumbDir = os.path.join('special://masterprofile/plugin_data/music', os.path.join(os.path.basename(os.getcwd()), 'thumb')) +thumbDir = os.path.join('special://masterprofile/plugin_data/music', os.path.basename(os.getcwd())) sys.path.append (libDir) from GrooveAPI import * @@ -64,8 +64,6 @@ class Groveshark: # Setup groovesharkApi.setRemoveDuplicates(True) - if not os.path.exists(xbmc.translatePath(thumbDir)): - os.makedirs(xbmc.translatePath(thumbDir)) self._addDir('Search songs', '', MODE_SEARCH_SONGS, self.songImg, 0) self._addDir('Search albums', '', MODE_SEARCH_ALBUMS, self.albumImg, 0) @@ -175,7 +173,7 @@ class Groveshark: dialog.ok('Grooveshark', 'You must be logged in', 'to get playlists.') def playSong(self, url, name, album, artist, duration, thumb, image): - xbmc.log("Playing: " + url + ", image " + image) + xbmc.log("Playing: " + url) songItem = xbmcgui.ListItem(label = name, path=url, thumbnailImage=thumb, iconImage=image) songItem.setInfo( type="Music", infoLabels={ "title": name, "duration": duration, "album": album, "artist": artist} ) songItem.setProperty('mimetype', 'audio/mpeg') @@ -221,7 +219,6 @@ class Groveshark: songThumb = song[8] songImage = song[9] songUrl = groovesharkApi.getStreamURL(songID) - xbmc.log(songName + ", " + songArtist + ", " + songAlbum) self._addSong(songID, songName, songUrl, songDuration, songAlbum, songArtist, songThumb, songImage) i = i + 1 xbmcplugin.setContent(self._handle, 'songs') @@ -235,7 +232,6 @@ class Groveshark: albumName = album[2] albumID = album[3] albumImage = album[4] - xbmc.log(albumName) self._addDir(albumName + " - " + albumArtistName, '', MODE_ALBUM, albumImage, albumID) i = i + 1 xbmcplugin.setContent(self._handle, 'albums') @@ -248,7 +244,6 @@ class Groveshark: artist = artists[i] artistName = artist[0] artistID = artist[1] - xbmc.log(artistName) self._addDir(artistName, '', MODE_ARTIST, self.artistImg, artistID) i = i + 1 xbmcplugin.setContent(self._handle, 'artists') @@ -261,7 +256,6 @@ class Groveshark: playlist = playlists[i] playlistName = playlist[0] playlistID = playlist[1] - xbmc.log(playlistName) self._addDir(playlistName, '', MODE_PLAYLIST, self.playlistImg, playlistID, ) i = i + 1 xbmcplugin.setContent(self._handle, 'files') @@ -280,7 +274,6 @@ class Groveshark: +"&duration="+str(songduration) \ +"&thumb="+urllib.quote_plus(songThm) \ +"&image="+urllib.quote_plus(songImg) - xbmc.log("Artist is " + songartist + ", " + songThm + ", " + songThm) songItem = xbmcgui.ListItem(label = songartist + " - " + songalbum + " - " + songname, iconImage=songImg, thumbnailImage=songThm, path=songurl) songItem.setInfo( type="Music", infoLabels={ "title": songname, "duration": songduration, "album": songalbum, "artist": songartist} ) fav=sys.argv[0]+"?url="+urllib.quote_plus(songurl)+"&mode="+str(MODE_FAVORITE)+"&name="+urllib.quote_plus(songname)+"&id="+str(songid)