Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

librespot: initial addon #1622

Merged
merged 4 commits into from Jun 20, 2017

Conversation

Projects
None yet
5 participants
@awiouy
Copy link
Contributor

commented May 12, 2017

This is a proof of concept, built around pre-compiled librespot binaries (28232b5).

What works:

  • runs on my RPi 3
  • should run on x86_64

What does not work:

  • discovery mode (username and password are required)
  • initial volume setting (volume is maxed out each time service is started)

Please test, especially on RPi and other arm projects.

Many thanks to Shane Meagher (shanemeagher) for his initial submission.

@awiouy awiouy force-pushed the awiouy:librespot branch from d1de9a7 to 70e4033 May 12, 2017

@awiouy

This comment has been minimized.

Copy link
Contributor Author

commented May 12, 2017

I will move the binaries to a dedicated github repo

@awiouy awiouy force-pushed the awiouy:librespot branch 5 times, most recently from 5179588 to 7844cb6 May 12, 2017

@awiouy

This comment has been minimized.

Copy link
Contributor Author

commented May 12, 2017

Binaries do not run on RPi.
I think I am done.

PKG_VERSION="0.8.4"
PKG_LICENSE="PSF"
PKG_SITE="http://larsimmisch.github.io/pyalsaaudio/"
PKG_URL="https://pypi.python.org/packages/52/b6/44871791929d9d7e11325af0b7be711388dfeeab17147988f044a41a6d83/pyalsaaudio-0.8.4.tar.gz"

This comment has been minimized.

Copy link
@MilhouseVH

MilhouseVH May 13, 2017

Contributor

PKG_URL=https://files.pythonhosted.org/packages/source/p/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz

Rather than use the horrible hashses, a url of the following form should now work for most pypi-based packages:
https://files.pythonhosted.org/packages/source/${PKG_NAME:0:1}/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz

We'll need to update all pypi.pthon.org urls, eg. Pillow etc. - I'll submit a PR that updates the urls of existing Python packages.

Edit: Use files.pythonhosted.org instead of pypi.io.

This comment has been minimized.

Copy link
@awiouy

awiouy May 13, 2017

Author Contributor

Excellent suggestion!

esac

mkdir -p "$ADDON_BUILD/$PKG_ADDON_ID/bin"
cp "$PKG_BUILD/$bin/librespot" \

This comment has been minimized.

Copy link
@MilhouseVH

MilhouseVH May 13, 2017

Contributor

Why not just use $TARGET_ARCH in place of $bin and remove the case statement (lines 48-58) which is then redundant?

This comment has been minimized.

Copy link
@awiouy

awiouy May 13, 2017

Author Contributor

Ah, leftovers... Thanks

@awiouy awiouy force-pushed the awiouy:librespot branch from 7844cb6 to 99a8ddf May 13, 2017

@awiouy awiouy force-pushed the awiouy:librespot branch 3 times, most recently from 7fc26f5 to 330d6df May 18, 2017

@awiouy

This comment has been minimized.

Copy link
Contributor Author

commented May 18, 2017

This now works out of the box on my RPi3.
Ready to merge.

@awiouy awiouy force-pushed the awiouy:librespot branch 3 times, most recently from 0ad8563 to 07c0da5 May 18, 2017

@shanemeagher

This comment has been minimized.

Copy link

commented May 24, 2017

Thanks for creating the pull request @awiouy . I'm still getting the hang of Git.

I can confirm that the x86_64 build works.

@awiouy awiouy force-pushed the awiouy:librespot branch 5 times, most recently from f116866 to 032cf06 Jun 8, 2017

@awiouy awiouy force-pushed the awiouy:librespot branch from 032cf06 to 0793623 Jun 15, 2017

@awiouy

This comment has been minimized.

Copy link
Contributor Author

commented Jun 15, 2017

Rebased to use the latest binaries and to disable the cache.
User feedback is positive.
Ready to merge.

@awiouy awiouy force-pushed the awiouy:librespot branch from 0793623 to 6bc5310 Jun 19, 2017

@awiouy

This comment has been minimized.

Copy link
Contributor Author

commented Jun 19, 2017

I have updated the librespot package to build librespot with the LibreELEC toolchain.
The LibreELEC toolchain thus now has the ability to build Rust sources.
This runs on RPi2.
This build for x86_64, but I have no system to test it.
I will test Odroid_C2 and RPi as soon as they are clean built.
I will update PR in master after this is tested and reviewed.

@shanemeagher
I experienced this strange behaviour:
- first run without cache was not discovered
- second run with cache was discovered
- third run without cache was discovered

Would you be so kind to provide a patch to disable caching of audio files (essentially plietar/librespot#181 without the build feature). Thank you in advance.

@awiouy awiouy force-pushed the awiouy:librespot branch from 6bc5310 to ab246eb Jun 19, 2017

@awiouy awiouy referenced this pull request Jun 19, 2017

Closed

LibreELEC addon #186

@awiouy

This comment has been minimized.

Copy link
Contributor Author

commented Jun 20, 2017

The cache issue is fixed, and it runs on Pi Zero W.
I am done, please review.

@chewitt chewitt merged commit 97fa217 into LibreELEC:libreelec-8.0 Jun 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.