limitphp Posted April 22, 2009 Share Posted April 22, 2009 My website will have clips of songs for people to listen to (45-60 seconds), kind of like itunes. I assume the best way is to have those clips stored as mp3s somewhere. o you think I should name the mp3 clips the songID.mp3? so they'd be: 1.mp3, 2.mp3, 89.mp3, etc.... or do you think I should use artistName_title.mp3 or something similar? I figure it doesn't matter what the clip name is, they'll see the id3 info or the title and artist info regardless in the tiny built-in flash player on the website. Using songID could simplify things. I don't have to worry about titles with wierd characters. Although I would have the songNameHash available to use. If I need to look up some song clips and delete them or something I could just use the database to pull up the songs I'm looking for and find the songIDs for them.... Anyone see a downside to using songID.mp3? Link to comment https://forums.phpfreaks.com/topic/155230-advice-for-naming-song-clips/ Share on other sites More sharing options...
ahs10 Posted April 22, 2009 Share Posted April 22, 2009 you found the downside.... you'd have to reference the songID to find something in the library. keep in mind you have two totally different tasks here. the first.... come up with a unique key to identify the items in your database. the method of using incremental integers will ALWAYS be the easiest way to do this. there is no end and it's easy to keep track of. the second.... devise a way to find what you a are looking for using the unique key. so this is where you could go another route using names instead of an integer. this method would make this task easier, just like integers make the first task easier. so long-winded way to say, decide for yourself, but my advice would be to consider everything before you sit down and weigh those options. will other people besides you be looking at this library directly? will/do these people need to identify song information from an id? will there be a fixed amount of songs in the library at all times? Link to comment https://forums.phpfreaks.com/topic/155230-advice-for-naming-song-clips/#findComment-816680 Share on other sites More sharing options...
limitphp Posted April 22, 2009 Author Share Posted April 22, 2009 thanks for the reply, ahs10.... I don't see any real reason why I would need to go in the song clips folder and do anything, other than - add songs as new artist sell their music on my site and - maybe occasionally replace a clip if it is messed up for some reason. Other than that, there's no reason for me to go in there. No one else will go in there unless my site grows and I need to hire someone to help me out to do the above tasks. The way i see me adding music to my site is like this: an artist gives me a CD. I rip and put in the ID3 info using LAME or something similar. I use a program that will make a short clip from the mp3. I'll rename the short mp3 clip to the appropriate name (songID.mp3) I assume whatever I use for the short mp3 clip names, it'll come from the database. The songIDs are already there, that's why it would be easy. I also store artistNameHash, and songNameHash, but I don't have any set rules for how I change the names. So far, I replace the spaces with a dash and single quotes with an underscore. Is the rawurlencode supposed to be used to create the hash names for you? If so, I need to update how the hashes are created. Link to comment https://forums.phpfreaks.com/topic/155230-advice-for-naming-song-clips/#findComment-816698 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.