Remove some logging.
authorstephendenham <stephendenham@2dec19e3-eb1d-4749-8193-008c8bba0994>
Sat, 13 Nov 2010 14:04:51 +0000 (14:04 +0000)
committerstephendenham <stephendenham@2dec19e3-eb1d-4749-8193-008c8bba0994>
Sat, 13 Nov 2010 14:04:51 +0000 (14:04 +0000)
git-svn-id: svn://svn.code.sf.net/p/xbmc-groove/code@3 2dec19e3-eb1d-4749-8193-008c8bba0994

.project [new file with mode: 0644]
default.py

diff --git a/.project b/.project
new file mode 100644 (file)
index 0000000..94895e7
--- /dev/null
+++ b/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>xbmc-groove</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.python.pydev.PyDevBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.python.pydev.pythonNature</nature>
+       </natures>
+</projectDescription>
index 3165eed..2faa23b 100644 (file)
@@ -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)