diff options
| author | 2019-06-25 17:53:00 +0100 | |
|---|---|---|
| committer | 2019-06-25 17:53:00 +0100 | |
| commit | 12181bfec6c3219571d50779a21e649f23e2b030 (patch) | |
| tree | 957f74cce2eea46a53bd643e46d4e576012d4e2d /modules/title.py | |
| parent | catch and format "unknown record type" exceptions (diff) | |
| signature | ||
Add system to have multiple url shorteners and chose which to use
Diffstat (limited to 'modules/title.py')
| -rw-r--r-- | modules/title.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/title.py b/modules/title.py index 6e1e729e..7c32a0de 100644 --- a/modules/title.py +++ b/modules/title.py @@ -1,5 +1,6 @@ #--depends-on commands #--depends-on config +#--depends-on shorturl import hashlib, re, urllib.parse from src import EventManager, ModuleManager, utils @@ -40,8 +41,8 @@ class Module(ModuleManager.BaseModule): "\r", "").replace(" ", " ").strip() if channel.get_setting("title-shorten", False): - short_url = self.exports.get_one("shortlink", lambda x: x - )(url) + short_url = self.exports.get_one("shorturl")( + event["server"], url) return "%s - %s" % (title, short_url) return title else: |
