mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-18 15:09:39 +02:00
2017-06-19 Fred Gleason <fredg@paravelsystems.com>
* Added a 'TITLE' field to the 'Import' web call.
This commit is contained in:
parent
108fd8c40c
commit
5a3a5015a5
@ -15849,3 +15849,5 @@
|
|||||||
'rdadmin/edit_settings.h'.
|
'rdadmin/edit_settings.h'.
|
||||||
* Modified the 'EditCart' web call to enforce the 'Auto-Correct
|
* Modified the 'EditCart' web call to enforce the 'Auto-Correct
|
||||||
Duplicate Cart Titles' setting.
|
Duplicate Cart Titles' setting.
|
||||||
|
2017-06-19 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Added a 'TITLE' field to the 'Import' web call.
|
||||||
|
@ -1729,7 +1729,9 @@
|
|||||||
<para>
|
<para>
|
||||||
A <computeroutput>404</computeroutput> error will be returned if the
|
A <computeroutput>404</computeroutput> error will be returned if the
|
||||||
requested cart is not authorized for the specified Rivendell user in
|
requested cart is not authorized for the specified Rivendell user in
|
||||||
RDAdmin->ManageUsers->AssignGroupPerms.
|
RDAdmin->ManageUsers->AssignGroupPerms or if the system is configured
|
||||||
|
to require unique titles and a non-unique title is provided in the
|
||||||
|
TITLE field.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
NOTE: The method must be called with 'multipart/form-data' encoding.
|
NOTE: The method must be called with 'multipart/form-data' encoding.
|
||||||
@ -1861,6 +1863,18 @@
|
|||||||
Optional
|
Optional
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>
|
||||||
|
TITLE
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
The TITLE value for the imported audio. This will override any
|
||||||
|
value found in in-file metadata.
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
Optional
|
||||||
|
</entry>
|
||||||
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>
|
<entry>
|
||||||
FILENAME
|
FILENAME
|
||||||
|
@ -74,6 +74,8 @@ void Xport::Import()
|
|||||||
}
|
}
|
||||||
QString group_name;
|
QString group_name;
|
||||||
xport_post->getValue("GROUP_NAME",&group_name);
|
xport_post->getValue("GROUP_NAME",&group_name);
|
||||||
|
QString title;
|
||||||
|
xport_post->getValue("TITLE",&title);
|
||||||
QString filename;
|
QString filename;
|
||||||
if(!xport_post->getValue("FILENAME",&filename)) {
|
if(!xport_post->getValue("FILENAME",&filename)) {
|
||||||
XmlExit("Missing FILENAME",400,"import.cpp",LINE_NUMBER);
|
XmlExit("Missing FILENAME",400,"import.cpp",LINE_NUMBER);
|
||||||
@ -107,6 +109,17 @@ void Xport::Import()
|
|||||||
XmlExit("Forbidden",404,"import.cpp",LINE_NUMBER);
|
XmlExit("Forbidden",404,"import.cpp",LINE_NUMBER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Verify Title Uniqueness
|
||||||
|
//
|
||||||
|
if(!title.isEmpty()) {
|
||||||
|
if((!xport_system->allowDuplicateCartTitles())&&
|
||||||
|
(!xport_system->fixDuplicateCartTitles())&&
|
||||||
|
(!RDCart::titleIsUnique(title))) {
|
||||||
|
XmlExit("Duplicate Cart Title Not Allowed",404,"import.cpp",LINE_NUMBER);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Load Configuration
|
// Load Configuration
|
||||||
//
|
//
|
||||||
@ -225,6 +238,9 @@ void Xport::Import()
|
|||||||
}
|
}
|
||||||
if(resp_code==200) {
|
if(resp_code==200) {
|
||||||
cut->setSha1Hash(RDSha1Hash(RDCut::pathName(cut->cutName())));
|
cut->setSha1Hash(RDSha1Hash(RDCut::pathName(cut->cutName())));
|
||||||
|
if(!title.isEmpty()) {
|
||||||
|
cart->setTitle(title);
|
||||||
|
}
|
||||||
printf("Content-type: application/xml\n");
|
printf("Content-type: application/xml\n");
|
||||||
printf("Status: %d\n",resp_code);
|
printf("Status: %d\n",resp_code);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
@ -50,6 +50,11 @@
|
|||||||
<td><input type="text" name="GROUP_NAME" size="20" maxlength="20"></td>
|
<td><input type="text" name="GROUP_NAME" size="20" maxlength="20"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right">TITLE:</td>
|
||||||
|
<td><input type="text" name="TITLE" size="40" maxlength="255"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td align="right">FILE:</td>
|
<td align="right">FILE:</td>
|
||||||
<td><input type="file" name="FILENAME" size="20" maxlength="64"></td>
|
<td><input type="file" name="FILENAME" size="20" maxlength="64"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user