IPB

Welcome Guest ( Log In | Register )

19 Pages V   1 2 3 > »   
Reply to this topicStart new topic
> [WS] iTunes, web sources script
pone
post May 24 2012, 13:05
Post #1


Member


Group: Full Members
Posts: 1692
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



This is a web sources script for the music catalog of Apple's iTunes.

It writes the following tag fields:
COVER; ALBUMARTIST; ALBUM; YEAR; PUBLISHER; GENRE; ARTIST; TITLE; TRACK


script installation & usage:
1. download the .src file
2. move the file into this folder: %appdata%\Mp3tag\data\sources
(just copy&paste this into the Windows Explorer address bar)
3. run the script from Mp3Tag with this button:

download:
newest version: 1.1 (uploaded 04.06.2012):
Attached File  iTunes.src ( 3.2K ) Number of downloads: 22331


This post has been edited by pone: Jun 4 2012, 13:21
Go to the top of the page
 
+Quote Post
pone
post May 24 2012, 13:06
Post #2


Member


Group: Full Members
Posts: 1692
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



Some comments to the way the script works:

The script uses iTunes API:
http://www.apple.com/itunes/affiliates/res...search-api.html
This should make the script very stable, but it has also some limitations:

The COVER picture is always only 100x100 pixels. Sorry, no larger picture available at iTunes API

The PUBLISHER tag field is not always written as one company. Ofter there is additional information.

For the TITLE tag field I have picked "trackCensoredName" instead of "trackName". According to itunes' description, the the diference should be that rude words are replaced by * (like "S**t Happens"). But I have detected some examples, where the "trackCensoredName" has the version name of the title (like "Title (Club Mix)" or "Title (Trentemøller Remix)") and "trackName" has not.
Example:
http://itunes.apple.com/us/album/reworked-...xed/id471858839
http://itunes.apple.com/lookup?id=471858839&entity=song

