summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-09-03 22:52:19 +0200
committerCarl Hetherington <cth@carlh.net>2022-09-03 22:52:21 +0200
commit259dd8a083b987d2d154b12859cd90f7c8dcb607 (patch)
tree3a321bc542508d79b93105ca107bd0b6d68aa6de /src/lib
parent0a5d3c77247d3e68a144bfc077c29fbcf3819735 (diff)
Remove - and + from ratings before using them in a DCNC name.
I can't find any documentation about what we should do here, but at least this rule fits what https://registry-page.isdcf.com/ratings/ does.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/film.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc
index 37720025b..4e133a90d 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -973,7 +973,10 @@ Film::isdcf_name (bool if_created_now) const
if (_ratings.empty ()) {
d += "-NR";
} else {
- d += "-" + _ratings[0].label;
+ auto label = _ratings[0].label;
+ boost::erase_all(label, "+");
+ boost::erase_all(label, "-");
+ d += "-" + label;
}
}