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
b5c206d3
Commit
b5c206d3
authored
Feb 23, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tag/Generic: use common InputStream for APE and ID3
parent
17ace952
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
3 deletions
+21
-3
Generic.cxx
src/tag/Generic.cxx
+21
-3
No files found.
src/tag/Generic.cxx
View file @
b5c206d3
...
...
@@ -22,9 +22,15 @@
#include "TagId3.hxx"
#include "ApeTag.hxx"
#include "fs/Path.hxx"
#include "thread/Mutex.hxx"
#include "thread/Cond.hxx"
#include "input/InputStream.hxx"
#include "input/LocalOpen.hxx"
#include "Log.hxx"
#include "util/Error.hxx"
#include <stdexcept>
/**
* Attempts to scan APE or ID3 tags from the specified file.
*/
...
...
@@ -45,7 +51,19 @@ ScanGenericTags(InputStream &is, const TagHandler &handler, void *ctx)
*/
bool
ScanGenericTags
(
Path
path
,
const
TagHandler
&
handler
,
void
*
ctx
)
{
return
tag_ape_scan2
(
path
,
handler
,
ctx
)
||
tag_id3_scan
(
path
,
handler
,
ctx
);
try
{
Mutex
mutex
;
Cond
cond
;
Error
error
;
auto
is
=
OpenLocalInputStream
(
path
,
mutex
,
cond
,
error
);
if
(
!
is
)
{
LogError
(
error
);
return
false
;
}
return
ScanGenericTags
(
*
is
,
handler
,
ctx
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
return
false
;
}
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