+
+int eDVBMetaParser::updateMeta(const std::string &tsname)
+{
+ /* write meta file only if we have valid data. Note that we might convert recordings.epl data to .meta, which is fine. */
+ if (!m_data_ok)
+ return -1;
+ std::string filename = tsname + ".meta";
+ eServiceReference ref = m_ref;
+ ref.path = "";
+
+ FILE *f = fopen(filename.c_str(), "w");
+ if (!f)
+ return -ENOENT;
+ fprintf(f, "%s\n%s\n%s\n%d\n%s\n%d\n%lld\n%s\n", ref.toString().c_str(), m_name.c_str(), m_description.c_str(), m_time_create, m_tags.c_str(), m_length, m_filesize, m_service_data.c_str() );
+ fclose(f);
+ return 0;
+}