svn commit: r326929 - in head/multimedia/spotify-websocket-api: . files

Rene Ladan rene at FreeBSD.org
Tue Sep 10 20:17:13 UTC 2013


Author: rene
Date: Tue Sep 10 20:17:11 2013
New Revision: 326929
URL: http://svnweb.freebsd.org/changeset/ports/326929

Log:
  Fix some crashes:
  - when entering the 'album' or 'artist' command without a parameter
  - after displaying the root playlist with 'list'
  
  Bump PORTREVISION

Added:
  head/multimedia/spotify-websocket-api/files/patch-spotify_web__friendly.py   (contents, props changed)
Modified:
  head/multimedia/spotify-websocket-api/Makefile
  head/multimedia/spotify-websocket-api/files/patch-clients__respotify__respotify.py

Modified: head/multimedia/spotify-websocket-api/Makefile
==============================================================================
--- head/multimedia/spotify-websocket-api/Makefile	Tue Sep 10 20:13:26 2013	(r326928)
+++ head/multimedia/spotify-websocket-api/Makefile	Tue Sep 10 20:17:11 2013	(r326929)
@@ -3,7 +3,7 @@
 
 PORTNAME=	SpotifyWebsocketAPI
 PORTVERSION=	0.2
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	multimedia python
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 

Modified: head/multimedia/spotify-websocket-api/files/patch-clients__respotify__respotify.py
==============================================================================
--- head/multimedia/spotify-websocket-api/files/patch-clients__respotify__respotify.py	Tue Sep 10 20:13:26 2013	(r326928)
+++ head/multimedia/spotify-websocket-api/files/patch-clients__respotify__respotify.py	Tue Sep 10 20:17:11 2013	(r326929)
@@ -1,6 +1,37 @@
---- clients/respotify/respotify.py.orig	2013-08-08 20:18:57.000000000 +0200
-+++ clients/respotify/respotify.py	2013-08-09 00:15:15.000000000 +0200
-@@ -278,7 +278,7 @@
+--- ./clients/respotify/respotify.py.orig	2013-09-10 22:10:39.000000000 +0200
++++ ./clients/respotify/respotify.py	2013-09-10 22:11:58.000000000 +0200
+@@ -88,8 +88,10 @@
+         print "Playlists\n"
+         index = 1
+         for playlist in rootlist:
+-            print " ["+str(index)+"] "+playlist.getName()
+-            index += 1
++            name = playlist.getName()
++            if name != None:
++                print " ["+str(index)+"] "+name
++                index += 1
+     else:
+         try:
+             if len(rootlist) >= int(args[0][0]):
+@@ -115,7 +117,7 @@
+ 
+ 
+ def command_album(*args):
+-    if args[0][0] == "" or current_playlist is None:
++    if len(*args) == 0 or args[0][0] == "" or current_playlist is None:
+         return
+ 
+     index = int(args[0][0])-1
+@@ -127,7 +129,7 @@
+ 
+ 
+ def command_artist(*args):
+-    if args[0][0] == "" or current_playlist is None:
++    if len(*args) == 0 or args[0][0] == "" or current_playlist is None:
+         return
+ 
+     index = int(args[0][0])-1
+@@ -278,7 +280,7 @@
      if spotify.logged_in():
          os.system("kill `pgrep -f respotify-helper` &> /dev/null")
          uri_resolver = subprocess.Popen([sys.executable, "respotify-helper.py",

Added: head/multimedia/spotify-websocket-api/files/patch-spotify_web__friendly.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/spotify-websocket-api/files/patch-spotify_web__friendly.py	Tue Sep 10 20:17:11 2013	(r326929)
@@ -0,0 +1,20 @@
+--- ./spotify_web/friendly.py.orig	2013-08-08 08:45:21.000000000 +0200
++++ ./spotify_web/friendly.py	2013-09-10 22:11:07.000000000 +0200
+@@ -244,6 +244,8 @@
+         uri_parts = self.uri.split(":")
+         if len(uri_parts) == 4:
+             return uri_parts[3]
++        elif len(uri_parts) == 3:
++            return None
+         else:
+             return uri_parts[4]
+ 
+@@ -251,7 +253,7 @@
+         return self.uri
+ 
+     def getName(self):
+-        return "Starred" if self.getID() == "starred" else self.obj.attributes.name
++        return "Starred" if self.getID() == "starred" else (None if self.obj == False else self.obj.attributes.name)
+ 
+     def rename(self, name):
+         ret = self.spotify.api.rename_playlist(self.getURI(), name)


More information about the svn-ports-all mailing list