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

google music: add option to play the entire user library #470

Closed
jeremiah-miller opened this issue Mar 24, 2018 · 13 comments

Comments

Projects
None yet
3 participants
@jeremiah-miller
Copy link

commented Mar 24, 2018

Description

I use Google play music by adding songs to my library (I have unlimited, but this can also be done by uploading songs) and then just shuffling my library. The reason for that is the playlist size limit of 1,000 songs, I have ~25,000 songs in my library and I want to shuffle all of them. Is it possible to do that with tizonia?

Steps to Reproduce

  1. Install tizonia
  2. Try to shuffle library
  3. There's no way to do it

Expected behavior: Have an argument to play library

Actual behaviour: There isn't one

Reproduces how often: Every time

Versions

tizonia 0.12.0

Installation Method Used

Install from AUR

Additional Information

It might not be possible to do this, but I really hope there is. Thanks!

@tizonia

This comment has been minimized.

Copy link
Owner

commented Mar 26, 2018

Hi!, thanks for stopping by.

This is an interesting feature, which I agree is not implemented at the moment (you can use the --shuffle option while various searches, like tracks, album, artist, etc, but not with the whole library).

I believe with gmusicapi the library can be retrieved in chunks of up to 1000 elements, and then each chunk could be shuffled individually. So one potential implementation could follow this idea, where N elements are retrieved, then shuffled and then added to the playback queue. The playback queue could start being processed as soon as the first batch arrives. Later chunks would be downloaded in the background, while playback is in progress.

@jeremiah-miller

This comment has been minimized.

Copy link
Author

commented Mar 26, 2018

That would be awesome! Thank you!

@tizonia

This comment has been minimized.

Copy link
Owner

commented Mar 27, 2018

I've got a prototype implementation of this, which retrieves the whole library in one go, without chunking. In my case, it works all right because my current library is around 2500 songs, so the retrieval is pretty speedy. Do you have an Ubuntu machine to test a single debian package? I could attach that here if you have the time to give it a go.

@jeremiah-miller

This comment has been minimized.

Copy link
Author

commented Mar 27, 2018

I mainly use Arch, but if you upload the package I'll put Ubuntu on a live USB to test it, I'm happy to help with anything you need to get this working

@tizonia

This comment has been minimized.

Copy link
Owner

commented Mar 27, 2018

Great!. This implementation that downloads the whole library in one go may hit some Google Play music API limit which I don't see with my library.

I will upload a single test deb package later today, based on Ubuntu 18.04. You will need to download an 18.04 image.

juanrubio added a commit that referenced this issue Mar 28, 2018

@tizonia

This comment has been minimized.

Copy link
Owner

commented Mar 28, 2018

@bbgun7 : Here is the deb:

tizonia-all-testing_0.13.1d-1_amd64.deb.zip

Unzip first, and then install/uninstall with

$ dpkg -i  tizonia-all-testing_0.13.1d-1_amd64.deb
$ dpkg -r tizonia-all-testing

Please make sure tizonia.conf contains:

[ilcore]

component-paths = /usr/lib/x86_64-linux-gnu/tizonia0-plugins12;

And then run with:

$ tizonia --gmusic-library --shuffle

Hope it works with your library!

@jeremiah-miller

This comment has been minimized.

Copy link
Author

commented Mar 28, 2018

Alright, so I got that to install but when I tried to run it, it output
tizonia: error while loading shared libraries: libboost_program_options.so.1.65.1: cannot open shared object file: No such file or directory
So I decided to try installing with the recommended method curl -kL https://goo.gl/Vu8qGR | bash but it output

