2022-11-17 Fred Gleason <fredg@paravelsystems.com>

* Simplified error return descriptions for the podcast methods in
	the Web API.
	* Removed the 'RDFeed::Error' enumeration.
	* Removed the 'RDFeed::errorString()' method.
	* Fixed bugs in rdcatchd(8) in handling errors when posting to
	RSS feeds.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2022-11-17 15:55:26 -05:00
parent 7beec8dba1
commit d33fae60a7
8 changed files with 194 additions and 108 deletions

View File

@@ -345,21 +345,17 @@ bool MainObject::RunUpload(CatchEvent *evt,QString *err_msg)
}
else { // Podcast upload
unsigned cast_id;
RDFeed::Error feed_err=RDFeed::ErrorOk;
RDFeed *feed=new RDFeed(evt->feedId(),rda->config(),this);
rda->syslog(LOG_INFO,"starting post of %s to feed \"%s\", id=%d",
evt->tempName().toUtf8().constData(),
feed->keyName().toUtf8().constData(),
evt->id());
if((cast_id=feed->postCut(evt->cutName(),&feed_err))==0) {
if((cast_id=feed->postCut(evt->cutName(),err_msg))==0) {
rda->syslog(LOG_WARNING,"post of %s to feed \"%s\" failed [%s], id=%d",
evt->cutName().toUtf8().constData(),
feed->keyName().toUtf8().constData(),
RDFeed::errorString(feed_err).toUtf8().constData(),
err_msg->toUtf8().constData(),
evt->id());
// WriteExitCode(batch_event,RDRecording::ServerError,
// RDFeed::errorString(feed_err));
delete feed;
return false;
}