Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

problems with keeping MP3 ID3 tags and file type with osc


rawben

Recommended Posts

I have been trying to set this cart up for a few days and I have almost everything setup the way I want. I have looked all day for how osc handles the mp3 download process. If I FTP the file directly to my machine all of the ID3 tags remain intact and the file will play the way it is supposed to.

 

When the same file downloads through osc cart it re associates the file type to something else (except sill has the .mp3 at the end of the file name) and it will not play in quicktime and must be forced to play in media player. When it starts playing it has none of the ID3 information that should be embedded into mp3's.

 

If anyone has a clue where I am going wrong please let me know. This is my first attempt at not only osc but any shopping cart as well so I expect I am doing something or not doing something pretty stupid.

Link to comment
Share on other sites

I have been trying to set this cart up for a few days and I have almost everything setup the way I want. I have looked all day for how osc handles the mp3 download process. If I FTP the file directly to my machine all of the ID3 tags remain intact and the file will play the way it is supposed to.

 

When the same file downloads through osc cart it re associates the file type to something else (except sill has the .mp3 at the end of the file name) and it will not play in quicktime and must be forced to play in media player. When it starts playing it has none of the ID3 information that should be embedded into mp3's.

 

If anyone has a clue where I am going wrong please let me know. This is my first attempt at not only osc but any shopping cart as well so I expect I am doing something or not doing something pretty stupid.

 

i'm not 100% certain this is your problem, but it's something you can try: check out the download.php file. in there, near the bottom, are a series of calls to the header() function. one of them looks like this: "header('Content-type: Application/octet-stream');" i'm not sure what the correct mime type name is for mp3 files (you'll have to that up yourself....) but if you specify that it's an mp3 mime type there you might get better results. but be sure that you check the name of the file that is to be downloaded and do an if/else so that other file types use the original Application/octet-stream setting. (just in case you want to allow other file types -- you don't want to end up specifying them all as mp3).

 

you could also try zipping the contents. but then your customers would have to unzip before they could use the file so you may not want to put them through that.

Link to comment
Share on other sites

Thank you so much for the fast reply.

 

header("Content-Type: audio/mpeg");

 

this is the code I now have in the download.php

 

I guess this helped but it did not really do too much.

 

Now it looks like an mp3 when I download it but quick time still will not recognize the file. Media player still says the extension does not match the file format etc and when I tell it to play anyway the tags are still not in the file?

Link to comment
Share on other sites

Thank you so much for the fast reply.

 

header("Content-Type: audio/mpeg");

 

this is the code I now have in the download.php

 

I guess this helped but it did not really do too much.

 

Now it looks like an mp3 when I download it but quick time still will not recognize the file. Media player still says the extension does not match the file format etc and when I tell it to play anyway the tags are still not in the file?

 

so you're saying that if you do a binary compare with the file that you download and the file that was uploaded, they're different? hmmm....not sure why that happens.

 

do you have a header("Content-disposition: attachment; filename=" ....); setting? i've made changes to my download.php file based on the super downloads contribution, and part of those changes were to the file name specified in the content-disposition. not sure if that'll make a difference for you, but you might want to check out that contribution if you haven't already. i've seen a number of recommendations for that for anyone doing downloads....

 

have you looked at some other sites that are doing this? maybe you can figure out what they're doing and copy them. :)

 

you might also look up what the application type is for quicktime. maybe "application/quicktime" or something like that will give your browser a little more to go on (i haven't looked, so this is just a guess). and speaking of browsers, have you tried this with both ie and firefox? are the files different between the two browsers? maybe researching that aspect will give you some other ideas.

Link to comment
Share on other sites

I have tried IE and Firefox and I am using two computers. I use both Web Browsers on Both Computers. I just implemented the Super Download store and I like parts of it but this did not fix the problem. If anything it made it a little worse which is probably due to my initial issue

 

The header section in the "download.php" file currently looks like the following:

 

// EOF Super Download Shop v1.1 mod

 

// Now send the file with header() magic

header("Expires: Mon, 26 Nov 1962 00:00:00 GMT");

header("Last-Modified: " . gmdate("D,d M Y H:i:s") . " GMT");

header("Cache-Control: no-cache, must-revalidate");

header("Pragma: no-cache");

header("Content-Type: audio/x-mpegurl");

// BOF Super Download Shop v1.1 mod

header("Content-disposition: attachment; filename=\"" . $file_name . "\"");

// EOF Super Download Shop v1.1 modike this

 

I changed the MIME Content heading to the m3u setting (I have tried the mp3 one as well) like earlier suggested. For some reason the file type is changing from what is on the webserver to what gets downloaded. I can download it Via FTP or web link not associated with osc and it is fine. One strange thing with the super download is that now quicktime AND media player will not play the file. Before media player could read it but not the id3 information. If anyone could let me know some stores using OSC that have MP3 downloads I might be able to contact them directly and see how they do things.

Link to comment
Share on other sites

OK Some one should really yell at me and call me an dumb ass. I pulled an ID-ten-T error for sure. I guess in the process of the super download store installation I failed (did not) implement some of the steps. REMEMBER TO READ AND FOLLOW THE DIRECTIONS.

 

I think my problems are fixed. I am sure I will run into others but thanks for the help (which it did)!!! :D

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...