summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin MacMartin2018-10-02 18:00:03 -0400
committerKevin MacMartin2018-10-02 18:00:03 -0400
commit2f4424acd6fe045c34eb1d8e9b555cc9881e815d (patch)
tree029da2bb091accfbef6125ac17f55fdd5366c76c
downloadaur-soundnode-youtube-dl.tar.gz
Initial commit for version 7.0.0
-rw-r--r--.SRCINFO36
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD58
-rw-r--r--electron-packager-version.patch13
-rw-r--r--soundnode.desktop8
-rw-r--r--youtube-dl.patch13
6 files changed, 132 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..d8288d38138
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,36 @@
+# Generated by mksrcinfo v8
+# Tue Oct 2 21:52:18 UTC 2018
+pkgbase = soundnode-youtube-dl
+ pkgdesc = Soundcloud for desktop with youtube-dl patch to bypass API rate limit
+ pkgver = 7.0.0
+ pkgrel = 1
+ url = http://www.soundnodeapp.com
+ arch = armv6h
+ arch = armv7h
+ arch = arm
+ arch = i686
+ arch = x86_64
+ license = GPL3
+ makedepends = npm
+ depends = alsa-lib
+ depends = gconf
+ depends = gtk2
+ depends = libxss
+ depends = libxtst
+ depends = nodejs
+ depends = nss
+ depends = youtube-dl
+ provides = soundnode
+ conflicts = soundnode
+ replaces = soundnode
+ source = https://github.com/Soundnode/soundnode-app/archive/7.0.0.tar.gz
+ source = soundnode.desktop
+ source = electron-packager-version.patch
+ source = youtube-dl.patch
+ sha512sums = d9d0512d04ccd3e18895124b8c04c966700e8db95108dcd03097c1209973bcaaa15a1d819590f530a4371ab0ee0591ae1f034a620f07502f75e430969405ad06
+ sha512sums = b9d090df430b9b756a980523460869fe3da4370cdcc7be3d33c61f05f2e223765c10e3e25e075af9f6a1cfb229a054888844ff87a1fe5bf36563305882b56ac5
+ sha512sums = eebc09d4e5be363ea17c1d0f270f5cea6ba7bed3dae58ce5b6093916b6e40746f03b545555dc14c98e4d1d151321905b1ae44c238c6c35e036e6ef01f41e7b70
+ sha512sums = 344dbf93e5280f72763a1cc5c3bb5f401ce5e0a741642f0f7b801819844dd89300569e1ea65e404e3984e3c96ef2be2fc2dd78698aec816b0680e9f676424d6c
+
+pkgname = soundnode-youtube-dl
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..854d20d8b01
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*.pkg.tar.xz
+*.tar.gz
+pkg
+src
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..6ee29eea9a2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,58 @@
+# Maintainer: Kevin MacMartin <prurigro@gmail.com>
+
+_pkgname=soundnode
+pkgname=$_pkgname-youtube-dl
+pkgver=7.0.0
+pkgrel=1
+pkgdesc='Soundcloud for desktop with youtube-dl patch to bypass API rate limit'
+url='http://www.soundnodeapp.com'
+license=('GPL3')
+arch=('armv6h' 'armv7h' 'arm' 'i686' 'x86_64')
+depends=('alsa-lib' 'gconf' 'gtk2' 'libxss' 'libxtst' 'nodejs' 'nss' 'youtube-dl')
+makedepends=('npm')
+provides=("$_pkgname")
+conflicts=("$_pkgname")
+replaces=("$_pkgname")
+_install_dir=/usr/lib/$_pkgname
+
+source=(
+ "https://github.com/Soundnode/soundnode-app/archive/$pkgver.tar.gz"
+ "$_pkgname.desktop"
+ 'electron-packager-version.patch'
+ 'youtube-dl.patch'
+)
+
+sha512sums=(
+ 'd9d0512d04ccd3e18895124b8c04c966700e8db95108dcd03097c1209973bcaaa15a1d819590f530a4371ab0ee0591ae1f034a620f07502f75e430969405ad06'
+ 'b9d090df430b9b756a980523460869fe3da4370cdcc7be3d33c61f05f2e223765c10e3e25e075af9f6a1cfb229a054888844ff87a1fe5bf36563305882b56ac5'
+ 'eebc09d4e5be363ea17c1d0f270f5cea6ba7bed3dae58ce5b6093916b6e40746f03b545555dc14c98e4d1d151321905b1ae44c238c6c35e036e6ef01f41e7b70'
+ '344dbf93e5280f72763a1cc5c3bb5f401ce5e0a741642f0f7b801819844dd89300569e1ea65e404e3984e3c96ef2be2fc2dd78698aec816b0680e9f676424d6c'
+)
+
+prepare() {
+ cd $_pkgname-app-$pkgver
+ patch -p1 < ../electron-packager-version.patch # doesn't build with the latest version of node unless we update electron-packager
+ patch -p1 < ../youtube-dl.patch # from https://github.com/Soundnode/soundnode-app/pull/1029
+}
+
+build() {
+ cd $_pkgname-app-$pkgver
+ npm install
+ npm run clean
+ npm run webpack:prod
+ npm run sass:prod
+ npm run package:linux
+ cd dist/Soundnode/Soundnode-linux-x64
+ find resources/app/node_modules -type f -name package.json -exec sed -i "/${srcdir//\//\\/}/d" '{}' \; # remove references to $srcdir from package.json files
+}
+
+package() {
+ install -Dm644 $_pkgname.desktop "$pkgdir/usr/share/applications/$_pkgname.desktop"
+ cd $_pkgname-app-$pkgver
+ install -Dm644 app/$_pkgname.png "$pkgdir/usr/share/pixmaps/$_pkgname.png"
+ cd dist/Soundnode/Soundnode-linux-x64
+ install -d m755 "$pkgdir/$_install_dir"
+ cp -r * "$pkgdir/$_install_dir/"
+ install -dm755 "$pkgdir/usr/bin"
+ ln -s "$_install_dir/Soundnode" "$pkgdir/usr/bin/$_pkgname"
+}
diff --git a/electron-packager-version.patch b/electron-packager-version.patch
new file mode 100644
index 00000000000..edcb08a5be8
--- /dev/null
+++ b/electron-packager-version.patch
@@ -0,0 +1,13 @@
+diff --git a/package.json b/package.json
+index 4253e0f..b957091 100644
+--- a/package.json
++++ b/package.json
+@@ -32,7 +32,7 @@
+ "babel-preset-stage-0": "^6.22.0",
+ "babel-register": "^6.23.0",
+ "electron": "^1.6.11",
+- "electron-packager": "^8.5.1",
++ "electron-packager": "^12.0.2",
+ "eslint": "^4.0.0",
+ "eslint-plugin-react": "^7.1.0",
+ "install": "^0.10.1",
diff --git a/soundnode.desktop b/soundnode.desktop
new file mode 100644
index 00000000000..eba405d2e9a
--- /dev/null
+++ b/soundnode.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+Name=Soundnode
+Comment=Soundcloud for desktop
+Exec=soundnode
+Icon=soundnode
+Terminal=false
+Categories=Audio;Player;
diff --git a/youtube-dl.patch b/youtube-dl.patch
new file mode 100644
index 00000000000..52696e8a11a
--- /dev/null
+++ b/youtube-dl.patch
@@ -0,0 +1,13 @@
+diff --git a/app/public/js/common/playerService.js b/app/public/js/common/playerService.js
+index 6536a55..df5f27c 100644
+--- a/app/public/js/common/playerService.js
++++ b/app/public/js/common/playerService.js
+@@ -151,7 +151,7 @@ app.factory('playerService', function (
+ trackObj.songThumbnail = 'public/img/song-placeholder.png';
+ }
+
+- trackUrl = trackObj.songUrl + '?client_id=' + window.localStorage.scClientId;
++ trackUrl = require('child_process').execSync(`youtube-dl -g '${trackObj.songUrl}'`).toString();
+
+ // check rate limit
+ utilsService.isPlayable(trackUrl).then(function () {