dir fixes

This commit is contained in:
dave 2020-10-05 23:24:11 -07:00
parent c910de0eb0
commit da53b4e153
1 changed files with 3 additions and 3 deletions

View File

@ -117,7 +117,7 @@ class PysonicSubsonicApi(object):
# artists just need this # artists just need this
response.add_child("directory", response.add_child("directory",
name=entity['name'], name=entity['name'],
id=entity['id']) id=entity['dir'])
if dirtype == "album": if dirtype == "album":
# albums can also have # albums can also have
@ -136,7 +136,7 @@ class PysonicSubsonicApi(object):
if childtype == "album": if childtype == "album":
moreargs.update(name=child["name"], moreargs.update(name=child["name"],
isDir="true", # TODO song files in artist dir isDir="true", # TODO song files in artist dir
parent=entity["id"], parent=entity["dir"],
id=child["dir"]) id=child["dir"])
if child["coverid"]: if child["coverid"]:
moreargs.update(coverArt=child["coverid"]) moreargs.update(coverArt=child["coverid"])
@ -417,7 +417,7 @@ class PysonicSubsonicApi(object):
artists = 0 artists = 0
for item in self.db.get_artists(name_contains=query): for item in self.db.get_artists(name_contains=query):
response.add_child("artist", _parent="searchResult2", id=item["id"], name=item["name"]) response.add_child("artist", _parent="searchResult2", id=item["dir"], name=item["name"])
artists += 1 artists += 1
if artists >= artistCount: if artists >= artistCount:
break break