IPB

Welcome Guest ( Log In | Register )

3 Pages V  < 1 2 3  
Reply to this topicStart new topic
> [WS] Last.fm, web sources script
sadsack5000
post Nov 17 2016, 03:28
Post #31


Member


Group: Full Members
Posts: 10
Joined: 14-June 15
Member No.: 20890
Mp3tag Version: 2.70



Confirmed, running v2.9 and last.fm source dead here also
Please update
Go to the top of the page
 
+Quote Post
fuzzed
post Feb 12 2017, 18:21
Post #32


Member


Group: Members
Posts: 3
Joined: 23-November 14
Member No.: 20106
Mp3tag Version: 2.65



Hey mates, someone explained to me how to fix the script, I only applied it to the 'Last.fm#Top Tags 3 Genres.src' script but it should work similar for the others (1 genre, artist pic, etc.) Open it with Notepad++ or something similar to edit and save.

Improved: Last.fm#Top Tags 3 Genres.src

CODE
# Mp3tag (2.38 or higher) Parsing for Last.fm by dano
# Save it in your Mp3tag data directory,
# e.g. C:\Documents and Settings\*username*\Application Data\Mp3tag\data\sources
#
# DO NOT COPY/MODIFY AND REDISTRIBUTE THIS WITHOUT PERMISSION
#
# Get the first 3 Top Tags as Genre to categorize your music
#
[Name]=Last.fm TopTags
[BasedOn]=www.last.fm
[AlbumUrl]=http://ws.audioscrobbler.com/2.0/?method=artist.gettoptags&artist=%s&api_key=YOUR_API_KEY
[WordSeperator]=+
[SearchBy]=$replace(%artist%,/,'%'252F,&,'%'2526)
[Encoding]=url-utf-8

[ParserScriptAlbum]=...
# ###################################################################
# A L B U M
# ###################################################################
#debug "on" "C:\debug_Last.fm-Artist-TopTags_B.html" "20"

joinuntil "</toptags>"

regexpreplace "(?<=<name>)(\l)" "\u$1"
regexpreplace "\s(\l)" " \u$1"
regexpreplace "-(\l)" "-\u$1"

outputto "Genre"

findinline "<name>"
sayuntil "</name>"
findinline "</tag>" 1 1
if "<tag"
do
say ", "
findinline "<name>"
sayuntil "</name>"

findinline "</tag>" 1 1
while "<tag" 1 # Change second parameter to determine the amount of style tags 1=3 Genres, 2=4 Genres,...
endif




Line 11 was changed, the only thing you need to do is insert your personal API key where it says 'YOUR_API_KEY' on line 11. You can register or login to Last.fm and obtain one here: http://www.last.fm/api/account/create

Only Contact email and Application name are required, and can be filled out with whatever you like. You do not need to access the provided email account to verify anything. Click Submit and copy/paste the API Key over YOUR_API_KEY in the line above

Good luck with it! It worked for me, it should for you. Am a happy man today.

Explanation by person that helped me:

QUOTE
Incidentally, this was a no-brainer for me. I had to resolve the exact same issue with the O***** userscript I adopted several years ago, as the original author had abandoned it and it was still using the no longer supported 1.0 API calls for Last.fm. M******* figured out why the API calls were no longer working and directed me to the correct 2.0 calls to replace them with, and also determined that the original API Key which the original script author hardcoded into the script ten years ago had been disabled by Last.fm as well - so with 2.0 calls and a new key everything resumed working normally (hence I assumed updating the API call URL and adding a working key would likely restore your code to working order.) So I updated the script to force each user to obtain and enter their own key, so it wouldn't fail for everyone if a single key died down the road, and everyone knows how to replace it if their own key stops working.


This post has been edited by fuzzed: Feb 12 2017, 18:26
Go to the top of the page
 
+Quote Post
ouisltagger
post Mar 17 2017, 21:58
Post #33


Member


Group: Members
Posts: 3
Joined: 13-July 08
From: Seattle, WA, USA
Member No.: 7315
Mp3tag Version: 2.41a



QUOTE (fuzzed @ Feb 12 2017, 10:21) *
Hey mates, someone explained to me how to fix the script, I only applied it to the 'Last.fm#Top Tags 3 Genres.src' script but it should work similar for the others (1 genre, artist pic, etc.)...


Thanks so much, been waiting for this for a LONG time! I edited it to do just the ONE top tag by deleting the last couple of lines:

CODE
findinline "</tag>" 1 1
if "<tag"
do
say ", "
findinline "<name>"
sayuntil "</name>"

findinline "</tag>" 1 1
while "<tag" 1 # Change second parameter to determine the amount of style tags 1=3 Genres, 2=4 Genres,...
endif


A change that would be super helpful would be if it could do a selection of multiple artists in one go in mp3tag, rather than just one artist at a time. (If multiple artists are selected, I'm sure you know, it only applies the genre pulled from the first artist it finds) Any chance that would be a possibility?
Go to the top of the page
 
+Quote Post
rama
post Jun 24 2017, 05:34
Post #34


Member


Group: Full Members
Posts: 26
Joined: 12-June 14
Member No.: 19513
Mp3tag Version: 2.59a



QUOTE (ouisltagger @ Mar 17 2017, 22:58) *
Thanks so much, been waiting for this for a LONG time! I edited it to do just the ONE top tag by deleting the last couple of lines:

CODE
findinline "</tag>" 1 1
if "<tag"
do
say ", "
findinline "<name>"
sayuntil "</name>"

findinline "</tag>" 1 1
while "<tag" 1 # Change second parameter to determine the amount of style tags 1=3 Genres, 2=4 Genres,...
endif


A change that would be super helpful would be if it could do a selection of multiple artists in one go in mp3tag, rather than just one artist at a time. (If multiple artists are selected, I'm sure you know, it only applies the genre pulled from the first artist it finds) Any chance that would be a possibility?

hi
i got always this error , can i fix it?

thanks
Go to the top of the page
 
+Quote Post
ohrenkino
post Jun 24 2017, 08:19
Post #35


Member


Group: Full Members
Posts: 9030
Joined: 9-December 09
From: Norddeutschland / Northern Germany
Member No.: 11458
Mp3tag Version: 2.84c



Check whether mp3tag has access to the internet at all or whether it is blocked e.g. by the firewall:
Use function Help>Check for new version.
If you do not get a message box then MP3tag is blocked.


--------------------
42 - wie war die Frage / what was the question / quelle était la question
Go to the top of the page
 
+Quote Post
rama
post Jun 25 2017, 15:31
Post #36


Member


Group: Full Members
Posts: 26
Joined: 12-June 14
Member No.: 19513
Mp3tag Version: 2.59a



QUOTE (ohrenkino @ Jun 24 2017, 09:19) *
Check whether mp3tag has access to the internet at all or whether it is blocked e.g. by the firewall:
Use function Help>Check for new version.
If you do not get a message box then MP3tag is blocked.

hi
i have checked it works , i can connect to the net
i use now the script @ post 1 #1 post
thanks
Go to the top of the page
 
+Quote Post

3 Pages V  < 1 2 3
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 26th September 2017 - 02:48