Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
4ee0a06e
Commit
4ee0a06e
authored
May 26, 2021
by
Max Kellermann
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v0.22.x'
parents
4f75eb9b
37757666
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
17 deletions
+66
-17
NEWS
NEWS
+4
-0
Walk.cxx
src/db/update/Walk.cxx
+48
-14
FfmpegMetaData.cxx
src/decoder/plugins/FfmpegMetaData.cxx
+14
-3
No files found.
NEWS
View file @
4ee0a06e
...
@@ -15,6 +15,10 @@ ver 0.23 (not yet released)
...
@@ -15,6 +15,10 @@ ver 0.23 (not yet released)
* new build-time dependency: libfmt
* new build-time dependency: libfmt
ver 0.22.9 (not yet released)
ver 0.22.9 (not yet released)
* database
- simple: load all .mpdignore files of all parent directories
* decoder
- ffmpeg: support the tags "sort_album", "album-sort", "artist-sort"
* Windows
* Windows
- fix build failure with SQLite
- fix build failure with SQLite
...
...
src/db/update/Walk.cxx
View file @
4ee0a06e
...
@@ -312,6 +312,29 @@ UpdateWalk::SkipSymlink(const Directory *directory,
...
@@ -312,6 +312,29 @@ UpdateWalk::SkipSymlink(const Directory *directory,
#endif
#endif
}
}
static
void
LoadExcludeListOrThrow
(
const
Storage
&
storage
,
const
Directory
&
directory
,
ExcludeList
&
exclude_list
)
{
Mutex
mutex
;
auto
is
=
InputStream
::
OpenReady
(
storage
.
MapUTF8
(
PathTraitsUTF8
::
Build
(
directory
.
GetPath
(),
".mpdignore"
)).
c_str
(),
mutex
);
exclude_list
.
Load
(
std
::
move
(
is
));
}
static
void
LoadExcludeListOrLog
(
const
Storage
&
storage
,
const
Directory
&
directory
,
ExcludeList
&
exclude_list
)
noexcept
{
try
{
LoadExcludeListOrThrow
(
storage
,
directory
,
exclude_list
);
}
catch
(...)
{
if
(
!
IsFileNotFound
(
std
::
current_exception
()))
LogError
(
std
::
current_exception
());
}
}
bool
bool
UpdateWalk
::
UpdateDirectory
(
Directory
&
directory
,
UpdateWalk
::
UpdateDirectory
(
Directory
&
directory
,
const
ExcludeList
&
exclude_list
,
const
ExcludeList
&
exclude_list
,
...
@@ -331,17 +354,7 @@ UpdateWalk::UpdateDirectory(Directory &directory,
...
@@ -331,17 +354,7 @@ UpdateWalk::UpdateDirectory(Directory &directory,
}
}
ExcludeList
child_exclude_list
(
exclude_list
);
ExcludeList
child_exclude_list
(
exclude_list
);
LoadExcludeListOrLog
(
storage
,
directory
,
child_exclude_list
);
try
{
Mutex
mutex
;
auto
is
=
InputStream
::
OpenReady
(
storage
.
MapUTF8
(
PathTraitsUTF8
::
Build
(
directory
.
GetPath
(),
".mpdignore"
)).
c_str
(),
mutex
);
child_exclude_list
.
Load
(
std
::
move
(
is
));
}
catch
(...)
{
if
(
!
IsFileNotFound
(
std
::
current_exception
()))
LogError
(
std
::
current_exception
());
}
if
(
!
child_exclude_list
.
IsEmpty
())
if
(
!
child_exclude_list
.
IsEmpty
())
RemoveExcludedFromDirectory
(
directory
,
child_exclude_list
);
RemoveExcludedFromDirectory
(
directory
,
child_exclude_list
);
...
@@ -445,6 +458,28 @@ UpdateWalk::DirectoryMakeUriParentChecked(Directory &root,
...
@@ -445,6 +458,28 @@ UpdateWalk::DirectoryMakeUriParentChecked(Directory &root,
return
directory
;
return
directory
;
}
}
static
void
LoadExcludeLists
(
std
::
forward_list
<
ExcludeList
>
&
lists
,
const
Storage
&
storage
,
const
Directory
&
directory
)
noexcept
{
assert
(
!
lists
.
empty
());
if
(
!
directory
.
IsRoot
())
LoadExcludeLists
(
lists
,
storage
,
*
directory
.
parent
);
lists
.
emplace_front
();
LoadExcludeListOrLog
(
storage
,
directory
,
lists
.
front
());
}
static
auto
LoadExcludeLists
(
const
Storage
&
storage
,
const
Directory
&
directory
)
noexcept
{
std
::
forward_list
<
ExcludeList
>
lists
;
lists
.
emplace_front
();
LoadExcludeLists
(
lists
,
storage
,
directory
);
return
lists
;
}
inline
void
inline
void
UpdateWalk
::
UpdateUri
(
Directory
&
root
,
const
char
*
uri
)
noexcept
UpdateWalk
::
UpdateUri
(
Directory
&
root
,
const
char
*
uri
)
noexcept
try
{
try
{
...
@@ -465,9 +500,8 @@ try {
...
@@ -465,9 +500,8 @@ try {
return
;
return
;
}
}
ExcludeList
exclude_list
;
const
auto
exclude_lists
=
LoadExcludeLists
(
storage
,
*
parent
);
UpdateDirectoryChild
(
*
parent
,
exclude_lists
.
front
(),
name
,
info
);
UpdateDirectoryChild
(
*
parent
,
exclude_list
,
name
,
info
);
}
catch
(...)
{
}
catch
(...)
{
LogError
(
std
::
current_exception
());
LogError
(
std
::
current_exception
());
}
}
...
...
src/decoder/plugins/FfmpegMetaData.cxx
View file @
4ee0a06e
...
@@ -30,11 +30,22 @@ extern "C" {
...
@@ -30,11 +30,22 @@ extern "C" {
#include <libavutil/dict.h>
#include <libavutil/dict.h>
}
}
/**
* FFmpeg specific tag name mappings, as supported by
* libavformat/id3v2.c, libavformat/mov.c and others.
*/
static
constexpr
struct
tag_table
ffmpeg_tags
[]
=
{
static
constexpr
struct
tag_table
ffmpeg_tags
[]
=
{
{
"year"
,
TAG_DATE
},
/* from libavformat/id3v2.c, libavformat/mov.c */
{
"author-sort"
,
TAG_ARTIST_SORT
},
{
"album_artist"
,
TAG_ALBUM_ARTIST
},
{
"album_artist"
,
TAG_ALBUM_ARTIST
},
{
"album_artist-sort"
,
TAG_ALBUM_ARTIST_SORT
},
/* from libavformat/id3v2.c */
{
"album-sort"
,
TAG_ALBUM_SORT
},
{
"artist-sort"
,
TAG_ARTIST_SORT
},
/* from libavformat/mov.c */
{
"sort_album_artist"
,
TAG_ALBUM_ARTIST_SORT
},
{
"sort_album"
,
TAG_ALBUM_SORT
},
{
"sort_artist"
,
TAG_ARTIST_SORT
},
/* sentinel */
/* sentinel */
{
nullptr
,
TAG_NUM_OF_ITEM_TYPES
}
{
nullptr
,
TAG_NUM_OF_ITEM_TYPES
}
...
...
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