Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
medialibrary
Commits
5fca29df
Commit
5fca29df
authored
Dec 29, 2015
by
Hugo Beauzée-Luyssen
Browse files
MediaLibrary: Move all blacklisting code to the Folder class
parent
176dae5a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Folder.cpp
View file @
5fca29df
...
...
@@ -112,6 +112,12 @@ std::shared_ptr<Folder> Folder::create( DBConnection connection, const std::stri
bool
Folder
::
blacklist
(
DBConnection
connection
,
const
std
::
string
&
fullPath
)
{
auto
f
=
fromPath
(
connection
,
fullPath
);
if
(
f
!=
nullptr
)
{
// Let the foreign key destroy everything beneath this folder
destroy
(
connection
,
f
->
id
()
);
}
auto
folderFs
=
FsFactory
->
createDirectory
(
fullPath
);
if
(
folderFs
==
nullptr
)
return
false
;
...
...
src/MediaLibrary.cpp
View file @
5fca29df
...
...
@@ -397,12 +397,6 @@ void MediaLibrary::discover( const std::string &entryPoint )
bool
MediaLibrary
::
ignoreFolder
(
const
std
::
string
&
path
)
{
auto
f
=
Folder
::
fromPath
(
m_dbConnection
.
get
(),
path
);
if
(
f
!=
nullptr
)
{
// Let the foreign key destroy everything beneath this folder
Folder
::
destroy
(
m_dbConnection
.
get
(),
f
->
id
()
);
}
return
Folder
::
blacklist
(
m_dbConnection
.
get
(),
path
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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