aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar dngfx2018-09-23 10:23:12 +0100
committerGravatar dngfx2018-09-23 10:23:12 +0100
commit8b8c59ee213a4c006f90767fe379030d4a1e1524 (patch)
treecc8eaf27162cc8b9556fd872cf205075fb0d5284
parentRemove superfluous function. (diff)
signature
Rename the functions to be more generic.
-rw-r--r--modules/lastfm.py2
-rw-r--r--modules/youtube.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/lastfm.py b/modules/lastfm.py
index 0d6873a2..68b6249b 100644
--- a/modules/lastfm.py
+++ b/modules/lastfm.py
@@ -50,7 +50,7 @@ class Module(object):
ytquery = " - ".join([artist, track_name])
short_url = self.events.on(
- "get.youtubefromlastfm").call_for_result(
+ "get.searchyoutube").call_for_result(
query=ytquery)
short_url = " -- " + short_url if short_url else ""
diff --git a/modules/youtube.py b/modules/youtube.py
index 20dc072b..c70e9ef8 100644
--- a/modules/youtube.py
+++ b/modules/youtube.py
@@ -24,7 +24,7 @@ class Module(object):
help="Find a video on youtube", usage="[query]")
events.on("received.message.channel").hook(self.channel_message)
- events.on("get.youtubefromlastfm").hook(self.get_yt_from_lastfm)
+ events.on("get.searchyoutube").hook(self.search_video)
exports.add("channelset", {"setting": "auto-youtube",
"help": "Disable/Enable automatically getting info from "
@@ -65,7 +65,7 @@ class Module(object):
video_title, video_duration, video_uploader, "{:,}".format(
int(video_views)), video_opinions, URL_YOUTUBESHORT % video_id)
- def get_yt_from_lastfm(self, event):
+ def search_video(self, event):
search = event["query"]
video_id = ""