The GENRE tag field displays only one main genre (like "Electronic"). The HTML pages have the more than one genre and more defined genre names (like "Electronic, Music, Dance, Techno, Ambient, House") The API has not (at least I don't know how to display it).
See the example above.

For the YEAR tag field, I was not able to get the original year when there are remastered versions on iTunes. The HTML pages have the original year. The API has not (at least I don't know how to display it).
Example:
http://itunes.apple.com/us/album/hunky-dor...ered/id14684243
http://itunes.apple.com/lookup?id=14684243&entity=song


Maybe I will make another version of the script which will parse the HTML site to avoid some of the limitations.

Let me know what you think about it and give me feeback if you spot some problems.
Everybody is invited to develop and modify this script.

This post has been edited by pone: May 24 2012, 13:47
Go to the top of the page
 
+Quote Post
dano
post May 27 2012, 03:56
Post #3


Moderator


Group: Moderators
Posts: 5651
Joined: 4-September 03
From: Germany
Member No.: 201
Mp3tag Version: 2.84c



The _length field should support milliseconds out of the box.
So you probably can save your (very good) ms conversion code.


--------------------
Go to the top of the page
 
+Quote Post
pone
post May 27 2012, 09:31
Post #4


Member


Group: Full Members
Posts: 1692
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



ZITAT(dano @ May 27 2012, 04:56) *
The _length field should support milliseconds out of the box.
So you probably can save your (very good) ms conversion code.


Oh! So simple! I didn't even try this. How should I have known this? A good example of the poor documentation of the web sources functionality. The rules for the _LENGTH output aren't explained anywhere, are they? That would have saved me some work.
Go to the top of the page
 
+Quote Post
MrMusicBoy12345
post May 29 2012, 11:40
Post #5


Member


Group: Full Members
Posts: 6
Joined: 5-July 11
Member No.: 14821
Mp3tag Version: v2.49



Wow this script is amazing!
Thank you smile.gif
Go to the top of the page
 
+Quote Post
peteyt
post May 29 2012, 15:56
Post #6


Member


Group: Full Members
Posts: 17
Joined: 23-May 12
Member No.: 16487
Mp3tag Version: 2.53



Love the script but I'm finding some stuff it doesn't pick up that is on itunes
Go to the top of the page
 
+Quote Post
pone
post May 29 2012, 18:35
Post #7


Member


Group: Full Members
Posts: 1692
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



ZITAT(peteyt @ May 29 2012, 16:56) *
Love the script but I'm finding some stuff it doesn't pick up that is on itunes


Can you give examples? Maybe I can fix that.
Go to the top of the page
 
+Quote Post
peteyt
post May 30 2012, 05:58
Post #8


Member


Group: Full Members
Posts: 17
Joined: 23-May 12
Member No.: 16487
Mp3tag Version: 2.53



QUOTE (pone @ May 29 2012, 18:35) *
Can you give examples? Maybe I can fix that.


I tried to pull the details for Lawson - When she was Mine and kept getting stuff similar, other people's versions but not that one.

However I noticed something similar a week or so ago - I found something on the Discogs site - but when I tried to find it via the Source part of Discogs on Mp3tag it couldn't find it
Go to the top of the page
 
+Quote Post
pone
post May 30 2012, 09:55
Post #9


Member


Group: Full Members
Posts: 1692
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



ZITAT(peteyt @ May 30 2012, 06:58) *
I tried to pull the details for Lawson - When she was Mine and kept getting stuff similar, other people's versions but not that one.

However I noticed something similar a week or so ago - I found something on the Discogs site - but when I tried to find it via the Source part of Discogs on Mp3tag it couldn't find it


Ok, I found the problem. iTunes has different catalogs for each country. The script searches the US catalog. When you use the iTunes software, you will always see the catalog of your own country.
The single you are mentioning is not in the US catalog, but it is in the Great Britain catalog.

http://itunes.apple.com/us/artist/lawson/id2627885
http://itunes.apple.com/gb/artist/lawson/id2627885

I guess we would need different country versions of the script to cover that, similar to the Amazon scripts for Mp3tag.



As for the Discogs script, please report that in the respective forum thread. But I never had problems to find things there. I use that scripts very often. However, it is very sensitive for little spelling mistakes.

This post has been edited by pone: May 30 2012, 10:09
Go to the top of the page
 
+Quote Post
VincentVega
post Jun 4 2012, 12:22
Post #10


Member


Group: Members
Posts: 2
Joined: 4-June 12
Member No.: 16544
Mp3tag Version: 2.50



Hello and well done Pone!

Your script is most impressive; I have been able to improve metadata in my classical collection.
When tagging those huge boxset with a lot of tracks; it seems there is a limitation.
The script will only list the 50 first items and therefore write tags to only 50 files.

Maybe it is a limitation of the API?

Anyway thanks already!!!
Go to the top of the page
 
+Quote Post
pone
post Jun 4 2012, 12:33
Post #11


Member


Group: Full Members
Posts: 1692
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



ZITAT(VincentVega @ Jun 4 2012, 13:22) *
Hello and well done Pone!

Your script is most impressive; I have been able to improve metadata in my classical collection.
When tagging those huge boxset with a lot of tracks; it seems there is a limitation.
The script will only list the 50 first items and therefore write tags to only 50 files.

Maybe it is a limitation of the API?

Anyway thanks already!!!


I don't know. Can you give me an example link?
Maybe I've built that limitation into the script. Check what happens if you delete the "99" in the last line of the script!

EDIT:
I fixed that. The limitation was in iTunes' API. See update report below

This post has been edited by pone: Jun 4 2012, 13:29
Go to the top of the page
 
+Quote Post
pone
post Jun 4 2012, 13:28
Post #12


Member


Group: Full Members
Posts: 1692
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



Update 1.1:

FIXED: There was a maximum of 50 songs for an album before. Now it's 200 songs. That's the maximum for iTunes' API. Thank VincentVega for reporting this bug.

CHANGED: The automatic searchbox input is now %artist% %album%, before it was only %artist%. That will help to put your desired album on top of the results list.

CHANGED: The internal script code for changing milliseconds to minutes and seconds. Thanks dano for mentioning that this was not necessary.


- download in the starting post -

This post has been edited by pone: Jun 4 2012, 13:30
Go to the top of the page
 
+Quote Post
VincentVega
post Jun 4 2012, 13:47
Post #13


Member


Group: Members
Posts: 2
Joined: 4-June 12
Member No.: 16544
Mp3tag Version: 2.50



Perfect!
It works; thanks for the quick fix:)
200 entries is more than enough.
All the best.
Go to the top of the page
 
+Quote Post
leigh
post Jun 8 2012, 01:50
Post #14


Member


Group: Members
Posts: 3
Joined: 8-June 12
Member No.: 16556
Mp3tag Version: 2.51



fantastic script, really very handy!

i have a question and not sure if you would mind helping. I'm modding this script slightly to be able to tag tv shows and movies as well. tv shows appear to be ok but i'm having a strange issue with movies.

it's mainly around writing the longDescription to the PODCASTDESC field. i know this isn't an original field in your script hence why not sure if you're able to help.

the lines looks like this -

outputto "PODCASTDESC"
sayregexp "(?<=\"longDescription\":\").+?(?=\")" ", " "}"

but whenever it reaches the following characters \" it stops writing. it appears anything in the description in quotes also has a \ with it as well. for example -

legendary Marvel Super Hero \“Iron Man,\”

i thought the following line (also found in your script)

replace "\\\"" "\""

might have taken care of it but it appears not. it just doesn't seem to like writing anything in quotes.

i'm a complete amateur at this so any chance you would mind assisting?

many thanks
Go to the top of the page
 
+Quote Post
pone
post Jun 8 2012, 02:31
Post #15


Member


Group: Full Members
Posts: 1692
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



ZITAT(leigh @ Jun 8 2012, 02:50) *
fantastic script, really very handy!

i have a question and not sure if you would mind helping. I'm modding this script slightly to be able to tag tv shows and movies as well. tv shows appear to be ok but i'm having a strange issue with movies.

it's mainly around writing the longDescription to the PODCASTDESC field. i know this isn't an original field in your script hence why not sure if you're able to help.


Can you post your script version or send it to me? It's much easier to find the problem when i can use it and read the debug file.
Go to the top of the page
 
+Quote Post

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

 



RSS Lo-Fi Version Time is now: 24th October 2017 - 01:29