Rename the functions to be more generic.
This commit is contained in:
parent
a37dfe5301
commit
8b8c59ee21
2 changed files with 3 additions and 3 deletions
|
@ -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 ""
|
||||
|
|
|
@ -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 = ""
|
||||
|
||||
|
|
Loading…
Reference in a new issue