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
44faf108
Commit
44faf108
authored
Sep 26, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SongFilter: search for album artist falls back to the artist tag
Implement Mantis ticket 0003646.
parent
e354c5c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
9 deletions
+22
-9
NEWS
NEWS
+1
-0
SongFilter.cxx
src/SongFilter.cxx
+21
-9
No files found.
NEWS
View file @
44faf108
...
@@ -3,6 +3,7 @@ ver 0.18 (2012/??/??)
...
@@ -3,6 +3,7 @@ ver 0.18 (2012/??/??)
- allow tilde paths for socket
- allow tilde paths for socket
* protocol:
* protocol:
- new command "toggleoutput"
- new command "toggleoutput"
- search for album artist falls back to the artist tag
* innput:
* innput:
- curl: enable https
- curl: enable https
- soup: plugin removed
- soup: plugin removed
...
...
src/SongFilter.cxx
View file @
44faf108
...
@@ -94,15 +94,27 @@ SongFilter::Item::Match(const Tag &_tag) const
...
@@ -94,15 +94,27 @@ SongFilter::Item::Match(const Tag &_tag) const
return
true
;
return
true
;
}
}
/** If the search critieron was not visited during the sweep
if
(
tag
<
TAG_NUM_OF_ITEM_TYPES
&&
!
visited_types
[
tag
])
{
* through the song's tag, it means this field is absent from
/* If the search critieron was not visited during the
* the tag or empty. Thus, if the searched string is also
sweep through the song's tag, it means this field
* empty (first char is a \0), then it's a match as well and
is absent from the tag or empty. Thus, if the
* we should return true.
searched string is also empty (first char is a \0),
*/
then it's a match as well and we should return
if
(
*
value
==
0
&&
tag
<
TAG_NUM_OF_ITEM_TYPES
&&
true. */
!
visited_types
[
tag
])
if
(
*
value
==
0
)
return
true
;
return
true
;
if
(
tag
==
TAG_ALBUM_ARTIST
&&
visited_types
[
TAG_ARTIST
])
{
/* if we're looking for "album artist", but
only "artist" exists, use that */
for
(
unsigned
i
=
0
;
i
<
_tag
.
num_items
;
i
++
)
{
const
TagItem
&
item
=
*
_tag
.
items
[
i
];
if
(
item
.
type
==
TAG_ARTIST
&&
StringMatch
(
item
.
value
))
return
true
;
}
}
}
return
false
;
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