2015-05-25 Carl Hetherington <cth@carlh.net>
+ * Block all but alphanumeric characters with a few bits
+ of punctuation from DCP names.
+
+ * Improve view of jobs in various ways.
+
* Increase the number of images that DCP-o-matic will
keep around in memory before resorting to pushing them
to disk.
-33a2bece96b7875134c99a2053a2fc59e828ae33
-b41b6528fbe0d270415a8500a612da19469e49e4
-c040b70eb777630ef0fdbb80cd419f6b3da4b46e
ea2becf3a859bc38c783d15f165d71f2ccb8c1d6
21cb435ed5eb250a7f94887ddd75f6b367ea231f
Multi-stream audio stuff.
string
Film::dcp_name (bool if_created_now) const
{
+ string unfiltered;
if (use_isdcf_name()) {
- return isdcf_name (if_created_now);
+ unfiltered = isdcf_name (if_created_now);
+ } else {
+ unfiltered = name ();
}
- return name();
+ /* Filter out `bad' characters which cause problems with some systems.
+ There's no apparent list of what really is allowed, so this is a guess.
+ */
+
+ string filtered;
+ string const allowed = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_";
+ for (size_t i = 0; i < unfiltered.size(); ++i) {
+ if (allowed.find (unfiltered[i]) != string::npos) {
+ filtered += unfiltered[i];
+ }
+ }
+
+ return filtered;
}
void