Google Music for Amarok

Amarok 2.x Scripts

Source (required if based on other people's work): https://bitbucket.org/jbatalle/google-music-for-amarok

4
Score 53%
Description:

Attention: The script is not working anymore, because the authentication has changed. So, don't download unless you want to solve the problem.

If you want to fix it, you can find the code here -> https://bitbucket.org/jbatalle/google-music-for-amarok

This script allows you to listen your music allocated in your Google Music account using Amarok.

You only need to have installed curl. Then this script do the work for you!

After installation put your account parameters and then update the list of songs. Once the list is updated you can listen your music!

== OTHER PROBLEMS ==
If you see an error related to "Parse error" try to read the ListSongs.json file and if you see a html code remove it. This file should only have json code between "{
Last changelog:

5 years ago

v1.3.0:
- Added search bar
- Problem with breakline in authToken
- Download all songs
v1.2.1:
- Reduced size of listSong file.
- Accept-Type in curl function when download new listSongs.
- eval function changed by JSON.parse
v1.2:
- Bash script functions passed to javascript.
v1.0:
- First script release.

marcostaracido

1 year ago

I get too an "'m' [null] is not an object" error when I try to update Google Music List. No solution?

Report

viceq

1 year ago

I get an error while trying to sync the DB. I think it might have something todo with two-way authentication, because I'm not being prompted to accept login attempt. Is this something you have plans to look into?

Report

RyanMcCoskrie

1 year ago

Looking into forking this for debugging purposes.
If I can fix the "m[null]" bug I will look into removing the curl dependency and rework the UI.
Is there an official repository I should clone from?

Report

C

jbatalle

1 year ago

Hi,

I didn't know was useful! The public repo is in bitbucket, I don't know why the url was removed from that page.
Link: https://bitbucket.org/jbatalle/google-music-for-amarok

Report

CamusAcuario

1 year ago

the m[null] is because Google has changed all. Now, Google Play Music doesn't have any credentials, so is needed to create a custom app on Google API in order to authenticate with Google account.

Report

dubis

4 years ago

Hi

I went to install this script from the script Manager of Amarok.
I restarted it and I've new entry in the tools menu as Configure Google Music , Update Google Music List. I entered my Google user in the "Configure Google Music interface.
I don't know exactly what I suppose to do now.
I tried Update Google Music List And I'v got this error :
Script error Notified by : Google Music for Amarok TypeError: Result of expression 'myArray' [null] is not an object.

Curl is installed well on my system
curl --version
curl 7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtmp rtsp smtp smtps telnet tftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP


Could you give some help?

Report

kratky

4 years ago

I have a similar problem, except it says:

Script error reported by: Google Music for Amarok TypeError: Result of expression 'm' [null] is not an object.

Report

disp

4 years ago

If you get that error, that means you don't have curl installed. Installing it via package manager or apt-get install curl fixed it for me.

Unfortunately then I ran into a different one (myArray) which apparently happens because I have two-factor authentication activated.

Report

CamusAcuario

1 year ago

I know my answer is so late but I am having the same issue and cURL is installed so I don't think is related to cURL

Report

saLOUtions

4 years ago

Hey,

this is a really nice idea! I got the Google All Access offer and already added some music to "my music".

Unfortunately I face a bug:

Script error reported by: Google Music for Amarok TypeError: Result of expression 'serviceDataJson.data' [undefined] is not an object.

Does it still work for you? Maybe it's an API change.

Report

C

jbatalle

4 years ago

Hello,
Can you see a file named "ListSongs.json" in the folder where is located the script?

In the case that this file exists, I think that the problem is related to the format of this file.

If this file doesn't exist, there is a problem with the connection with Google Music, or maybe the curl command is not installed.

Report

saLOUtions

4 years ago

I tried it with another computer and here it works. curl was installed.

Report

adrianojbr

5 years ago

now, a parse error, but ListSongs.json doesn't have html code. The ListSongs.json is:

{"data":[{},{"title":"I've Been Waiting","id":"00eb4b6b-4242-3cf9-8872-31f340687805","artist":"Matthew Sweet"},{"title":"Gravity Rides Everything","id":"37c35327-6893-313c-a5dc-8831ec487b98","artist":"Modest Mouse"},{"title":"My Way","id":"24ad4ad4-c706-3060-8ca3-1942c12d455a","artist":"Los Lonely Boys"},{"title":"Drinking Song","id":"b3175ba2-b5e5-33be-9e0b-f0faf12eec18","artist":"Hanggai"},{"title":"Nothing Like You","id":"39199c59-465d-3913-9f41-25344fc3aea4","artist":"Frightened Rabbit"}]}

What's the solution?

Report

C

jbatalle

5 years ago

Hi,
this json file is correct. The ListSong.json file shouldn't have html code.

Report

adrianojbr

5 years ago

I updated, but continue parse error.

Report

adrianojbr

5 years ago

i have a error: Google Music for Amarok TypeError: Result of expression 'm' [null] is not an object.

diagnostic of amarok:

Versão do Amarok: 2.7.1
Versão do KDE: 4.10.5
Versão do Qt: 4.8.2
Versão do Phonon: 4.6.0
Infraestrutura do Phonon: GStreamer (4.6.2)
PulseAudio: Sim

Scripts do Amarok:
Amarok Script Console 1.0 (parado)
Lyricwiki .2 (parado)
Free Music Charts 1.6.0 (parado)
Librivox.org 1.0 (parado)
Google Music for Amarok 1.2.1 (parado)
Cool Streams 1.0 (parado)

Plugins do Amarok:
Coleção MySQLServer (habilitado)
Coleção MySQLe (habilitado)
Coleção Nepomuk (habilitado)
Coleção UPnP (habilitado)
Coleção de CDs de áudio (habilitado)
Coleção de DAAP (habilitado)
Coleção de MTP (habilitado)
Coleção de armazenamento universal em massa (habilitado)
Coleção iPod, iPad & iPhone (habilitado)
Ampache (desabilitado)
Jamendo (habilitado)
Last.fm (habilitado)
Loja Magnatune (habilitado)
Loja de músicas em MP3 (habilitado)
MP3tunes (desabilitado)
Pasta de Podcast (habilitado)
gpodder.net (desabilitado)

Report

Cristoph

3 years ago

Hi, i hae the same error when click in update

Amarok TypeError: Result of expression 'myArray' [null] is not an object

Report

FraSMOG

5 years ago

Hi,
here also I got the "Parse error" problem... I've looked at my Json code but it seems fine to me... :(
If it can help, I can send you the file via email, I don't think attach the whole file here is a good idea...

Report

C

jbatalle

5 years ago

Hello!
What version of Amarok are you using? In my computer with 2.5 version works fine, but in other computer (without KDE) doesn't work. This means that the problem is not in the parsing of the json file, is in the code... maybe is due to lack of libraries.

Maybe can be more useful if you can run the amarok in debugging mode (amarok --debug in a terminal), and paste here, or send me an email with the lines that show the error.

Report

FraSMOG

5 years ago

I use Amarok 2.7.1 under KDE 4.10.5

I get the list of songs (all together, not nested by any metatag, just sorted by song name) but when I try to play one of them I get that error, and the most useful thing I see in the debug is this, I think:
Quote:SCRIPT "Google Music for Amarok" : "<HTML>
<HEAD>
<TITLE>Moved Temporarily</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Moved Temporarily</H1>
The document has moved <A HREF="https://www.google.com/accounts/ServiceLogin?service=sj&amp;passive=1209600&amp;continue=https://music.google.com/music/play?u%3D0%26songid%3Db81953d2-8795-3ecf-b3ba-1fac80bd522b%26pt%3De&amp;followup=https://music.google.com/music/play?u%3D0%26songid%3Db81953d2-8795-3ecf-b3ba-1fac80bd522b%26pt%3De">here</A>.
</BODY>
</HTML>
"

Report

quaff

5 years ago

I'm getting parse errors when I try to play a song from my Google Music collection. I've set up the script properly, and ListSongs.json was created properly.

I have special characters in some of my songs (Chinese), not sure if that will impact the parse error.

Report

quaff

5 years ago

Also, I have two-step authentication enabled. Not sure if that makes a difference since I was able to log in properly and retrieve a song list with an application-specific password

Report

C

jbatalle

5 years ago

Hello,
sorry for the delay... I'm very busy these days.

How you say, I think that the problem is the characters.
If you want, give me a part of your file and I can try to find a solution.

Thank you to report the problem!

Report

daimadoshi85

5 years ago

Hi!Sorry I tried to install the script on amarok now, I read your comments and tried it. I receive a parse error but the script doesn't create the file listSongs.json. Can you help me?

Thank you very much.

Report

C

jbatalle

5 years ago

Try now, I changed a function, but I don't understand what happen. Have you got strange characters in your music allocated in google?

Report

5 years ago

v1.3.0:
- Added search bar
- Problem with breakline in authToken
- Download all songs
v1.2.1:
- Reduced size of listSong file.
- Accept-Type in curl function when download new listSongs.
- eval function changed by JSON.parse
v1.2:
- Bash script functions passed to javascript.
v1.0:
- First script release.

File (click to download) Version Description Packagetype Architecture Downloads Date Filesize DL OCS-Install
Pling
Details
license
version
1.3.0
updated Jan 11 2017
added Jan 27 2013
downloads today
0
page views today 3
System Tags addon