Revert "Added more settings in Tidal"

This reverts commit 207a7110ef.

Revert to the last commit so the integration of music player features needs to be done in another way.
This commit is contained in:
Manuel Cortez 2019-08-16 02:59:04 -05:00
parent adc1317401
commit 6a188b7ec7
2 changed files with 16 additions and 29 deletions

View File

@ -9,9 +9,6 @@ enabled = boolean(default=True)
username = string(default="") username = string(default="")
password = string(default="") password = string(default="")
quality=string(default="high") quality=string(default="high")
include_albums = boolean(default=True)
include_compilations = boolean(default=True)
include_singles = boolean(default=True)
[[youtube]] [[youtube]]
enabled = boolean(default=True) enabled = boolean(default=True)

View File

@ -64,24 +64,21 @@ class interface(base.baseInterface):
elif field == "artist": elif field == "artist":
data = [] data = []
artist = search_response.artists[0].id artist = search_response.artists[0].id
if config.app["services"]["tidal"]["include_albums"]: albums = self.session.get_artist_albums(artist)
albums = self.session.get_artist_albums(artist) for album in albums:
for album in albums: tracks = self.session.get_album_tracks(album.id)
tracks = self.session.get_album_tracks(album.id) for track in tracks:
for track in tracks: data.append(track)
data.append(track) compilations = self.session.get_artist_albums_other(artist)
if config.app["services"]["tidal"]["include_compilations"]: for album in compilations:
compilations = self.session.get_artist_albums_other(artist) tracks = self.session.get_album_tracks(album.id)
for album in compilations: for track in tracks:
tracks = self.session.get_album_tracks(album.id) data.append(track)
for track in tracks: singles = self.session.get_artist_albums_ep_singles(artist)
data.append(track) for album in singles:
if config.app["services"]["tidal"]["include_singles"]: tracks = self.session.get_album_tracks(album.id)
singles = self.session.get_artist_albums_ep_singles(artist) for track in tracks:
for album in singles: data.append(track)
tracks = self.session.get_album_tracks(album.id)
for track in tracks:
data.append(track)
for search_result in data: for search_result in data:
s = base.song(self) s = base.song(self)
s.title = search_result.name s.title = search_result.name
@ -136,6 +133,7 @@ class settings(base.baseSettings):
usernamebox.Add(self.username, 0, wx.ALL, 5) usernamebox.Add(self.username, 0, wx.ALL, 5)
sizer.Add(usernamebox, 0, wx.ALL, 5) sizer.Add(usernamebox, 0, wx.ALL, 5)
self.map.append(("username", self.username)) self.map.append(("username", self.username))
password = wx.StaticText(self, wx.NewId(), _("Password")) password = wx.StaticText(self, wx.NewId(), _("Password"))
self.password = wx.TextCtrl(self, wx.NewId(), style=wx.TE_PASSWORD) self.password = wx.TextCtrl(self, wx.NewId(), style=wx.TE_PASSWORD)
passwordbox = wx.BoxSizer(wx.HORIZONTAL) passwordbox = wx.BoxSizer(wx.HORIZONTAL)
@ -156,14 +154,6 @@ class settings(base.baseSettings):
self.quality.GetValue = self.get_quality_value self.quality.GetValue = self.get_quality_value
self.quality.SetValue = self.set_quality_value self.quality.SetValue = self.set_quality_value
self.map.append(("quality", self.quality)) self.map.append(("quality", self.quality))
include = wx.StaticBoxSizer(parent=self, orient=wx.HORIZONTAL, label=_("Search by artist"))
self.include_albums = wx.CheckBox(include.GetStaticBox(), wx.NewId(), _("Include albums"))
self.include_compilations = wx.CheckBox(include.GetStaticBox(), wx.NewId(), _("Include compilations"))
self.include_singles = wx.CheckBox(include.GetStaticBox(), wx.NewId(), _("Include singles"))
sizer.Add(include, 0, wx.ALL, 5)
self.map.append(("include_albums", self.include_albums))
self.map.append(("include_compilations", self.include_compilations))
self.map.append(("include_singles", self.include_singles))
self.SetSizer(sizer) self.SetSizer(sizer)
def on_enabled(self, *args, **kwargs): def on_enabled(self, *args, **kwargs):