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
73c95d1f
Commit
73c95d1f
authored
Jul 06, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TagFile: rename exported functions, use CamelCase
And specify whether generic tags are being scanned.
parent
2c30e163
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
10 deletions
+11
-10
SongUpdate.cxx
src/SongUpdate.cxx
+2
-2
TagFile.cxx
src/TagFile.cxx
+3
-3
TagFile.hxx
src/TagFile.hxx
+4
-3
FileCommands.cxx
src/command/FileCommands.cxx
+1
-1
EmbeddedCuePlaylistPlugin.cxx
src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx
+1
-1
No files found.
src/SongUpdate.cxx
View file @
73c95d1f
...
...
@@ -85,7 +85,7 @@ Song::UpdateFile(Storage &storage) noexcept
if
(
!
tag_stream_scan
(
absolute_uri
.
c_str
(),
tag_builder
))
return
false
;
}
else
{
if
(
!
tag_file_scan
(
path_fs
,
tag_builder
))
if
(
!
ScanFileTagsWithGeneric
(
path_fs
,
tag_builder
))
return
false
;
}
...
...
@@ -149,7 +149,7 @@ DetachedSong::LoadFile(Path path) noexcept
return
false
;
TagBuilder
tag_builder
;
if
(
!
tag_file_scan
(
path
,
tag_builder
))
if
(
!
ScanFileTagsWithGeneric
(
path
,
tag_builder
))
return
false
;
mtime
=
fi
.
GetModificationTime
();
...
...
src/TagFile.cxx
View file @
73c95d1f
...
...
@@ -81,7 +81,7 @@ public:
};
bool
tag_file_scan
(
Path
path_fs
,
TagHandler
&
handler
)
noexcept
ScanFileTagsNoGeneric
(
Path
path_fs
,
TagHandler
&
handler
)
noexcept
{
assert
(
!
path_fs
.
IsNull
());
...
...
@@ -100,11 +100,11 @@ tag_file_scan(Path path_fs, TagHandler &handler) noexcept
}
bool
tag_file_scan
(
Path
path
,
TagBuilder
&
builder
)
noexcept
ScanFileTagsWithGeneric
(
Path
path
,
TagBuilder
&
builder
)
noexcept
{
FullTagHandler
h
(
builder
);
if
(
!
tag_file_scan
(
path
,
h
))
if
(
!
ScanFileTagsNoGeneric
(
path
,
h
))
return
false
;
if
(
builder
.
empty
())
...
...
src/TagFile.hxx
View file @
73c95d1f
...
...
@@ -28,13 +28,14 @@ class TagBuilder;
/**
* Scan the tags of a song file. Invokes matching decoder plugins,
* but does not invoke the special "APE" and "ID3" scanners.
* but does not fall back to generic scanners (APE and ID3) if no tags
* were found (but the file was recognized).
*
* @return true if the file was recognized (even if no metadata was
* found)
*/
bool
tag_file_scan
(
Path
path
,
TagHandler
&
handler
)
noexcept
;
ScanFileTagsNoGeneric
(
Path
path
,
TagHandler
&
handler
)
noexcept
;
/**
* Scan the tags of a song file. Invokes matching decoder plugins,
...
...
@@ -45,6 +46,6 @@ tag_file_scan(Path path, TagHandler &handler) noexcept;
* found)
*/
bool
tag_file_scan
(
Path
path
,
TagBuilder
&
builder
)
noexcept
;
ScanFileTagsWithGeneric
(
Path
path
,
TagBuilder
&
builder
)
noexcept
;
#endif
src/command/FileCommands.cxx
View file @
73c95d1f
...
...
@@ -167,7 +167,7 @@ static CommandResult
read_file_comments
(
Response
&
r
,
const
Path
path_fs
)
{
PrintCommentHandler
h
(
r
);
if
(
!
tag_file_scan
(
path_fs
,
h
))
{
if
(
!
ScanFileTagsNoGeneric
(
path_fs
,
h
))
{
r
.
Error
(
ACK_ERROR_NO_EXIST
,
"Failed to load file"
);
return
CommandResult
::
ERROR
;
}
...
...
src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx
View file @
73c95d1f
...
...
@@ -99,7 +99,7 @@ embcue_playlist_open_uri(const char *uri,
const
auto
path_fs
=
AllocatedPath
::
FromUTF8Throw
(
uri
);
ExtractCuesheetTagHandler
extract_cuesheet
;
tag_file_scan
(
path_fs
,
extract_cuesheet
);
ScanFileTagsNoGeneric
(
path_fs
,
extract_cuesheet
);
if
(
extract_cuesheet
.
cuesheet
.
empty
())
ScanGenericTags
(
path_fs
,
extract_cuesheet
);
...
...
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