From 6b8323b6f55614d56ff21048bb5ce99221f45bac Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 9 Oct 2019 12:58:25 +0100 Subject: [PATCH] also split auto-title words on `/` --- modules/title.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/title.py b/modules/title.py index b3692de3..73d8c162 100644 --- a/modules/title.py +++ b/modules/title.py @@ -5,6 +5,8 @@ import hashlib, re, urllib.parse from src import EventManager, ModuleManager, utils +RE_WORDSPLIT = re.compile("[\s/]") + @utils.export("channelset", utils.BoolSetting("auto-title", "Disable/Enable automatically getting info titles from URLs")) @utils.export("channelset", utils.BoolSetting("title-shorten", @@ -22,7 +24,7 @@ class Module(ModuleManager.BaseModule): def _different(self, url, title): url = url.lower() title_words = [] - for title_word in title.split(): + for title_word in RE_WORDSPLIT.split(title): if len(title_word) > 1 or title_word.isalpha(): title_words.append(title_word.lower())