Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
medialibrary
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
21
Issues
21
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VideoLAN
medialibrary
Commits
740e21f5
Commit
740e21f5
authored
Dec 05, 2018
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Media: Account for IFile::Type::Disc when fetching/searching media
refs
#29
parent
2710ec29
Pipeline
#3269
passed with stages
in 12 minutes and 25 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
Media.cpp
src/Media.cpp
+8
-7
No files found.
src/Media.cpp
View file @
740e21f5
...
...
@@ -593,12 +593,12 @@ Query<IMedia> Media::listAll( MediaLibraryPtr ml, IMedia::Type type,
req
+=
addRequestJoin
(
params
,
true
,
false
);
req
+=
" WHERE m.type = ?"
" AND
f.type = ?
"
" AND
(f.type = ? OR f.type = ?)
"
" AND m.is_present != 0"
;
return
make_query
<
Media
,
IMedia
>
(
ml
,
"m.*"
,
std
::
move
(
req
),
sortRequest
(
params
),
type
,
IFile
::
Type
::
Main
);
sortRequest
(
params
),
type
,
IFile
::
Type
::
Main
,
IFile
::
Type
::
Disc
);
}
int64_t
Media
::
id
()
const
...
...
@@ -793,11 +793,11 @@ Query<IMedia> Media::search( MediaLibraryPtr ml, const std::string& title,
" m.id_media IN (SELECT rowid FROM "
+
Media
::
Table
::
Name
+
"Fts"
" WHERE "
+
Media
::
Table
::
Name
+
"Fts MATCH '*' || ? || '*')"
" AND m.is_present = 1"
" AND
f.type = ?
"
" AND
(f.type = ? OR f.type = ?)
"
" AND m.type != ? AND m.type != ?"
;
return
make_query
<
Media
,
IMedia
>
(
ml
,
"m.*"
,
std
::
move
(
req
),
sortRequest
(
params
),
title
,
File
::
Type
::
Main
,
File
::
Type
::
Main
,
File
::
Type
::
Disc
,
Media
::
Type
::
External
,
Media
::
Type
::
Stream
);
}
...
...
@@ -811,11 +811,12 @@ Query<IMedia> Media::search( MediaLibraryPtr ml, const std::string& title,
" m.id_media IN (SELECT rowid FROM "
+
Media
::
Table
::
Name
+
"Fts"
" WHERE "
+
Media
::
Table
::
Name
+
"Fts MATCH '*' || ? || '*')"
" AND m.is_present = 1"
" AND
f.type = ?
"
" AND
(f.type = ? OR f.type = ?)
"
" AND m.type = ?"
;
return
make_query
<
Media
,
IMedia
>
(
ml
,
"m.*"
,
std
::
move
(
req
),
sortRequest
(
params
),
title
,
File
::
Type
::
Main
,
type
);
File
::
Type
::
Main
,
File
::
Type
::
Disc
,
type
);
}
Query
<
IMedia
>
Media
::
searchAlbumTracks
(
MediaLibraryPtr
ml
,
const
std
::
string
&
pattern
,
int64_t
albumId
,
const
QueryParameters
*
params
)
...
...
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