|
@ -35,6 +35,7 @@ from .downloadmanager import ( |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
from .utils import ( |
|
|
from .utils import ( |
|
|
|
|
|
YOUTUBEDL_BIN, |
|
|
get_pixmaps_dir, |
|
|
get_pixmaps_dir, |
|
|
get_config_path, |
|
|
get_config_path, |
|
|
get_icon_file, |
|
|
get_icon_file, |
|
@ -227,6 +228,7 @@ class MainFrame(wx.Frame): |
|
|
|
|
|
|
|
|
statuslist_menu_data = ( |
|
|
statuslist_menu_data = ( |
|
|
(_("Get url"), self._on_geturl), |
|
|
(_("Get url"), self._on_geturl), |
|
|
|
|
|
(_("Get command"), self._on_getcmd) |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
# Create options frame |
|
|
# Create options frame |
|
@ -337,6 +339,23 @@ class MainFrame(wx.Frame): |
|
|
wx.TheClipboard.SetData(clipdata) |
|
|
wx.TheClipboard.SetData(clipdata) |
|
|
wx.TheClipboard.Close() |
|
|
wx.TheClipboard.Close() |
|
|
|
|
|
|
|
|
|
|
|
def _on_getcmd(self, event): |
|
|
|
|
|
selected = self._status_list.get_selected() |
|
|
|
|
|
|
|
|
|
|
|
if selected != -1: |
|
|
|
|
|
object_id = self._status_list.GetItemData(selected) |
|
|
|
|
|
download_item = self._download_list.get_item(object_id) |
|
|
|
|
|
|
|
|
|
|
|
cmd = [YOUTUBEDL_BIN] + download_item.options + [download_item.url] |
|
|
|
|
|
cmd = " ".join(cmd) |
|
|
|
|
|
|
|
|
|
|
|
if not wx.TheClipboard.IsOpened(): |
|
|
|
|
|
clipdata = wx.TextDataObject() |
|
|
|
|
|
clipdata.SetText(cmd) |
|
|
|
|
|
wx.TheClipboard.Open() |
|
|
|
|
|
wx.TheClipboard.SetData(clipdata) |
|
|
|
|
|
wx.TheClipboard.Close() |
|
|
|
|
|
|
|
|
def _on_timer(self, event): |
|
|
def _on_timer(self, event): |
|
|
msg = self.URL_REPORT_MSG.format(self.download_manager.active()) |
|
|
msg = self.URL_REPORT_MSG.format(self.download_manager.active()) |
|
|
self._status_bar_write(msg) |
|
|
self._status_bar_write(msg) |
|
|