aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2019-10-09 12:58:25 +0100
committerGravatar jesopo2019-10-09 12:58:25 +0100
commit6b8323b6f55614d56ff21048bb5ce99221f45bac (patch)
tree0ab399fe6aa906e524d149dc1338f41a189a0bd3 /modules
parentwe should be catching `timer` as the output of self._timers.add (diff)
signature
also split auto-title words on `/`
Diffstat (limited to 'modules')
-rw-r--r--modules/title.py4
1 files changed, 3 insertions, 1 deletions
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())