Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
c55da911
Commit
c55da911
authored
Dec 18, 2012
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taglib: ID3v2: save TrackTotal
parent
b74a7b1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
modules/meta_engine/taglib.cpp
modules/meta_engine/taglib.cpp
+28
-0
No files found.
modules/meta_engine/taglib.cpp
View file @
c55da911
...
@@ -715,6 +715,34 @@ static void WriteMetaToId3v2( ID3v2::Tag* tag, input_item_t* p_item )
...
@@ -715,6 +715,34 @@ static void WriteMetaToId3v2( ID3v2::Tag* tag, input_item_t* p_item )
WRITE
(
Publisher
,
"TPUB"
);
WRITE
(
Publisher
,
"TPUB"
);
#undef WRITE
#undef WRITE
/* Track Total as Custom Field */
psz_meta
=
input_item_GetTrackTotal
(
p_item
);
if
(
psz_meta
)
{
ID3v2
::
FrameList
list
=
tag
->
frameListMap
()[
"TXXX"
];
ID3v2
::
UserTextIdentificationFrame
*
p_txxx
;
for
(
ID3v2
::
FrameList
::
Iterator
iter
=
list
.
begin
();
iter
!=
list
.
end
();
iter
++
)
{
p_txxx
=
dynamic_cast
<
ID3v2
::
UserTextIdentificationFrame
*>
(
*
iter
);
if
(
!
p_txxx
)
continue
;
if
(
!
strcmp
(
p_txxx
->
description
().
toCString
(
true
),
"TRACKTOTAL"
)
)
{
p_txxx
->
setText
(
psz_meta
);
FREENULL
(
psz_meta
);
break
;
}
}
if
(
psz_meta
)
/* not found in existing custom fields */
{
ByteVector
p_byte
(
"TXXX"
,
4
);
p_txxx
=
new
ID3v2
::
UserTextIdentificationFrame
(
p_byte
);
p_txxx
->
setDescription
(
"TRACKTOTAL"
);
p_txxx
->
setText
(
psz_meta
);
free
(
psz_meta
);
tag
->
addFrame
(
p_txxx
);
}
}
/* Write album art */
/* Write album art */
char
*
psz_url
=
input_item_GetArtworkURL
(
p_item
);
char
*
psz_url
=
input_item_GetArtworkURL
(
p_item
);
...
...
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