Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

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