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
1fb8c5a6
Commit
1fb8c5a6
authored
Jan 21, 2016
by
Hugo Beauzée-Luyssen
Browse files
Media: Expose subtype
parent
ea37516d
Changes
3
Show whitespace changes
Inline
Side-by-side
include/IMedia.h
View file @
1fb8c5a6
...
...
@@ -40,10 +40,19 @@ class IMedia
AudioType
,
UnknownType
};
enum
class
SubType
:
uint8_t
{
Unknown
,
ShowEpisode
,
Movie
,
AlbumTrack
,
};
virtual
~
IMedia
()
=
default
;
virtual
unsigned
int
id
()
const
=
0
;
virtual
Type
type
()
=
0
;
virtual
SubType
subType
()
const
=
0
;
virtual
const
std
::
string
&
title
()
const
=
0
;
virtual
AlbumTrackPtr
albumTrack
()
const
=
0
;
/**
...
...
src/Media.cpp
View file @
1fb8c5a6
...
...
@@ -310,6 +310,11 @@ IMedia::Type Media::type()
return
m_type
;
}
IMedia
::
SubType
Media
::
subType
()
const
{
return
m_subType
;
}
void
Media
::
setType
(
Type
type
)
{
if
(
m_type
!=
type
)
...
...
src/Media.h
View file @
1fb8c5a6
...
...
@@ -50,14 +50,6 @@ struct MediaTable
class
Media
:
public
IMedia
,
public
DatabaseHelpers
<
Media
,
policy
::
MediaTable
>
{
enum
class
SubType
:
uint8_t
{
Unknown
,
ShowEpisode
,
Movie
,
AlbumTrack
,
};
public:
// Those should be private, however the standard states that the expression
// ::new (pv) T(std::forward(args)...)
...
...
@@ -72,6 +64,7 @@ class Media : public IMedia, public DatabaseHelpers<Media, policy::MediaTable>
virtual
unsigned
int
id
()
const
override
;
virtual
Type
type
()
override
;
virtual
SubType
subType
()
const
override
;
void
setType
(
Type
type
);
virtual
const
std
::
string
&
title
()
const
override
;
void
setTitle
(
const
std
::
string
&
title
);
...
...
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