def return_action_and_link_tuple_accdg_to_setting_wether_to_use_addon_for_youtube(self, video_id):
link_actn=''
link_=''
if video_id:
if use_addon_for_youtube:
link_actn=self.DI_ACTION_PLAYABLE
link_="plugin://plugin.video.youtube/play/?video_id=" + video_id
else:
link_actn=self.DI_ACTION_YTDL
#some youtube links take a VERY long time for youtube_dl to parse. we simplify it by getting the video id and using a simpler url
#BUT if there is a time skip code in the url, we just pass it right through. youtube-dl can handle this part.
# time skip code comes in the form of ?t=122 OR #t=1m45s OR ?t=2:43
link_=self.build_youtube_url_with_video_id(video_id)
#log(' returning:{0} {1}'.format(link_actn, link_))
return link_actn, link_
评论列表
文章目录