- QString basename = video->title();
- basename.replace('(', '[');
- basename.replace(')', ']');
- basename.replace('/', ' ');
- basename.replace('\\', ' ');
- basename.replace('<', ' ');
- basename.replace('>', ' ');
- basename.replace(':', ' ');
- basename.replace('"', ' ');
- basename.replace('|', ' ');
- basename.replace('?', ' ');
- basename.replace('*', ' ');
- basename = basename.simplified();
-
- if (!basename.isEmpty() && basename.at(0) == '.')
- basename = basename.mid(1).trimmed();
-
- if (basename.isEmpty()) basename = video->id();