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
ac1983ea
Commit
ac1983ea
authored
Jan 08, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tag/TagBuilder: rename Commit() to CommitNew()
parent
33c5fc95
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
23 additions
and
23 deletions
+23
-23
DespotifyUtils.cxx
src/DespotifyUtils.cxx
+1
-1
IcyMetaDataParser.cxx
src/IcyMetaDataParser.cxx
+1
-1
PlaylistTag.cxx
src/PlaylistTag.cxx
+2
-2
SongSave.cxx
src/SongSave.cxx
+1
-1
SongUpdate.cxx
src/SongUpdate.cxx
+3
-3
UpdateContainer.cxx
src/UpdateContainer.cxx
+1
-1
CueParser.cxx
src/cue/CueParser.cxx
+1
-1
ProxyDatabasePlugin.cxx
src/db/ProxyDatabasePlugin.cxx
+1
-1
VorbisComments.cxx
src/decoder/VorbisComments.cxx
+1
-1
CurlInputPlugin.cxx
src/input/CurlInputPlugin.cxx
+1
-1
AsxPlaylistPlugin.cxx
src/playlist/AsxPlaylistPlugin.cxx
+1
-1
ExtM3uPlaylistPlugin.cxx
src/playlist/ExtM3uPlaylistPlugin.cxx
+1
-1
PlsPlaylistPlugin.cxx
src/playlist/PlsPlaylistPlugin.cxx
+1
-1
RssPlaylistPlugin.cxx
src/playlist/RssPlaylistPlugin.cxx
+1
-1
SoundCloudPlaylistPlugin.cxx
src/playlist/SoundCloudPlaylistPlugin.cxx
+1
-1
XspfPlaylistPlugin.cxx
src/playlist/XspfPlaylistPlugin.cxx
+1
-1
Tag.cxx
src/tag/Tag.cxx
+1
-1
TagBuilder.cxx
src/tag/TagBuilder.cxx
+1
-1
TagBuilder.hxx
src/tag/TagBuilder.hxx
+1
-1
TagId3.cxx
src/tag/TagId3.cxx
+1
-1
No files found.
src/DespotifyUtils.cxx
View file @
ac1983ea
...
...
@@ -108,7 +108,7 @@ mpd_despotify_tag_from_track(struct ds_track *track)
tag
.
AddItem
(
TAG_COMMENT
,
comment
);
tag
.
SetTime
(
track
->
length
/
1000
);
return
tag
.
Commit
();
return
tag
.
Commit
New
();
}
struct
despotify_session
*
mpd_despotify_get_session
(
void
)
...
...
src/IcyMetaDataParser.cxx
View file @
ac1983ea
...
...
@@ -109,7 +109,7 @@ icy_parse_tag(const char *p)
g_strfreev
(
items
);
return
tag
.
Commit
();
return
tag
.
Commit
New
();
}
size_t
...
...
src/PlaylistTag.cxx
View file @
ac1983ea
...
...
@@ -56,7 +56,7 @@ playlist::AddSongIdTag(unsigned id, TagType tag_type, const char *value,
}
tag
.
AddItem
(
tag_type
,
value
);
song
.
tag
=
tag
.
Commit
();
song
.
tag
=
tag
.
Commit
New
();
queue
.
ModifyAtPosition
(
position
);
OnModified
();
...
...
@@ -91,7 +91,7 @@ playlist::ClearSongIdTag(unsigned id, TagType tag_type,
tag
.
RemoveAll
();
else
tag
.
RemoveType
(
tag_type
);
song
.
tag
=
tag
.
Commit
();
song
.
tag
=
tag
.
Commit
New
();
queue
.
ModifyAtPosition
(
position
);
OnModified
();
...
...
src/SongSave.cxx
View file @
ac1983ea
...
...
@@ -104,7 +104,7 @@ song_load(TextFile &file, Directory *parent, const char *uri,
}
if
(
tag
.
IsDefined
())
song
->
tag
=
tag
.
Commit
();
song
->
tag
=
tag
.
Commit
New
();
return
song
;
}
src/SongUpdate.cxx
View file @
ac1983ea
...
...
@@ -100,7 +100,7 @@ Song::UpdateFile()
mtime
=
st
.
st_mtime
;
delete
tag
;
tag
=
tag_builder
.
Commit
();
tag
=
tag_builder
.
Commit
New
();
return
true
;
}
...
...
@@ -129,7 +129,7 @@ Song::UpdateFileInArchive()
return
false
;
delete
tag
;
tag
=
tag_builder
.
Commit
();
tag
=
tag_builder
.
Commit
New
();
return
true
;
}
...
...
@@ -143,6 +143,6 @@ Song::UpdateStream()
return
false
;
delete
tag
;
tag
=
tag_builder
.
Commit
();
tag
=
tag_builder
.
Commit
New
();
return
true
;
}
src/UpdateContainer.cxx
View file @
ac1983ea
...
...
@@ -114,7 +114,7 @@ update_container_file(Directory &directory,
add_tag_handler
,
&
tag_builder
);
if
(
tag_builder
.
IsDefined
())
song
->
tag
=
tag_builder
.
Commit
();
song
->
tag
=
tag_builder
.
Commit
New
();
else
tag_builder
.
Clear
();
...
...
src/cue/CueParser.cxx
View file @
ac1983ea
...
...
@@ -170,7 +170,7 @@ CueParser::Commit()
return
;
assert
(
current
->
tag
==
nullptr
);
current
->
tag
=
song_tag
.
Commit
();
current
->
tag
=
song_tag
.
Commit
New
();
finished
=
previous
;
previous
=
current
;
...
...
src/db/ProxyDatabasePlugin.cxx
View file @
ac1983ea
...
...
@@ -406,7 +406,7 @@ Convert(const struct mpd_song *song)
for
(
const
auto
*
i
=
&
tag_table
[
0
];
i
->
d
!=
TAG_NUM_OF_ITEM_TYPES
;
++
i
)
Copy
(
tag
,
i
->
d
,
song
,
i
->
s
);
s
->
tag
=
tag
.
Commit
();
s
->
tag
=
tag
.
Commit
New
();
return
s
;
}
...
...
src/decoder/VorbisComments.cxx
View file @
ac1983ea
...
...
@@ -137,5 +137,5 @@ vorbis_comments_to_tag(char **comments)
vorbis_comments_scan
(
comments
,
&
add_tag_handler
,
&
tag_builder
);
return
tag_builder
.
IsEmpty
()
?
nullptr
:
tag_builder
.
Commit
();
:
tag_builder
.
Commit
New
();
}
src/input/CurlInputPlugin.cxx
View file @
ac1983ea
...
...
@@ -915,7 +915,7 @@ input_curl_headerfunction(void *ptr, size_t size, size_t nmemb, void *stream)
TagBuilder
tag_builder
;
tag_builder
.
AddItem
(
TAG_NAME
,
c
->
meta_name
.
c_str
());
c
->
tag
=
tag_builder
.
Commit
();
c
->
tag
=
tag_builder
.
Commit
New
();
}
else
if
(
StringEqualsCaseASCII
(
name
,
"icy-metaint"
))
{
char
buffer
[
64
];
size_t
icy_metaint
;
...
...
src/playlist/AsxPlaylistPlugin.cxx
View file @
ac1983ea
...
...
@@ -144,7 +144,7 @@ asx_end_element(gcc_unused GMarkupParseContext *context,
if
(
StringEqualsCaseASCII
(
element_name
,
"entry"
))
{
if
(
strcmp
(
parser
->
song
->
uri
,
"asx:"
)
!=
0
)
{
assert
(
parser
->
song
->
tag
==
nullptr
);
parser
->
song
->
tag
=
parser
->
tag_builder
.
Commit
();
parser
->
song
->
tag
=
parser
->
tag_builder
.
Commit
New
();
parser
->
songs
.
emplace_front
(
parser
->
song
);
}
else
parser
->
song
->
Free
();
...
...
src/playlist/ExtM3uPlaylistPlugin.cxx
View file @
ac1983ea
...
...
@@ -98,7 +98,7 @@ extm3u_parse_tag(const char *line)
if
(
*
name
!=
0
)
tag
.
AddItem
(
TAG_NAME
,
name
);
return
tag
.
Commit
();
return
tag
.
Commit
New
();
}
Song
*
...
...
src/playlist/PlsPlaylistPlugin.cxx
View file @
ac1983ea
...
...
@@ -100,7 +100,7 @@ pls_parser(GKeyFile *keyfile, std::forward_list<SongPointer> &songs)
if
(
error
)
g_error_free
(
error
);
error
=
nullptr
;
song
->
tag
=
tag
.
Commit
();
song
->
tag
=
tag
.
Commit
New
();
songs
.
emplace_front
(
song
);
num_entries
--
;
}
...
...
src/playlist/RssPlaylistPlugin.cxx
View file @
ac1983ea
...
...
@@ -142,7 +142,7 @@ rss_end_element(gcc_unused GMarkupParseContext *context,
if
(
StringEqualsCaseASCII
(
element_name
,
"item"
))
{
if
(
strcmp
(
parser
->
song
->
uri
,
"rss:"
)
!=
0
)
{
assert
(
parser
->
song
->
tag
==
nullptr
);
parser
->
song
->
tag
=
parser
->
tag_builder
.
Commit
();
parser
->
song
->
tag
=
parser
->
tag_builder
.
Commit
New
();
parser
->
songs
.
emplace_front
(
parser
->
song
);
}
else
parser
->
song
->
Free
();
...
...
src/playlist/SoundCloudPlaylistPlugin.cxx
View file @
ac1983ea
...
...
@@ -221,7 +221,7 @@ handle_end_map(void *ctx)
tag
.
SetTime
(
data
->
duration
/
1000
);
if
(
data
->
title
!=
nullptr
)
tag
.
AddItem
(
TAG_NAME
,
data
->
title
);
s
->
tag
=
tag
.
Commit
();
s
->
tag
=
tag
.
Commit
New
();
data
->
songs
.
emplace_front
(
s
);
...
...
src/playlist/XspfPlaylistPlugin.cxx
View file @
ac1983ea
...
...
@@ -151,7 +151,7 @@ xspf_end_element(gcc_unused GMarkupParseContext *context,
if
(
strcmp
(
element_name
,
"track"
)
==
0
)
{
if
(
parser
->
song
!=
nullptr
)
{
assert
(
parser
->
song
->
tag
==
nullptr
);
parser
->
song
->
tag
=
parser
->
tag_builder
.
Commit
();
parser
->
song
->
tag
=
parser
->
tag_builder
.
Commit
New
();
parser
->
songs
.
emplace_front
(
parser
->
song
);
}
...
...
src/tag/Tag.cxx
View file @
ac1983ea
...
...
@@ -94,7 +94,7 @@ Tag::Merge(const Tag &base, const Tag &add)
{
TagBuilder
builder
(
add
);
builder
.
Complement
(
base
);
return
builder
.
Commit
();
return
builder
.
Commit
New
();
}
Tag
*
...
...
src/tag/TagBuilder.cxx
View file @
ac1983ea
...
...
@@ -134,7 +134,7 @@ TagBuilder::Commit(Tag &tag)
}
Tag
*
TagBuilder
::
Commit
()
TagBuilder
::
Commit
New
()
{
Tag
*
tag
=
new
Tag
();
Commit
(
*
tag
);
...
...
src/tag/TagBuilder.hxx
View file @
ac1983ea
...
...
@@ -101,7 +101,7 @@ public:
* returned object is owned by the caller. This object is
* empty afterwards.
*/
Tag
*
Commit
();
Tag
*
Commit
New
();
void
SetTime
(
int
_time
)
{
time
=
_time
;
...
...
src/tag/TagId3.cxx
View file @
ac1983ea
...
...
@@ -370,7 +370,7 @@ tag_id3_import(struct id3_tag *tag)
scan_id3_tag
(
tag
,
&
add_tag_handler
,
&
tag_builder
);
return
tag_builder
.
IsEmpty
()
?
nullptr
:
tag_builder
.
Commit
();
:
tag_builder
.
Commit
New
();
}
static
size_t
...
...
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