Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
medialibrary
Commits
92c06dc1
Commit
92c06dc1
authored
Oct 04, 2015
by
Hugo Beauzée-Luyssen
Browse files
MediaLibrary: Expose album listing
parent
05bffee7
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/IMediaLibrary.h
View file @
92c06dc1
...
...
@@ -67,6 +67,7 @@ class IMediaLibrary
virtual
std
::
vector
<
FilePtr
>
videoFiles
()
=
0
;
virtual
AlbumPtr
album
(
const
std
::
string
&
title
)
=
0
;
virtual
AlbumPtr
createAlbum
(
const
std
::
string
&
title
)
=
0
;
virtual
std
::
vector
<
AlbumPtr
>
albums
()
=
0
;
virtual
ShowPtr
show
(
const
std
::
string
&
name
)
=
0
;
virtual
ShowPtr
createShow
(
const
std
::
string
&
name
)
=
0
;
virtual
MoviePtr
movie
(
const
std
::
string
&
title
)
=
0
;
...
...
src/MediaLibrary.cpp
View file @
92c06dc1
...
...
@@ -215,6 +215,11 @@ AlbumPtr MediaLibrary::createAlbum(const std::string& title )
return
Album
::
create
(
m_dbConnection
,
title
);
}
std
::
vector
<
AlbumPtr
>
MediaLibrary
::
albums
()
{
return
Album
::
fetchAll
(
m_dbConnection
);
}
ShowPtr
MediaLibrary
::
show
(
const
std
::
string
&
name
)
{
static
const
std
::
string
req
=
"SELECT * FROM "
+
policy
::
ShowTable
::
Name
...
...
src/MediaLibrary.h
View file @
92c06dc1
...
...
@@ -35,6 +35,7 @@ class MediaLibrary : public IMediaLibrary, public IDiscovererCb
virtual
AlbumPtr
album
(
const
std
::
string
&
title
)
override
;
virtual
AlbumPtr
createAlbum
(
const
std
::
string
&
title
)
override
;
virtual
std
::
vector
<
AlbumPtr
>
albums
()
override
;
virtual
ShowPtr
show
(
const
std
::
string
&
name
)
override
;
virtual
ShowPtr
createShow
(
const
std
::
string
&
name
)
override
;
...
...
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