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

iTunes importer script no longer works #26

Open
mhendu opened this issue Apr 10, 2020 · 21 comments
Open

iTunes importer script no longer works #26

mhendu opened this issue Apr 10, 2020 · 21 comments

Comments

@mhendu
Copy link

mhendu commented Apr 10, 2020

I've checked a few releases and am no longer seeing the button appear on any Apple Music release page.

@al1ydn
Copy link

al1ydn commented Apr 12, 2020

I hope this script is not dead.

@phokonte
Copy link

Yes, i have the same problem
It would be great to fix that, i still use it everyday and i'm lost without it!

@dufferzafar
Copy link
Owner

The problem is that I don't really use it now. If someone is willing to step up, I'll be more than happy to help them with code, and give them merge rights.

@mhendu
Copy link
Author

mhendu commented Apr 14, 2020

I have limited experience as a developer and I don't know JavaScript at all so not sure if I can really help with this - but I did note that in looking at the Chrome console the script was getting hung up on the 'slice' call in the addArtworkLink function. If you replace line 125 with this it appears to work correctly now:

var src = srcset.split(',')[1].slice(0, -3);

@chuckkahn
Copy link

chuckkahn commented Apr 15, 2020

Where does the musicbrainz button appear when it's working? I've never used it until now. I tried the line 125 replacement in Tampermonkey in Chrome for Windows but I don't see a musicbrainz button. Trying on this page: https://music.apple.com/ca/album/simple-symphony-for-string-orchestra-op-4-iii-sentimental/418806461

@mhendu
Copy link
Author

mhendu commented Apr 16, 2020

Yes, after replacing line 125 it works for me on that page. The button appears below the artwork on the left. If it doesn't appear after the page finishes loading try reloading the page. I find if you don't directly navigate to the page the button tends not to appear, unless you refresh the page.

@chuckkahn
Copy link

chuckkahn commented Apr 16, 2020

Okay I made that line 125 change and also replaced two instances of GM.xmlHttpRequest with GM_xmlhttpRequest.

master...chuckkahn:patch-1

@damienmauchamp
Copy link
Contributor

damienmauchamp commented Apr 17, 2020

itunes.apple.com album pages don't exist anymore. Script doesn't work anymore, I'll try to fix it.

EDIT : fix here #25

@phokonte
Copy link

The script seems once again not to work due to a new change on apple's website, anybody to fix it ?
thank you very much

@damienmauchamp
Copy link
Contributor

The script seems once again not to work due to a new change on apple's website, anybody to fix it ?
thank you very much

Mine is working fine, here's the link of the gist.

@phokonte
Copy link

Thank you very much, it works perfectly! The buttons to add the album to MusicBrainz and to access the cover have changed position (and colors to better adapt to the apple site), that's great but I didn't see them at first and I thought it didn't work. So if there are others in my case, the buttons are below the tracklist

And last thing: if anyone has time, it could be useful to have the label automatically entered each time, I don't know if it's possible but it could save some time. (I know very little about it so I'm not able to do it myself)

@damienmauchamp
Copy link
Contributor

Thank you very much, it works perfectly! The buttons to add the album to MusicBrainz and to access the cover have changed position (and colors to better adapt to the apple site), that's great but I didn't see them at first and I thought it didn't work. So if there are others in my case, the buttons are below the tracklist

And last thing: if anyone has time, it could be useful to have the label automatically entered each time, I don't know if it's possible but it could save some time. (I know very little about it so I'm not able to do it myself)

I've just updated my gist and added label names.

@augustjanse
Copy link
Collaborator

@damienmauchamp Would you consider sending a pull request with your fix?

@neo-apz
Copy link

neo-apz commented Feb 20, 2021

I've added the updated gist but I do not see any button yet. Is this gist still working? If yes, can you please post a screenshot of a page with the button so I know what to expect? Thanks!

Update:
It works fine with Tampermonkey and in Chrome, but not in Firefox.

@damienmauchamp
Copy link
Contributor

I've added the updated gist but I do not see any button yet. Is this gist still working? If yes, can you please post a screenshot of a page with the button so I know what to expect? Thanks!

Update:

It works fine with Tampermonkey and on Chrome, but not on Firefox.

The button should be at the bottom of the tracklist.

@mtrolley
Copy link
Contributor

mtrolley commented Feb 26, 2021

@damienmauchamp - It doesn't work in Firefox with Greasemonkey, the error is: GM_xmlhttpRequest is not defined

Changing GM_xmlhttpRequest to GM.xmlHttpRequest fixes the issue with Greasemonkey 4.11 and looks to work in Tampermonkey as well.

Would you fix that and open a PR for this repo, or would you mind if I did with your gist and this change?

@chuckkahn
Copy link

I've changed GM_xmlhttpRequest to GM.xmlHttpRequest but I don't see any button on this page:

https://music.apple.com/ca/album/opus-bach-orgelwerke-organ-works-vol-1/1482497370?l=th

Where do I check for errors?

@mtrolley
Copy link
Contributor

mtrolley commented Mar 9, 2021

I've changed GM_xmlhttpRequest to GM.xmlHttpRequest but I don't see any button on this page:

https://music.apple.com/ca/album/opus-bach-orgelwerke-organ-works-vol-1/1482497370?l=th

Where do I check for errors?

Did you change it in both places? It needs to be changed in two.

Look in the Web Console for errors: Menu >> Web Developer >> Web Console

I tried your link and have the "Add to MusicBrainz" button at the bottom, just above "More by Peter Kofler."

@chuckkahn
Copy link

chuckkahn commented Mar 9, 2021

Ah the web console reported:

userscript.html?name=MusicBrainz%3A%20Import%20from%20iTunes.user.js&id=0c797dab-be46-4fb2-98d2-be439803bba5:1 ERROR: Execution of script 'MusicBrainz: Import from iTunes' failed! GM_xmlHttpRequest is not defined"

So I changed the second GM_xmlHttpRequest

Now that error is gone. But I don't see the button.

image

@mtrolley
Copy link
Contributor

This works for me on that page: https://gist.github.com/trolley/1c8519d2df617c7951a8246859139104

@chuckkahn
Copy link

Yes it does. Thanks! (Doesn't bring in Johan Sebastien Bach as artist though.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants