Attached is an improved version of the patch I sent in yesterday. I can't see anything wrong with this one... Does this get to go in? Robert
Index: freeamp/plm/metadata/misc/misc.cpp =================================================================== RCS file: /src/repository/freeamp/plm/metadata/misc/misc.cpp,v retrieving revision 1.10 diff -c -r1.10 misc.cpp *** freeamp/plm/metadata/misc/misc.cpp 2000/07/31 19:51:39 1.10 --- freeamp/plm/metadata/misc/misc.cpp 2000/08/30 02:07:10 *************** *** 175,180 **** --- 175,208 ---- metadata->SetTitle("RTP Stream"); } + // do we need to come up with a track number? + if(!strncasecmp(url, "file://", 7) && !metadata->Track()) + { + char* temp = new char[strlen(url) + 1]; + + strcpy(temp, url); + + char* ext = strrchr(temp, '.'); + char* file = strrchr(temp, '/'); // these are all URLs so we don't need +DIR_MARKER + + if(ext) { + *ext = 0x00; + ext++; + } + + if(!file) + file = temp; + else + file++; + while(file && !isdigit(*file)) + file++; + + if(strlen(file)>4) + metadata->SetTrack(atoi(file)); + + delete [] temp; + } + // do we need to convert underscores? bool convertUnderscores = false;