Package Details: mopidy-ytmusic 0.3.9-1

Git Clone URL: https://aur.archlinux.org/mopidy-ytmusic.git (read-only, click to copy)
Package Base: mopidy-ytmusic
Description: Mopidy extension for playing music from Youtube Music
Upstream URL: https://github.com/jmcdo29/mopidy-ytmusic
Licenses: Apache
Submitter: kmacleod
Maintainer: kmacleod
Last Packager: kmacleod
Votes: 1
Popularity: 0.088707
First Submitted: 2022-05-01 03:58 (UTC)
Last Updated: 2024-01-12 14:25 (UTC)

Latest Comments

1 2 Next › Last »

kmacleod commented on 2023-12-31 14:33 (UTC)

Thanks cprn, looks good - pushed

cprn commented on 2023-12-31 10:32 (UTC) (edited on 2023-12-31 11:23 (UTC) by cprn)

Working PKGBUILD but I don't know if it's correct (standards, versioning, etc - I only bumped $pkgrel). OAuth used in mopidy ytmusic setup. Tested, no issues.

# Maintainer: Kyle MacLeod <aur.kmac5@recursor.net>

pkgname=mopidy-ytmusic
pkgver=0.3.8
pkgrel=3
pkgdesc="Mopidy extension for playing music from Youtube Music"

arch=('any')
url="https://github.com/jmcdo29/mopidy-ytmusic"
license=('APACHE')
depends=(
  'mopidy'
  'python-certifi'
  'python-charset-normalizer'
  'python-idna'
  'python-importlib-metadata'
  'python-pykka'
  'python-pytube'
  'python-setuptools'
  'python-requests'
  'python-tornado'
  'python-urllib3'
  'python-zipp'
  'python-ytmusicapi')
makedepends=('python' 'git')

source=("$pkgname-${pkgver}.zip::$url/archive/refs/heads/master.zip")

package() {
  cd "mopidy-ytmusic-master"

  # change pytube dependency:
  sed -i 's/pytube>=12.1.0,<13.0.0/pytube>=15/' setup.py

  # use oauth in `mopidy ytmusic setup` command:
  sed -i '20s/ytmusicapi import YTMusic/ytmusicapi.setup import setup_oauth/' mopidy_ytmusic/command.py
  sed -i 's/\/auth.json/\/oauth.json/' mopidy_ytmusic/command.py
  sed -i '32,38d' mopidy_ytmusic/command.py
  sed -i 's/print(YTMusic(filepath=str(path)))/setup_oauth(filepath=str(path))/' mopidy_ytmusic/command.py

  python setup.py install --root="${pkgdir}/" --optimize=1
}

sha256sums=('adedacf5192e3b541dd47534902d7f1848478e21bf40b723079a4d85d486a2a1')

Also, I pushed a PR so sed lines might not be needed soon: https://github.com/jmcdo29/mopidy-ytmusic/pull/4/files.

cprn commented on 2023-12-31 08:49 (UTC)

OK, no, I get what's going on. PKGBUILD isn't pointing to master branch, it's downloading 0.3.8 tag which doesn't have the required changes.

kmacleod commented on 2023-12-30 23:05 (UTC)

Hey cprn, I'm not sure why you're seeing this tbh, if you look at the setup.py for this package, at https://github.com/jmcdo29/mopidy-ytmusic/blob/master/setup.py, it's referencing:

"ytmusicapi>=0.22.0,<2.0.0"

Before I go looking further (I have this installed and working on my system), can you double-check your environment?

BTW I was able to get authentication to work with this but it's on my work laptop, so I won't be able to look things up for another week.

cprn commented on 2023-12-30 14:52 (UTC)

Sorry for responding with such a delay but I didn't have a need to use this PKGBUILD again up until now. Installing on a clean system currently ends up with:

Disabled extension ytmusic: ytmusicapi<0.30.0,>=0.22.0 required, but found ytmusicapi 1.3.2 at /usr/lib/python3.11/site-packages

So I also added in package():

  sed -i 's/ytmusicapi>=0.22.0,<0.30.0/ytmusicapi>=0.22.0/' setup.py

and it makes the plugin work but without authorization for a given user so it acts as a non logged-in user. With ytmusicapi 1.x.x authorization changed so it's no longer possible to use mopidy ytmusic setup to create auth.json. No idea how to solve it. I guess we have to wait for the upstream update which might not happen because Ubuntu still uses old python libraries and it works there as is.

kmacleod commented on 2023-11-09 02:00 (UTC)

Yes I also made that switch locally and have been running with the jmcdo29 fork for a while. I've pushed a new PKGBUILD to make the switch.

cprn commented on 2023-11-08 11:01 (UTC) (edited on 2023-12-31 09:22 (UTC) by cprn)

Unfortunately OzymandiasTheGreat's repository seems abandoned. AFAICT switching to https://github.com/jmcdo29/mopidy-ytmusic fork and updating pytube requirement in setup.py (so it'd include the current 15.0.0) fixes all known issues.