Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
medialibrary
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
57
Issues
57
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VideoLAN
medialibrary
Commits
1fb13b82
Commit
1fb13b82
authored
May 11, 2020
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MediaGroup: Hide groups with no present media
refs
#251
parent
ce9b3496
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/MediaGroup.cpp
src/MediaGroup.cpp
+4
-2
No files found.
src/MediaGroup.cpp
View file @
1fb13b82
...
...
@@ -393,7 +393,8 @@ MediaGroup::fetchMatching( MediaLibraryPtr ml, const std::string& prefix )
Query
<
IMediaGroup
>
MediaGroup
::
listAll
(
MediaLibraryPtr
ml
,
const
QueryParameters
*
params
)
{
const
std
::
string
req
=
"FROM "
+
Table
::
Name
+
" mg"
;
const
std
::
string
req
=
"FROM "
+
Table
::
Name
+
" mg "
"WHERE nb_video > 0 OR nb_audio > 0 OR nb_unknown > 0"
;
return
make_query
<
MediaGroup
,
IMediaGroup
>
(
ml
,
"mg.*"
,
req
,
orderBy
(
params
)
);
}
...
...
@@ -402,7 +403,8 @@ Query<IMediaGroup> MediaGroup::search( MediaLibraryPtr ml, const std::string& pa
{
const
std
::
string
req
=
"FROM "
+
Table
::
Name
+
" mg"
" WHERE id_group IN (SELECT rowid FROM "
+
FtsTable
::
Name
+
" WHERE "
+
FtsTable
::
Name
+
" MATCH ?)"
;
" WHERE "
+
FtsTable
::
Name
+
" MATCH ?)"
" AND nb_video > 0 OR nb_audio > 0 OR nb_unknown > 0"
;
return
make_query
<
MediaGroup
,
IMediaGroup
>
(
ml
,
"mg.*"
,
req
,
orderBy
(
params
),
sqlite
::
Tools
::
sanitizePattern
(
pattern
)
);
}
...
...
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