1*9a747e4fSDavid du ColombierCDDB SUBMISSION 2*9a747e4fSDavid du Colombier--------------- 3*9a747e4fSDavid du Colombier 4*9a747e4fSDavid du ColombierYour software may allow users to enter CDDB data and then submit them 5*9a747e4fSDavid du Colombierto the freedb archive. 6*9a747e4fSDavid du ColombierThere are two methods of submission: <a href="#email">via e-mail</a> or <a href="#http">via http</a> using submit.cgi 7*9a747e4fSDavid du Colombier 8*9a747e4fSDavid du Colombier<a name="email"></a>1. Submission via e-mail 9*9a747e4fSDavid du Colombier------------------------ 10*9a747e4fSDavid du Colombier 11*9a747e4fSDavid du ColombierYour software has to send the entry to the 12*9a747e4fSDavid du Colombierfollowing address: 13*9a747e4fSDavid du Colombier 14*9a747e4fSDavid du Colombier freedb-submit@freedb.org 15*9a747e4fSDavid du Colombier 16*9a747e4fSDavid du ColombierYou may implement a button or somesuch in your software's user-interface 17*9a747e4fSDavid du Colombierto facilitate this. The destination e-mail address should be made 18*9a747e4fSDavid du Colombieruser-configurable. 19*9a747e4fSDavid du Colombier 20*9a747e4fSDavid du ColombierThere should be one e-mail message per freedb entry. The mail Subject 21*9a747e4fSDavid du Colombierline should be in the form "cddb category discid". For example: 22*9a747e4fSDavid du Colombier 23*9a747e4fSDavid du ColombierSubject: cddb rock 850f970b 24*9a747e4fSDavid du Colombier 25*9a747e4fSDavid du ColombierThe body of the e-mail message should be in the format of a CDDB file 26*9a747e4fSDavid du Colombierentry as described <a href="http://freedb.freedb.org/software/old/DBFORMAT">here</a>. The messages should contain only 27*9a747e4fSDavid du Colombierplain ASCII text. Do not attach encoded information or add special 28*9a747e4fSDavid du Colombierescape sequences. 29*9a747e4fSDavid du Colombier 30*9a747e4fSDavid du ColombierNote that the disc ID specified in the mail Subject line should 31*9a747e4fSDavid du Colombieralso appear in the list of disc IDs in the DISCID= field of the 32*9a747e4fSDavid du ColombierCDDB file entry. If not, it is considered an error and the submission 33*9a747e4fSDavid du Colombierwill be rejected. 34*9a747e4fSDavid du Colombier 35*9a747e4fSDavid du ColombierYou should only allow categories that are currently supported by the 36*9a747e4fSDavid du Colombierfreedb (blues, classical, country, data, folk, jazz, misc, newage, 37*9a747e4fSDavid du Colombierreggae, rock, soundtrack). Submissions specifying unsupported 38*9a747e4fSDavid du Colombiercategories will be rejected. 39*9a747e4fSDavid du Colombier 40*9a747e4fSDavid du ColombierPlease do not allow a user to submit CD database entries that 41*9a747e4fSDavid du Colombierhave completely unfilled contents (i.e., blank information in the 42*9a747e4fSDavid du Colombierdisc artist/title as well as the track titles, or filled with 43*9a747e4fSDavid du Colombieruseless default information like "track 1", "track 2", etc.). 44*9a747e4fSDavid du ColombierWhile the current CD database server checks and rejects submissions 45*9a747e4fSDavid du Colombierthat have a blank DTITLE line, it doesn't (and can't feasibly) check 46*9a747e4fSDavid du Colombierthe track titles effectively, nor can it check any of these fields 47*9a747e4fSDavid du Colombierif they are filled with a default string. If it were, it would 48*9a747e4fSDavid du Colombierhave to be hacked to know about the default strings of every possible 49*9a747e4fSDavid du Colombierclient. 50*9a747e4fSDavid du Colombier 51*9a747e4fSDavid du ColombierThus, please design your client with this in mind. This is a somewhat 52*9a747e4fSDavid du Colombiertricky thing to do, as some CDs contain blank tracks with no titles 53*9a747e4fSDavid du Colombierand you need to allow for that. An example minimum requirement 54*9a747e4fSDavid du Colombierthat a CD player client should meet is listed below: 55*9a747e4fSDavid du Colombier 56*9a747e4fSDavid du Colombier1. Don't allow the "send" or "submit" feature to be activated if 57*9a747e4fSDavid du Colombier the CD database information form is not edited at all. 58*9a747e4fSDavid du Colombier2. Check that the disc artist/title contains something (that the user 59*9a747e4fSDavid du Colombier typed in). 60*9a747e4fSDavid du Colombier3. Check that all of the tracks have a title filled in by the user 61*9a747e4fSDavid du Colombier (some (but not all!) may be blank, but not the default string). 62*9a747e4fSDavid du Colombier 63*9a747e4fSDavid du ColombierThis should minimize the number of useless garbage being submitted 64*9a747e4fSDavid du Colombierinto the CD database. 65*9a747e4fSDavid du Colombier 66*9a747e4fSDavid du ColombierBefore you release your software, please be sure that it produces 67*9a747e4fSDavid du Colombiersubmissions that adheres to the CDDB file format, and that the frame 68*9a747e4fSDavid du Colombieroffset, disc length, and disc ID information are correctly computed. 69*9a747e4fSDavid du ColombierFor testing, please make your software send submissions to the 70*9a747e4fSDavid du Colombierfollowing e-mail address (rather than the real submission site at 71*9a747e4fSDavid du Colombierfreedb-submit@freedb.org): 72*9a747e4fSDavid du Colombier 73*9a747e4fSDavid du Colombier test-submit@freedb.org 74*9a747e4fSDavid du Colombier 75*9a747e4fSDavid du ColombierThe test address performs sanity checking on the CDDB submission and 76*9a747e4fSDavid du Colombiersends back pass/fail confirmation, but does not actually deposit the 77*9a747e4fSDavid du Colombierentry in the CD database. 78*9a747e4fSDavid du Colombier 79*9a747e4fSDavid du Colombier<a name="http"></a>2. Submission via http 80*9a747e4fSDavid du Colombier---------------------- 81*9a747e4fSDavid du Colombier 82*9a747e4fSDavid du ColombierFor submit via http, your application has to transmit the entry to the 83*9a747e4fSDavid du Colombierdatabase through a CGI program at the following URL: 84*9a747e4fSDavid du Colombier 85*9a747e4fSDavid du Colombierhttp://freedb.freedb.org/~cddb/submit.cgi 86*9a747e4fSDavid du Colombier 87*9a747e4fSDavid du ColombierSubmissions are made through the CGI program as follows. You must only use 88*9a747e4fSDavid du Colombierthe "POST" method of sending data; "GET" is not supported. There are several 89*9a747e4fSDavid du ColombierHTTP "Entity-Header" fields that must be included in the data followed by a 90*9a747e4fSDavid du Colombierblank line, followed by the "Entity-Body" (a.k.a the CDDB entry) in the 91*9a747e4fSDavid du Colombierformat described in Appendix B below. The required header fields are: 92*9a747e4fSDavid du Colombier 93*9a747e4fSDavid du ColombierCategory: CDDB_category 94*9a747e4fSDavid du ColombierDiscid: CDDB_discid 95*9a747e4fSDavid du ColombierUser-Email: user@domain 96*9a747e4fSDavid du ColombierSubmit-Mode: test_or_submit 97*9a747e4fSDavid du ColombierContent-Length: length_of_CDDB_entry 98*9a747e4fSDavid du Colombier 99*9a747e4fSDavid du ColombierWhere: 100*9a747e4fSDavid du Colombier 101*9a747e4fSDavid du Colombier- "CDDB_category" is one of the valid CDDB categories (blues, classical, 102*9a747e4fSDavid du Colombier country, data, folk, jazz, misc, newage, reggae, rock, soundtrack). 103*9a747e4fSDavid du Colombier Invalid categories will result in the entry being rejected. 104*9a747e4fSDavid du Colombier 105*9a747e4fSDavid du Colombier- "CDDB_discid" is the 8-digit hex CDDB disc ID of the entry as described in 106*9a747e4fSDavid du Colombier the "<a href="http://freedb.freedb.org/sections.php?op=viewarticle&artid=6">Discid howto</a>" section. This must be the same disc ID that appears 107*9a747e4fSDavid du Colombier in the "DISCID=" section of the entry being submitted. If not, the entry 108*9a747e4fSDavid du Colombier will be rejected. 109*9a747e4fSDavid du Colombier 110*9a747e4fSDavid du Colombier- "user@domain" is the valid email address of the user submitting the entry. 111*9a747e4fSDavid du Colombier This is required in case a submission failure notice must be sent to the 112*9a747e4fSDavid du Colombier user. 113*9a747e4fSDavid du Colombier 114*9a747e4fSDavid du Colombier- "test_or_submit" is the word "test" or "submit" (without the surrounding 115*9a747e4fSDavid du Colombier quotes) to indicate whether the submission is a test submission or a real 116*9a747e4fSDavid du Colombier submission to the database, respectively. See <a href="#testsubmission">below</a> for an explanation of 117*9a747e4fSDavid du Colombier test submissions. 118*9a747e4fSDavid du Colombier 119*9a747e4fSDavid du Colombier- "length_of_CDDB_entry" is the size in bytes of the CDDB entry being 120*9a747e4fSDavid du Colombier submitted. This number does not include the length of the header or the 121*9a747e4fSDavid du Colombier blank line separating the HTTP header and the CDDB entry. 122*9a747e4fSDavid du Colombier 123*9a747e4fSDavid du ColombierThere are several additional optional HTTP header fields that may also 124*9a747e4fSDavid du Colombierbe specified (but which are currently not used by the freedb): 125*9a747e4fSDavid du Colombier 126*9a747e4fSDavid du ColombierCharset: character_set_of_CDDB_entry 127*9a747e4fSDavid du ColombierX-Cddbd-Note: message for user 128*9a747e4fSDavid du Colombier 129*9a747e4fSDavid du ColombierWhere: 130*9a747e4fSDavid du Colombier 131*9a747e4fSDavid du Colombier- "character_set_of_CDDB_entry" is one of ISO-8859-1 or US-ASCII (lower case 132*9a747e4fSDavid du Colombier may be used if desired). This specifies to the CDDB server which character 133*9a747e4fSDavid du Colombier set the CDDB entry has been encoded in. If your application knows the 134*9a747e4fSDavid du Colombier user's character set, then you should specify it here. Only these two 135*9a747e4fSDavid du Colombier character sets are supported currently. DO NOT specify the character set 136*9a747e4fSDavid du Colombier if your application does not have any way of verifying the user's character 137*9a747e4fSDavid du Colombier set (i.e. do not guess; it's better not to specify it at all). 138*9a747e4fSDavid du Colombier 139*9a747e4fSDavid du Colombier- "message for user" is an arbitrary message to be included at the top of 140*9a747e4fSDavid du Colombier any rejection notice that may be sent to the submitting user. 141*9a747e4fSDavid du Colombier 142*9a747e4fSDavid du ColombierAn example submission showing the HTTP command, "Entity-Header" and "Entity- 143*9a747e4fSDavid du ColombierBody" follows: 144*9a747e4fSDavid du Colombier 145*9a747e4fSDavid du ColombierPOST /~cddb/submit.cgi HTTP/1.0 146*9a747e4fSDavid du ColombierCategory: rock 147*9a747e4fSDavid du ColombierDiscid: 2a09310a 148*9a747e4fSDavid du ColombierUser-Email: joe@joeshost.joesdomain.com 149*9a747e4fSDavid du ColombierSubmit-Mode: submit 150*9a747e4fSDavid du ColombierCharset: ISO-8859-1 151*9a747e4fSDavid du ColombierX-Cddbd-Note: Problems with Super CD Player? Send email to support@supercd.com. 152*9a747e4fSDavid du ColombierContent-Length: 820 153*9a747e4fSDavid du Colombier 154*9a747e4fSDavid du Colombier# xmcd 155*9a747e4fSDavid du Colombier# 156*9a747e4fSDavid du Colombier# Track frame offsets: 157*9a747e4fSDavid du Colombier[ data omitted in this example for brevity ] 158*9a747e4fSDavid du ColombierPLAYORDER= 159*9a747e4fSDavid du Colombier 160*9a747e4fSDavid du ColombierNote the blank line between the "Content-Length" header field and the 161*9a747e4fSDavid du Colombier"# xmcd" which marks the beginning of the CDDB entry. 162*9a747e4fSDavid du Colombier 163*9a747e4fSDavid du ColombierWhen your application submits an entry through the CGI program, it will 164*9a747e4fSDavid du Colombierrespond with a 3-digit response code indicating whether or not the entry has 165*9a747e4fSDavid du Colombierbeen forwarded to the freedb server for inclusion in the database, followed 166*9a747e4fSDavid du Colombierby a textual description of the response code. For example: 167*9a747e4fSDavid du Colombier 168*9a747e4fSDavid du Colombier200 OK, submission has been sent. 169*9a747e4fSDavid du Colombier400 Internal error: failed to forward submission. 170*9a747e4fSDavid du Colombier500 Missing required header information. 171*9a747e4fSDavid du Colombier 172*9a747e4fSDavid du ColombierThese are but a few of the possible responses. 173*9a747e4fSDavid du ColombierSee the description of the <a href="http://freedb.freedb.org/sections.php?op=viewarticle&artid=28">CDDB server protocol</a> for more information on 174*9a747e4fSDavid du Colombierhandling response codes. 175*9a747e4fSDavid du Colombier 176*9a747e4fSDavid du ColombierThe body of the freedb entry being submitted should be sent verbatim as 177*9a747e4fSDavid du Colombierdescribed in the <a href="http://freedb.freedb.org/software/old/DBFORMAT">database-format specification</a>. DO NOT encode the data in any 178*9a747e4fSDavid du Colombierway before transmitting it; data must be sent as raw text. For example, 179*9a747e4fSDavid du ColombierWindows programmers should not use the Windows URL encode function prior to 180*9a747e4fSDavid du Colombiercalling the submit CGI program. Doing so may lead to corrupt data being sent 181*9a747e4fSDavid du Colombierand also possibly to rejected submissions. 182*9a747e4fSDavid du Colombier 183*9a747e4fSDavid du ColombierYou may implement a button or somesuch in your software's user interface 184*9a747e4fSDavid du Colombierto initiate submissions. Rejected submissions are automatically returned 185*9a747e4fSDavid du Colombiervia email to the sender specified in the "User-Email" header field with an 186*9a747e4fSDavid du Colombierexplanation of the reason for the rejection. 187*9a747e4fSDavid du Colombier 188*9a747e4fSDavid du ColombierPlease do not allow a user to submit CD database entries that 189*9a747e4fSDavid du Colombierhave completely unfilled contents (i.e., blank information in the 190*9a747e4fSDavid du Colombierdisc artist/title as well as the track titles, or filled with 191*9a747e4fSDavid du Colombieruseless default information like "track 1", "track 2", etc.). 192*9a747e4fSDavid du ColombierWhile the current CD database server checks and rejects submissions 193*9a747e4fSDavid du Colombierthat have a blank DTITLE line, it doesn't (and can't feasibly) check 194*9a747e4fSDavid du Colombierthe track titles effectively, nor can it check any of these fields 195*9a747e4fSDavid du Colombierif they are filled with a default string. If it were, it would 196*9a747e4fSDavid du Colombierhave to be hacked to know about the default strings of every possible 197*9a747e4fSDavid du Colombierclient. 198*9a747e4fSDavid du Colombier 199*9a747e4fSDavid du ColombierThus, please design your client with this in mind. This is a somewhat 200*9a747e4fSDavid du Colombiertricky thing to do, as some CDs contain blank tracks with no titles 201*9a747e4fSDavid du Colombierand you need to allow for that. An example minimum requirement 202*9a747e4fSDavid du Colombierthat a CD player client should meet is listed below: 203*9a747e4fSDavid du Colombier 204*9a747e4fSDavid du Colombier1. Don't allow the "send" or "submit" feature to be activated if 205*9a747e4fSDavid du Colombier the CD database information form is not edited at all. 206*9a747e4fSDavid du Colombier2. Check that the disc artist/title contains something (that the user 207*9a747e4fSDavid du Colombier typed in). 208*9a747e4fSDavid du Colombier3. Check that all of the tracks have a title filled in by the user. 209*9a747e4fSDavid du Colombier (some (but not all!) may be blank, but not the default string). 210*9a747e4fSDavid du Colombier 211*9a747e4fSDavid du ColombierBefore you release your software, please be sure that it produces 212*9a747e4fSDavid du Colombiersubmissions that adhere to the CDDB file format, and that the frame 213*9a747e4fSDavid du Colombieroffset, disc length, and disc ID information are correctly computed. 214*9a747e4fSDavid du ColombierFor testing, please make your software send submissions with the 215*9a747e4fSDavid du Colombier"Submit-Mode" HTTP header field set to "test". 216*9a747e4fSDavid du Colombier 217*9a747e4fSDavid du Colombier<a name="testsubmission"></a>CDDB submissions sent in test mode will be sanity-checked by the freedb server 218*9a747e4fSDavid du Colombierand pass/fail confirmation sent back to the submitter, but will not actually 219*9a747e4fSDavid du Colombierbe deposited in the CD database. Please DO NOT send submisions in "submit" 220*9a747e4fSDavid du Colombiermode until you have tested your program with several different CD's. 221