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="")
password = string(default="")
quality=string(default="high")
include_albums = boolean(default=True)
include_compilations = boolean(default=True)
include_singles = boolean(default=True)
[[youtube]]
enabled = boolean(default=True)

View File

@ -64,19 +64,16 @@ class interface(base.baseInterface):
elif field == "artist":
data = []
artist = search_response.artists[0].id
if config.app["services"]["tidal"]["include_albums"]:
albums = self.session.get_artist_albums(artist)
for album in albums:
tracks = self.session.get_album_tracks(album.id)
for track in tracks:
data.append(track)
if config.app["services"]["tidal"]["include_compilations"]:
compilations = self.session.get_artist_albums_other(artist)
for album in compilations:
tracks = self.session.get_album_tracks(album.id)
for track in tracks:
data.append(track)
if config.app["services"]["tidal"]["include_singles"]:
singles = self.session.get_artist_albums_ep_singles(artist)
for album in singles:
tracks = self.session.get_album_tracks(album.id)
@ -136,6 +133,7 @@ class settings(base.baseSettings):
usernamebox.Add(self.username, 0, wx.ALL, 5)
sizer.Add(usernamebox, 0, wx.ALL, 5)
self.map.append(("username", self.username))
password = wx.StaticText(self, wx.NewId(), _("Password"))
self.password = wx.TextCtrl(self, wx.NewId(), style=wx.TE_PASSWORD)
passwordbox = wx.BoxSizer(wx.HORIZONTAL)
@ -156,14 +154,6 @@ class settings(base.baseSettings):
self.quality.GetValue = self.get_quality_value
self.quality.SetValue = self.set_quality_value
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)
def on_enabled(self, *args, **kwargs):