Autoformat files.

Fix some lint warnings.
This commit is contained in:
Okonechnikov Vladimir
2020-02-17 22:24:39 +03:00
parent e73646d6bf
commit 06c0034c36
8 changed files with 192 additions and 171 deletions

View File

@ -1,7 +1,9 @@
#!/usr/bin/env python3
import wx
from deemix.app.functions import downloadTrack, getIDFromLink, getTypeFromLink
class MainFrame(wx.Frame):
def __init__(self):
super().__init__(parent=None, title='deemix')
@ -12,19 +14,19 @@ class MainFrame(wx.Frame):
self.text_ctrl = wx.TextCtrl(panel)
search_sizer.Add(self.text_ctrl, 1, wx.ALL, 5)
my_btn = wx.Button(panel, label='Download')
my_btn.Bind(wx.EVT_BUTTON, self.downloadTrack)
my_btn.Bind(wx.EVT_BUTTON, self.download_track)
search_sizer.Add(my_btn, 0, wx.ALL, 5)
panel.SetSizer(main_sizer)
self.Show()
def downloadTrack(self, event):
def download_track(self, event):
value = self.text_ctrl.GetValue()
if not value:
print("You didn't enter anything!")
return None
type = getTypeFromLink(value)
id = getIDFromLink(value,type)
id = getIDFromLink(value, type)
print(type, id)
if type == "track":
downloadTrack(id,9)
downloadTrack(id, 9)
self.text_ctrl.SetValue("")

View File

@ -1,2 +1,2 @@
#!/usr/bin/env python3
#Empty File
# Empty File