aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 3339f56ec..4ace22c2f 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -218,6 +218,9 @@ def sanitize_filename(s, restricted=False):
while '__' in result:
result = result.replace('__', '_')
result = result.strip('_')
+ # Common case of "Foreign band name - English song title"
+ if restricted and result.startswith('-_'):
+ result = result[2:]
if not result:
result = '_'
return result