ubuntu@ubuntu:~/Downloads$ curl -kL https://goo.gl/Vu8qGR | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   255    0   255    0     0   1482      0 --:--:-- --:--:-- --:--:--  1473
100   150  100   150    0     0    232      0 --:--:-- --:--:-- --:--:--   232
100  3969  100  3969    0     0   4286      0 --:--:-- --:--:-- --:--:--  4286
DISTRIB_CODENAME=bionic
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'apt' instead of 'apt-transport-https'
apt is already the newest version (1.6~beta1).
curl is already the newest version (7.58.0-2ubuntu3).
libffi-dev is already the newest version (3.2.1-8).
libssl-dev is already the newest version (1.1.0g-2ubuntu2).
python-dev is already the newest version (2.7.14-4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
W: --force-yes is deprecated, use one of the options starting with --allow instead.
Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease                        
Hit:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease                
Ign:5 https://dl.bintray.com/tizonia/ubuntu bionic InRelease                   
Get:6 https://dl.bintray.com/tizonia/ubuntu bionic Release [1840 B]    
Ign:3 http://apt.mopidy.com stable InRelease                                   
Hit:8 http://apt.mopidy.com stable Release       
Fetched 1840 B in 1s (1565 B/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package python-pip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 tizonia-all : Depends: libtizgmusic0 but it is not going to be installed
               Depends: libtizsoundcloud0 but it is not going to be installed
               Depends: libtizdirble0 but it is not going to be installed
               Depends: libtizyoutube0 but it is not going to be installed
               Depends: libtizplex0 but it is not going to be installed
               Depends: libtizchromecast0 but it is not going to be installed
               Depends: libtizplatform0 but it is not going to be installed
               Depends: tizcastd but it is not going to be installed
               Depends: libtizcastclient0 but it is not going to be installed
               Depends: tizrmd but it is not going to be installed
               Depends: libtizrmproxy0 but it is not going to be installed
               Depends: libtizcore0 but it is not going to be installed
               Depends: libtizonia0 but it is not going to be installed
               Depends: libtizaacdec0 but it is not going to be installed
               Depends: libtizchromecastrnd0 but it is not going to be installed
               Depends: libtizfr0 but it is not going to be installed
               Depends: libtizfw0 but it is not going to be installed
               Depends: libtizflacdec0 but it is not going to be installed
               Depends: libtizhttprnd0 but it is not going to be installed
               Depends: libtizhttpsrc0 but it is not going to be installed
               Depends: libtizmp3dec0 but it is not going to be installed
               Depends: libtizmp3enc0 but it is not going to be installed
               Depends: libtizmp3meta0 but it is not going to be installed
               Depends: libtizmpgdec0 but it is not going to be installed
               Depends: libtizoggdmux0 but it is not going to be installed
               Depends: libtizwebmdmux0 but it is not going to be installed
               Depends: libtizopusdec0 but it is not going to be installed
               Depends: libtizopusfiledec0 but it is not going to be installed
               Depends: libtizpcmdec0 but it is not going to be installed
               Depends: libtizalsapcmrnd0 but it is not going to be installed
               Depends: libtizpulsepcmrnd0 but it is not going to be installed
               Depends: libtizspotifysrc0 but it is not going to be installed
               Depends: libtizvorbisdec0 but it is not going to be installed
               Depends: libtizvp8dec0 but it is not going to be installed
               Depends: tizonia-player but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Oops. Something went wrong!

Got any ideas for how I could get it to work?

@tizonia

This comment has been minimized.

Copy link
Owner

commented Mar 28, 2018

Sorry, I forgot to mention that you need to install the dependencies since the test Deb does not contain dependency info.

The easiest method is described here:
BUILDING.md#dependencies

After you have all the dependencies, the test Deb will work correctly.

I hope it works this time.

@tizonia tizonia changed the title Shuffle library in Google Play Music? google music: add option to play the entire user library Mar 29, 2018

@tizonia tizonia added this to the v0.14.0 milestone Apr 2, 2018

@jeremiah-miller

This comment has been minimized.

Copy link
Author

commented Apr 4, 2018

Yup, that worked! Sorry it took so long, I got a bit busier with school and ubuntu live was acting a bit weird. I installed ubuntu on a virtual machine and got it working and sure enough, 24150 tracks in the queue.

tizonia 0.13.0. Copyright (C) 2018 Juan A. Rubio
This software is part of the Tizonia project <http://tizonia.org>

[Google Play Music] [Connecting] : 'chunksowisdom@gmail.com'.
/usr/local/lib/python2.7/dist-packages/fuzzywuzzy/fuzz.py:35: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
  warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
[Google Play Music] [Authenticating] : 'with user credentials'
[Google Play Music] [Tracks in queue] '24150'.
[Google Play Music] [Connected] : 'chunksowisdom@gmail.com'.
[Google Play Music] [Connected] : 'chunksowisdom@gmail.com'.
   Bliss n Eso : Moments (feat. Gavin James)
     Album : Off The Grid
     Year : 2017
     Duration : 3m:57s
     Track # : 12
     2 Ch, 44.1 KHz, 16:s:b 
  
   0%   10   20   30   40   50   60   70   80   90   100%
0s |----|----|----|----|----|----|----|----|----|----| 3m:57s
      07s

tizonia exiting (Ctrl-C).

Works great, thanks!

Also, just as an fyi, both aur packages are out of date

@juanrubio

This comment has been minimized.

Copy link
Collaborator

commented Apr 4, 2018

@bbgun7 : great! thanks for finding the time to test this. I'm glad it works with your library. One question, do you have to wait long between the point when you hit enter and the first track starts playing?

@jeremiah-miller

This comment has been minimized.

Copy link
Author

commented Apr 4, 2018

It takes 16 seconds, according to the time command

@juanrubio

This comment has been minimized.

Copy link
Collaborator

commented Apr 8, 2018

@bbgun7 : thanks for the info. I suppose that kind of performance is probably OK for now. In the future, I would like to have multiple long-lived instances of Tizonia connected to multiple services, and one controlling instance that would allow you to tap into those services very quickly. First-time initialisation time would not be so critical in that kind of system.

@jeremiah-miller

This comment has been minimized.

Copy link
Author

commented Apr 8, 2018

That would be interesting, I think what might be better is if you can have it only select a certain number of songs. I'm not sure if the API would allow something like that though

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.