PDA

View Full Version : C'mon, make it easy on the user!


weefle
Nov 14, 2003, 11:15 AM
I was shocked and dismayed that submitters are asked to retype all the artist, track, and album information, when it must be obtainable given just the iTunes Music Store URL.

I've written a very quick and dirty PHP script that, given an iTunes Music Store URL (of the http:// type that you can copy out of iTunes, or of the itms:// variety that iTunes actually handles itself), will return all the track information for that particular song. Note, you have to enter an iTunes Music Store URL for a track-- I don't think this will work with a URL for an album, artist, or anything else (although I haven't tried).

The interface:
http://ambrose.mcs.muohio.edu/itmsp/

And the source:
http://ambrose.mcs.muohio.edu/itmsp/index.phps

Please feel free to copy any or all of this horrible code to make dailytunes.com work the way it should.

weefle

arn
Nov 14, 2003, 11:56 AM
strong work.

will get on it...
arn

weefle
Nov 14, 2003, 12:44 PM
Originally posted by arn
strong work.

will get on it...
arn

Heh, well, slop work, really-- just a four-hour hack-- but thanks. I sincerely hope it'll improve the site and make it easier for folks to contribute.

arn
Nov 14, 2003, 01:31 PM
Originally posted by weefle
Heh, well, slop work, really-- just a four-hour hack-- but thanks. I sincerely hope it'll improve the site and make it easier for folks to contribute.

seems to have issues with quotes

http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?playlistId=459644&selectedItemId=459613

(see song name)

arn

arn
Nov 14, 2003, 01:35 PM
made the following changes...

lemme know if you think this will cause problems in other places:


function start_element($parser, $name, $attribs) {
global $current_element, $in_track_list, $done,$current_data;

if ( ! strcasecmp($name, 'tracklist') ) { $in_track_list++; }

if ( $done || !$in_track_list ) { return; }

$current_element = $name;
$current_data="";
}

function character_data($parser, $data) {
global $current_data, $end_of_songs, $done, $in_track_list;

if ( $done || ! $in_track_list) { return; }

$current_data .= html_entity_decode($data);
}

weefle
Nov 14, 2003, 01:35 PM
Originally posted by arn
seems to have issues with quotes

http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?playlistId=459644&selectedItemId=459613

(see song name)

arn


Yeah, darn it, I knew there was a reason why I hadn't posted this yet (I haven't touched this in a week). I noticed that same thing on a Norah Jones track. I couldn't figure out what the problem was. A friend suggested something about decoding HTML entities, but if you look at what's in the parsed XML, it's missing everything before the quote. I blame expat.

If you have the DOM-based parser installed, I think I can give you code that'll parse up the XML DOM-style-- maybe the DOM parser will be smarter about quotes.

arn
Nov 14, 2003, 01:47 PM
http://www.dailytunes.com/submit.php

It's up....

give it a shot

arn

weefle
Nov 14, 2003, 01:59 PM
Rock! Worked great for Dido (http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?playlistId=2903870&selectedItemId=2903789)!

Thanks for the incredibly quick work, and I'm really glad to see that you got the quotes fixed so easily.

Thanks again.

weefle

Mudbug
Nov 14, 2003, 03:10 PM
thanks weefle & arn -

my job just got easier :)
works great!

mike3k
Nov 14, 2003, 03:17 PM
It's awesome! I love it - it's so much easier to submit songs now!

weefle
Nov 14, 2003, 03:22 PM
No prob. I'm guessing that it's probably a lot easier on editors this way, too.

I'm super-glad to be of help.

Jetson
Nov 14, 2003, 05:42 PM
Happy to see DailyTunes making it easier on the user by automatically copying the album info from iTunes!

Kudos to weefle & arn.

Just one thing - Apple frequently mislabels the genre. I would like to be able to place the *correct* genre on my recommendation. I don't think it would cause ANY confusion for DailyTunes users (several others have also commented on Apple's rather lame cataloging efforts). Also the songs would be placed into the correct DailyTunes genre category.

My requests to have have the genre changed on a few songs have gotten no response so far.

jbembe
Nov 14, 2003, 06:54 PM
wow, that was fast.

p.s. it really irritates me that every Eric Clapton song is called rock when clearly he is a blues guitarist. But then I'm a fanatic.

Mudbug
Nov 15, 2003, 12:25 AM
Originally posted by Jetson
Just one thing - Apple frequently mislabels the genre. I would like to be able to place the *correct* genre on my recommendation. I don't think it would cause ANY confusion for DailyTunes users (several others have also commented on Apple's rather lame cataloging efforts). Also the songs would be placed into the correct DailyTunes genre category.

My requests to have have the genre changed on a few songs have gotten no response so far.

I don't think I've seen any "genre change" requests so far, unless you've done it by PM's to arn... Anyway - I see both sides of this arguement. I tend to agree with you - since we're compiling our own list, it should be the genre deemed most suitable by the listeners, not by Apple. If you know of some, by all means, send the error requests, or PM or IM me and I'll take care of it. :)

and a little FYI about the cataloging by Apple - as I understand it, Apple is just adding the already encoded songs/albums to the catalog, not ripping the songs themselves, so the genre of the piece is probably set by either the artist, or the label, and not by Apple. I also think the songs are genre'd by album, and not by individual track, so if that's the case, a rock track on a gospel album (just for example) would still get a "gospel" genre listing, even though it's clearly rock.