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
12b54949
Commit
12b54949
authored
Jul 29, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/proxy: implement Update()
parent
aa0f06d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
NEWS
NEWS
+1
-0
ProxyDatabasePlugin.cxx
src/db/plugins/ProxyDatabasePlugin.cxx
+19
-0
No files found.
NEWS
View file @
12b54949
...
...
@@ -9,6 +9,7 @@ ver 0.19 (not yet released)
- "list" and "count" allow grouping
* database
- proxy: forward "idle" events
- proxy: forward the "update" command
- proxy: copy "Last-Modified" from remote directories
- upnp: new plugin
- cancel the update on shutdown
...
...
src/db/plugins/ProxyDatabasePlugin.cxx
View file @
12b54949
...
...
@@ -120,6 +120,9 @@ public:
DatabaseStats
&
stats
,
Error
&
error
)
const
override
;
virtual
unsigned
Update
(
const
char
*
uri_utf8
,
bool
discard
,
Error
&
error
)
override
;
virtual
time_t
GetUpdateStamp
()
const
override
{
return
update_stamp
;
}
...
...
@@ -809,6 +812,22 @@ ProxyDatabase::GetStats(const DatabaseSelection &selection,
return
true
;
}
unsigned
ProxyDatabase
::
Update
(
const
char
*
uri_utf8
,
bool
discard
,
Error
&
error
)
{
if
(
!
EnsureConnected
(
error
))
return
0
;
unsigned
id
=
discard
?
mpd_run_rescan
(
connection
,
uri_utf8
)
:
mpd_run_update
(
connection
,
uri_utf8
);
if
(
id
==
0
)
CheckError
(
connection
,
error
);
return
id
;
}
const
DatabasePlugin
proxy_db_plugin
=
{
"proxy"
,
DatabasePlugin
::
FLAG_REQUIRE_STORAGE
,
...
...
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