New filetypes to publish on search

Technical discussion about the NMDC and <a href="http://dcpp.net/ADC.html">ADC</A> protocol. The NMDC protocol is documented in the <a href="http://dcpp.net/wiki/">Wiki</a>, so feel free to refer to it.

Moderator: Moderators

Locked
norti
Posts: 34
Joined: 2003-10-22 14:42
Location: Hungary
Contact:

New filetypes to publish on search

Post by norti » 2004-01-26 16:43

I did a "research" and found more filetypes and it would be great to use all or the most of them i dc++ :)

Code: Select all

// These ones we can look up as ints (4 bytes...)...

static const char* typeAudio[] = { ".mp3", ".mp2", ".mid", ".wav", ".ogg", ".wma", ".669", ".aac", ".aif", ".amf", ".ams", ".ape", ".dbm", ".dmf", ".dsm", ".far", ".mdl", ".med", ".mod", ".mol", ".mp1", ".mp4", ".mpa", ".mpc", ".mpp", ".mtm", ".nst", ".okt", ".psm", ".ptm", ".rmi", ".s3m", ".stm", ".ult", ".umx", ".wow" };
static const char* typeCompressed[] = { ".zip", ".ace", ".rar", ".arj", ".hqx", ".lha", ".sea", ".tar", ".tgz", ".uc2" };
static const char* typeIso[] = { ".bin", ".bwa", ".bwi", ".bws", ".bwt", ".ccd", ".cue", ".dmg", ".dmz", ".img", ".iso", ".mdf", ".mds", ".nrg", ".sub" };
static const char* typeDocument[] = { ".htm", ".doc", ".txt", ".nfo", ".pdf", ".chm" };
static const char* typeExecutable[] = { ".exe", ".com" };
static const char* typePicture[] = { ".jpg", ".gif", ".png", ".eps", ".img", ".pct", ".psp", ".pic", ".tif", ".rle", ".bmp", ".pcx", ".jpe", ".dcx", ".emf", ".ico", ".psd", ".tga", ".wmf", ".xif" };
static const char* typeVideo[] = { ".mpg", ".mov", ".asf", ".avi", ".pxp", ".wmv", ".ogm", ".m1v", ".m2v", ".mpe", ".mps", ".mpv", ".ram", ".vob" };

static const string type2Audio[] = { ".au", ".it", ".ra", ".xm", ".aiff", ".flac", ".midi", };
static const string type2Compressed[] = { ".gz" };
static const string type2Iso[] = { ".toast" };
static const string type2Picture[] = { ".ai", ".ps", ".pict", ".jpeg", ".tiff" };
static const string type2Video[] = { ".rm", ".divx", ".mpeg", ".mp1v", ".mp2v", ".mpv1", ".mpv2", ".qt", ".rv", ".vivo" };
Please note, that I added Iso type, which makes easy to search for full releases :)

Hope I wasn't boring anyone :D
.: Norti :.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-01-31 17:22

It's non-trivial to add another type category (CD Images)...

The list in DC++ isn't meant to be all inclusive, just the most popular file extensions that people share. As currently implemented, there's a performance penalty when creating your share list, because each extension must be checked against known types. That's one reason more extensions haven't been added in the past.

BSOD2600
Forum Moderator
Posts: 503
Joined: 2003-01-27 18:47
Location: USA
Contact:

Post by BSOD2600 » 2004-01-31 18:09

I'm sure its been asked before in some way...

But how about letting users select which files they want to be included for each search type. Either editing a xml file or having it somewhere in the GUI.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-01-31 18:39

Sure, if someone wanted to code that, it seems reasonable to have it included. Most users probably won't care, or want to edit a file. Is that level of customization necessary for most users?


The balancing point is that there are probably a non-zero number of hubs who might be interested in FLAC, SHN, etc. as extensions (from the next-most-recent post on this subject, IIRC). Should they need to mod DC++, or should default extensions cater to their specialized needs?

Gratch06
Posts: 141
Joined: 2003-05-25 01:48
Location: USA

Post by Gratch06 » 2004-01-31 22:31

MP3's now return as movie files. I like it =) Yet another way to avoid letting people download off of you, by filing everything as the wrong search type.

Locked