Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jean-Francois Dockes
upmpdcli
Commits
57c49293
Commit
57c49293
authored
Nov 14, 2016
by
Jean-Francois Dockes
Browse files
Fix track album title not getting into directory contents
parent
0f838711
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/mediaserver/cdplugins/plgwithslave.cxx
View file @
57c49293
...
...
@@ -312,6 +312,7 @@ static int resultToEntries(const string& encoded, int stidx, int cnt,
JSONTOUPS
(
uri
,
uri
);
JSONTOUPS
(
artist
,
dc
:
creator
);
JSONTOUPS
(
genre
,
upnp
:
genre
);
JSONTOUPS
(
album
,
upnp
:
album
);
JSONTOUPS
(
tracknum
,
upnp
:
originalTrackNumber
);
JSONTOUPS
(
mime
,
res
:
mime
);
string
srate
=
decoded
[
i
].
get
(
"res:samplefreq"
,
""
).
asString
();
...
...
src/mediaserver/cdplugins/qobuz/session.py
View file @
57c49293
...
...
@@ -172,16 +172,19 @@ def _parse_playlist(json_obj, artist=None, artists=None):
return
Playlist
(
**
kwargs
)
def
_parse_track
(
json_obj
,
albumarg
=
None
):
album
=
None
if
'album'
in
json_obj
:
album
=
_parse_album
(
json_obj
[
'album'
],
artist
)
else
:
album
=
albumarg
if
'performer'
in
json_obj
:
artist
=
_parse_artist
(
json_obj
[
'performer'
])
elif
'artist'
in
json_obj
:
artist
=
_parse_artist
(
json_obj
[
'artist'
])
elif
'album'
in
json_obj
:
album
=
_parse_album
(
json_obj
[
'album'
])
elif
album
:
if
album
.
artist
:
artist
=
album
.
artist
elif
albumarg
:
artist
=
albumarg
.
artist
else
:
artist
=
Artist
()
...
...
@@ -198,10 +201,9 @@ def _parse_track(json_obj, albumarg = None):
'available'
:
available
#'artists': artists,
}
if
'album'
in
json_obj
:
kwargs
[
'album'
]
=
_parse_album
(
json_obj
[
'album'
],
artist
)
elif
albumarg
:
kwargs
[
'album'
]
=
albumarg
if
album
:
kwargs
[
'album'
]
=
album
return
Track
(
**
kwargs
)
...
...
src/upmpdutils.cxx
View file @
57c49293
...
...
@@ -158,6 +158,7 @@ string UpSong::didl()
}
else
{
UPNPXMLD
(
upnpClass
,
upnp
:
class
,
"object.item.audioItem.musicTrack"
);
UPNPXML
(
genre
,
upnp
:
genre
);
UPNPXML
(
album
,
upnp
:
album
);
UPNPXML
(
tracknum
,
upnp
:
originalTrackNumber
);
string
sfs
=
SoapHelp
::
i2s
((
samplefreq
==
0
?
44100
:
samplefreq
));
...
...
@@ -274,7 +275,7 @@ string didlmake(const UpSong& song)
// Bitrate keeps changing for VBRs and forces events. Keeping
// it out for now.
// << "bitrate=\"" << mpds.kbrate << "\" "
<<
"sampleFrequency=
\"
44100
\"
a
udioChannels=
\"
2
\"
"
<<
"sampleFrequency=
\"
44100
\"
nrA
udioChannels=
\"
2
\"
"
<<
"protocolInfo=
\"
http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000
\"
"
<<
">"
<<
SoapHelp
::
xmlQuote
(
song
.
uri
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment