Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Ewout ter Hoeven
VLC-Android
Commits
ed01335b
Commit
ed01335b
authored
May 31, 2016
by
Geoffrey Métais
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add saveSlave util method
parent
911cd4d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
vlc-android/src/org/videolan/vlc/media/MediaDatabase.java
vlc-android/src/org/videolan/vlc/media/MediaDatabase.java
+11
-8
No files found.
vlc-android/src/org/videolan/vlc/media/MediaDatabase.java
View file @
ed01335b
...
...
@@ -1343,15 +1343,18 @@ public class MediaDatabase {
* slaves management
*/
public
synchronized
void
saveSlave
(
String
mediaPath
,
int
type
,
int
priority
,
String
uriString
)
{
ContentValues
values
=
new
ContentValues
();
values
.
put
(
SLAVES_MEDIA_PATH
,
mediaPath
);
values
.
put
(
SLAVES_TYPE
,
type
);
values
.
put
(
SLAVES_PRIORITY
,
priority
);
values
.
put
(
SLAVES_URI
,
uriString
);
mDb
.
replace
(
SLAVES_TABLE_NAME
,
null
,
values
);
}
public
synchronized
void
saveSlaves
(
MediaWrapper
mw
)
{
for
(
Media
.
Slave
slave
:
mw
.
getSlaves
())
{
ContentValues
values
=
new
ContentValues
();
values
.
put
(
SLAVES_MEDIA_PATH
,
mw
.
getLocation
());
values
.
put
(
SLAVES_TYPE
,
slave
.
type
);
values
.
put
(
SLAVES_PRIORITY
,
slave
.
priority
);
values
.
put
(
SLAVES_URI
,
slave
.
uri
);
mDb
.
replace
(
SLAVES_TABLE_NAME
,
null
,
values
);
}
for
(
Media
.
Slave
slave
:
mw
.
getSlaves
())
saveSlave
(
mw
.
getLocation
(),
slave
.
type
,
slave
.
priority
,
slave
.
uri
);
}
public
synchronized
ArrayList
<
Media
.
Slave
>
getSlaves
(
String
mrl
)
{
...
...
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