Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
67693c6a
Commit
67693c6a
authored
Jan 26, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input/qobuz: add setting "format_id"
parent
fce061b5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
4 deletions
+29
-4
user.xml
doc/user.xml
+14
-0
QobuzClient.cxx
src/input/plugins/QobuzClient.cxx
+3
-1
QobuzClient.hxx
src/input/plugins/QobuzClient.hxx
+7
-1
QobuzInputPlugin.cxx
src/input/plugins/QobuzInputPlugin.cxx
+4
-1
QobuzTrackRequest.cxx
src/input/plugins/QobuzTrackRequest.cxx
+1
-1
No files found.
doc/user.xml
View file @
67693c6a
...
...
@@ -2429,6 +2429,20 @@ run</programlisting>
The Qobuz password.
</entry>
</row>
<row>
<entry>
<varname>
format_id
</varname>
<parameter>
N
</parameter>
</entry>
<entry>
The
<ulink
url=
"https://github.com/Qobuz/api-documentation/blob/master/endpoints/track/getFileUrl.md#parameters"
>
Qobuz
format identifier
</ulink>
, i.e. a number which
chooses the format and quality to be requested from
Qobuz. The default is "5" (320 kbit/s MP3).
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
...
...
src/input/plugins/QobuzClient.cxx
View file @
67693c6a
...
...
@@ -52,10 +52,12 @@ QobuzClient::QobuzClient(EventLoop &event_loop,
const
char
*
_app_id
,
const
char
*
_app_secret
,
const
char
*
_device_manufacturer_id
,
const
char
*
_username
,
const
char
*
_email
,
const
char
*
_password
)
const
char
*
_password
,
const
char
*
_format_id
)
:
base_url
(
_base_url
),
app_id
(
_app_id
),
app_secret
(
_app_secret
),
device_manufacturer_id
(
_device_manufacturer_id
),
username
(
_username
),
email
(
_email
),
password
(
_password
),
format_id
(
_format_id
),
curl
(
event_loop
),
defer_invoke_handlers
(
event_loop
,
BIND_THIS_METHOD
(
InvokeHandlers
))
{
...
...
src/input/plugins/QobuzClient.hxx
View file @
67693c6a
...
...
@@ -45,6 +45,7 @@ class QobuzClient final : QobuzLoginHandler {
const
char
*
const
app_id
,
*
const
app_secret
;
const
char
*
const
device_manufacturer_id
;
const
char
*
const
username
,
*
const
email
,
*
const
password
;
const
char
*
const
format_id
;
CurlInit
curl
;
...
...
@@ -72,7 +73,12 @@ public:
const
char
*
_app_id
,
const
char
*
_app_secret
,
const
char
*
_device_manufacturer_id
,
const
char
*
_username
,
const
char
*
_email
,
const
char
*
_password
);
const
char
*
_password
,
const
char
*
_format_id
);
const
char
*
GetFormatId
()
const
noexcept
{
return
format_id
;
}
gcc_pure
CurlGlobal
&
GetCurl
()
noexcept
;
...
...
src/input/plugins/QobuzInputPlugin.cxx
View file @
67693c6a
...
...
@@ -148,10 +148,13 @@ InitQobuzInput(EventLoop &event_loop, const ConfigBlock &block)
if
(
password
==
nullptr
)
throw
PluginUnavailable
(
"No Qobuz password configured"
);
const
char
*
format_id
=
block
.
GetBlockValue
(
"format_id"
,
"5"
);
qobuz_client
=
new
QobuzClient
(
event_loop
,
base_url
,
app_id
,
app_secret
,
device_manufacturer_id
,
username
,
email
,
password
);
username
,
email
,
password
,
format_id
);
}
static
void
...
...
src/input/plugins/QobuzTrackRequest.cxx
View file @
67693c6a
...
...
@@ -70,7 +70,7 @@ MakeTrackUrl(QobuzClient &client, const char *track_id)
return
client
.
MakeSignedUrl
(
"track"
,
"getFileUrl"
,
{
{
"track_id"
,
track_id
},
{
"format_id"
,
"5"
},
{
"format_id"
,
client
.
GetFormatId
()
},
});
}
...
...
Write
Preview
Markdown
is supported
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