|
|
| Welcome to the Mac Forums forums. Please read the FAQ if you have questions. Register to participate. |
|
|||||||
| TouchArcade.com - iPhone Game Reviews and News |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
macrumors newbie
Join Date: Oct 2003
|
C'mon, make it easy on the user!
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 |
|
|
|
|
#2 |
|
macrumors god
|
strong work.
will get on it... arn |
|
|
|
|
#3 | |
|
Thread Starter
macrumors newbie
Join Date: Oct 2003
|
Quote:
|
|
|
|
|
|
#4 | |
|
macrumors god
|
Quote:
http://phobos.apple.com/WebObjects/M...dItemId=459613 (see song name) arn |
|
|
|
|
|
#5 |
|
macrumors god
|
made the following changes...
lemme know if you think this will cause problems in other places: Code:
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);
}
|
|
|
|
|
#6 | |
|
Thread Starter
macrumors newbie
Join Date: Oct 2003
|
Quote:
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. |
|
|
|
|
|
#7 |
|
macrumors god
|
|
|
|
|
|
#9 |
|
macrumors god
|
thanks weefle & arn -
my job just got easier ![]() works great!
__________________
happy thankschrismahanakwaanzicasmasgiving.
|
|
|
|
|
#10 |
|
macrumors regular
|
It's awesome! I love it - it's so much easier to submit songs now!
|
|
|
|
|
#11 |
|
Thread Starter
macrumors newbie
Join Date: Oct 2003
|
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. |
|
|
|
|
#12 |
|
macrumors 6502
Join Date: Oct 2003
|
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. Last edited by Jetson : Nov 15, 2003 at 04:45 AM. |
|
|
|
|
#13 |
|
macrumors 6502a
Join Date: Jun 2003
Location: Baltimore, MD
|
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. |
|
|
|
|
#14 | |
|
macrumors god
|
Re: Great Work Guys!
Quote:
![]() 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.
__________________
happy thankschrismahanakwaanzicasmasgiving.
|
|
|
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|