mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
aur/pianobar to 2012.04.24-1
This commit is contained in:
parent
6b2f2d92cf
commit
e380e4a200
2 changed files with 66 additions and 5 deletions
|
@ -3,20 +3,25 @@
|
|||
plugrel=1
|
||||
|
||||
pkgname=pianobar
|
||||
pkgver=2012.01.10
|
||||
pkgver=2012.04.24
|
||||
pkgrel=2
|
||||
pkgdesc="console-based frontend for Pandora (official version)"
|
||||
url="http://6xq.net/0017"
|
||||
arch=('i686' 'x86_64')
|
||||
license=('MIT')
|
||||
depends=('libao' 'faad2' 'libmad' 'gnutls')
|
||||
source=(http://6xq.net/media/00/16/pianobar-$pkgver.tar.bz2)
|
||||
|
||||
source=(http://6xq.net/media/00/16/pianobar-$pkgver.tar.bz2
|
||||
protocol-fix.patch)
|
||||
sha256sums=('1286005b14ef58ea5b7baece054e772761e6351fdeceadd3a69e0a7c8b9bf28e'
|
||||
'39f30666783d28ccb0bdfe985738bb06c9545e6f0f42e3eba905da2d202de2f7')
|
||||
_builddir="$pkgname-$pkgver"
|
||||
|
||||
build() {
|
||||
cd "$_builddir"
|
||||
|
||||
# temporary fix from https://gist.github.com/2500616/654f1869da5698696ce60cb8a7fe3cae0f4dfd25
|
||||
patch -p 1 -i ../protocol-fix.patch
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
|
@ -26,5 +31,3 @@ package() {
|
|||
make DESTDIR=$pkgdir PREFIX=/usr install
|
||||
install -vDm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
}
|
||||
|
||||
md5sums=('448c57d65c71158674e8b30a8cfa217e')
|
||||
|
|
58
aur/pianobar/protocol-fix.patch
Normal file
58
aur/pianobar/protocol-fix.patch
Normal file
|
@ -0,0 +1,58 @@
|
|||
diff --git a/src/libpiano/piano.c b/src/libpiano/piano.c
|
||||
index 342e4ec..b70477e 100644
|
||||
--- a/src/libpiano/piano.c
|
||||
+++ b/src/libpiano/piano.c
|
||||
@@ -42,7 +42,7 @@ THE SOFTWARE.
|
||||
#include "crypt.h"
|
||||
#include "config.h"
|
||||
|
||||
-#define PIANO_PROTOCOL_VERSION "33"
|
||||
+#define PIANO_PROTOCOL_VERSION "34"
|
||||
#define PIANO_RPC_HOST "www.pandora.com"
|
||||
#define PIANO_RPC_PORT "80"
|
||||
#define PIANO_RPC_PATH "/radio/xmlrpc/v" PIANO_PROTOCOL_VERSION "?"
|
||||
@@ -272,6 +272,7 @@ PianoReturn_t PianoRequest (PianoHandle_t *ph, PianoRequest_t *req,
|
||||
"<?xml version=\"1.0\"?><methodCall>"
|
||||
"<methodName>listener.authenticateListener</methodName>"
|
||||
"<params><param><value><int>%lu</int></value></param>"
|
||||
+ "<param><value><string></string></value></param>"
|
||||
/* user */
|
||||
"<param><value><string>%s</string></value></param>"
|
||||
/* password */
|
||||
diff --git a/src/main.c b/src/main.c
|
||||
index 43f3ffc..9a637cf 100644
|
||||
--- a/src/main.c
|
||||
+++ b/src/main.c
|
||||
@@ -77,10 +77,31 @@ static bool BarMainLoginUser (BarApp_t *app) {
|
||||
WaitressReturn_t wRet;
|
||||
PianoRequestDataLogin_t reqData;
|
||||
bool ret;
|
||||
+ WaitressHandle_t waithSync;
|
||||
+ char *syncTime;
|
||||
+ unsigned long int syncTimeInt;
|
||||
+
|
||||
+ /* skip sync step by fetching time from somewhere else */
|
||||
+ WaitressInit (&waithSync);
|
||||
+ WaitressSetUrl (&waithSync, "http://ridetheclown.com/s2/synctime.php");
|
||||
+ if (app->settings.proxy != NULL && strlen (app->settings.proxy) > 0) {
|
||||
+ WaitressSetProxy (&waithSync, app->settings.proxy);
|
||||
+ }
|
||||
+ wRet = WaitressFetchBuf (&waithSync, &syncTime);
|
||||
+ WaitressFree (&waithSync);
|
||||
+ if (wRet != WAITRESS_RET_OK) {
|
||||
+ BarUiMsg (&app->settings, MSG_ERR, "Unable to sync: %s\n",
|
||||
+ WaitressErrorToStr (wRet));
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ syncTimeInt = strtoul (syncTime, NULL, 0);
|
||||
+ app->ph.timeOffset = time (NULL) - syncTimeInt;
|
||||
+ free (syncTime);
|
||||
|
||||
reqData.user = app->settings.username;
|
||||
reqData.password = app->settings.password;
|
||||
- reqData.step = 0;
|
||||
+ reqData.step = 1;
|
||||
|
||||
BarUiMsg (&app->settings, MSG_INFO, "Login... ");
|
||||
ret = BarUiPianoCall (app, PIANO_REQUEST_LOGIN, &reqData, &pRet, &wRet);
|
Loading…
Reference in a new issue