Commit eb1dcd1a authored by Urs Fleisch's avatar Urs Fleisch
Browse files

technical details (bitrate, codec, ...) for export and filter

parent d88c0e23
Sat Mar 14 12:43:56 CET 2009 Urs Fleisch <ufleisch@users.sourceforge.net>
Thu Apr 2 19:44:10 CEST 2009 Urs Fleisch <ufleisch@users.sourceforge.net>
* Release 1.2
......@@ -12,6 +12,8 @@ Sat Mar 14 12:43:56 CET 2009 Urs Fleisch <ufleisch@users.sourceforge.net>
+ Directory deb to generate Debian packages for KDE 4 and Qt 4 or
KDE 3 and Qt3.
+ Proxy authentication with Qt 4.
+ Display and editing of COMM, PRIV, UFID, MCDI and POPM frames.
+ Technical details (bitrate, codec, ...) for export and filter.
* Fixed:
+ Format replacements %c, %y, ... are replaced with empty
......
......@@ -2,7 +2,7 @@ kid3 (1.2-0) unstable; urgency=low
* New upstream release.
-- Urs Fleisch <ufleisch@users.sourceforge.net> Sat, 14 Mar 2009 12:43:47 +0100
-- Urs Fleisch <ufleisch@users.sourceforge.net> Thu, 02 Apr 2009 19:44:10 +0200
kid3 (1.1-1) unstable; urgency=low
......
......@@ -25,7 +25,7 @@
</copyright>
<legalnotice id="fdl-notice">&FDLNotice;</legalnotice>
<date>2009-03-14</date>
<date>2009-04-02</date>
<releaseinfo>1.2</releaseinfo>
<abstract>
......@@ -800,6 +800,20 @@ zusätzliche.
<listitem><para>%d %{duration} Dauer in Minuten:Sekunden</para></listitem>
<listitem><para>%D %{seconds} Dauer in Sekunden</para></listitem>
<listitem><para>%n %{tracks} Anzahl Tracks im Album</para></listitem>
<listitem><para>%e %{extension} Dateiendung</para></listitem>
<listitem><para>%O %{tag1} Das Format von Tag 1 (ID3v1.1 oder leer falls nicht
vorhanden)</para></listitem>
<listitem><para>%o %{tag2} Das Format von Tag 2 (ID3v2.3.0, ID3v2.4.0,
ID3v2.2.0, ID3v2.2.1, Vorbis, APE, MP4, oder leer falls nicht
vorhanden)</para></listitem>
<listitem><para>%b %{bitrate} Bitrate in kbit/s</para></listitem>
<listitem><para>%v %{vbr} VBR oder leer (nur für ID3v2.3 mit
id3lib)</para></listitem>
<listitem><para>%r %{samplerate} Samplerate in Hz</para></listitem>
<listitem><para>%m %{mode} Kanalmodus (Stereo oder Joint Stereo)</para></listitem>
<listitem><para>%h %{channels} Anzahl Kanäle (1 oder 2)</para></listitem>
<listitem><para>%k %{codec} Codec (z.B. MPEG 1 Layer 3, MP4, Ogg Vorbis, FLAC,
MPC)</para></listitem>
</itemizedlist>
<para>
......@@ -812,7 +826,8 @@ sollten in den Feldern keine Anführungszeichen vorkommen. "Extended M3U" und
"Extended PLS" erzeugen Stücklisten mit Zusatzinformationen und absoluten
Pfadnamen. "HTML" dient dazu, eine HTML-Seite mit verlinkten Tracks zu
erstellen. "Kover XML" generiert eine XML-Datei, welche vom
Cover-Druck-Programm Kover gelesen werden kann. "Custom Format" schließlich
Cover-Druck-Programm Kover gelesen werden kann. "Technical Details" liefert
Informationen über Bitrate, Samplerate, Kanäle, usw. "Custom Format" schließlich
ist frei für ein eigenes Format. Natürlich können auch die anderen Formate
beliebig angepasst werden, oder es können noch mehr Formate in der Datei
<filename>kid3rc</filename> im Konfigurationsverzeichnis hinzugefügt werden.
......@@ -1034,11 +1049,19 @@ und Exportieren verwendet werden.
<listitem><para>%f %{file} Dateiname (File name)</para></listitem>
<listitem><para>%p %{filepath} Absoluter Pfadname</para></listitem>
<listitem><para>%e %{extension} Dateiendung</para></listitem>
<listitem><para>%O %{tag1} Das Format von Tag 1(ID3v1.1 oder leer falls nicht
<listitem><para>%O %{tag1} Das Format von Tag 1 (ID3v1.1 oder leer falls nicht
vorhanden)</para></listitem>
<listitem><para>%o %{tag2} Das Format von Tag 2 (ID3v2.3.0, ID3v2.4.0,
ID3v2.2.0, ID3v2.2.1, Vorbis, APE, MP4, oder leer falls nicht
vorhanden)</para></listitem>
<listitem><para>%b %{bitrate} Bitrate in kbit/s</para></listitem>
<listitem><para>%v %{vbr} VBR oder leer (nur für ID3v2.3 mit
id3lib)</para></listitem>
<listitem><para>%r %{samplerate} Samplerate in Hz</para></listitem>
<listitem><para>%m %{mode} Kanalmodus (Stereo oder Joint Stereo)</para></listitem>
<listitem><para>%h %{channels} Anzahl Kanäle (1 oder 2)</para></listitem>
<listitem><para>%k %{codec} Codec (z.B. MPEG 1 Layer 3, MP4, Ogg Vorbis, FLAC,
MPC)</para></listitem>
<listitem><para>%1a %1{artist}, ... Der Präfix 1 wird benutzt, um Werte von Tag 1 zu
erhalten</para></listitem>
<listitem><para>%2a %2{artist}, ... Der Präfix 2 wird benutzt, um Werte von Tag 2 zu
......
......@@ -25,7 +25,7 @@
</copyright>
<legalnotice id="fdl-notice">&FDLNotice;</legalnotice>
<date>2009-03-14</date>
<date>2009-04-02</date>
<releaseinfo>1.2</releaseinfo>
<abstract>
......@@ -745,6 +745,19 @@ format, and the same codes are used plus some additional codes.
<listitem><para>%d %{duration} Duration in minutes:seconds</para></listitem>
<listitem><para>%D %{seconds} Duration in seconds</para></listitem>
<listitem><para>%n %{tracks} Number of tracks of the album</para></listitem>
<listitem><para>%e %{extension} File extension</para></listitem>
<listitem><para>%O %{tag1} The format of tag 1 (ID3v1.1 or empty if not
existing)</para></listitem>
<listitem><para>%o %{tag2} The format of tag 2 (ID3v2.3.0, ID3v2.4.0,
ID3v2.2.0, ID3v2.2.1, Vorbis, APE, MP4, or empty if not existing)</para></listitem>
<listitem><para>%b %{bitrate} Bitrate in kbit/s</para></listitem>
<listitem><para>%v %{vbr} VBR or empty (only for ID3v2.3 with
id3lib)</para></listitem>
<listitem><para>%r %{samplerate} Samplerate in Hz</para></listitem>
<listitem><para>%m %{mode} Channel mode (Stereo or Joint Stereo)</para></listitem>
<listitem><para>%h %{channels} Number of channels (1 or 2)</para></listitem>
<listitem><para>%k %{codec} Codec (e.g. MPEG 1 Layer 3, MP4, Ogg Vorbis, FLAC,
MPC)</para></listitem>
</itemizedlist>
<para>
......@@ -756,7 +769,8 @@ the fields shall not contain any double quotes when this format is used.
"Extended M3U" and "Extended PLS" generate playlists with extended attributes
and absolute path names. "HTML" can be used to generate an HTML page with
hyperlinks to the tracks. "Kover XML" creates a file which can be imported by
the cover printing program Kover. Finally, "Custom Format" is left empty for
the cover printing program Kover. "Technical Details" provides information
about bitrate, samplerate, channels, etc. Finally, "Custom Format" is left empty for
definition of a custom format. You can define more formats of your own by
adding lines in the file <filename>kid3rc</filename> in the configuration
directory. The other formats can be adapted to your needs.
......@@ -964,9 +978,17 @@ name format, import and export.
<listitem><para>%p %{filepath} Absolute path to file</para></listitem>
<listitem><para>%e %{extension} File extension</para></listitem>
<listitem><para>%O %{tag1} The format of tag 1 (ID3v1.1 or empty if not
existiing)</para></listitem>
existing)</para></listitem>
<listitem><para>%o %{tag2} The format of tag 2 (ID3v2.3.0, ID3v2.4.0,
ID3v2.2.0, ID3v2.2.1, Vorbis, APE, MP4, or empty if not existing)</para></listitem>
<listitem><para>%b %{bitrate} Bitrate in kbit/s</para></listitem>
<listitem><para>%v %{vbr} VBR or empty (only for ID3v2.3 with
id3lib)</para></listitem>
<listitem><para>%r %{samplerate} Samplerate in Hz</para></listitem>
<listitem><para>%m %{mode} Channel mode (Stereo or Joint Stereo)</para></listitem>
<listitem><para>%h %{channels} Number of channels (1 or 2)</para></listitem>
<listitem><para>%k %{codec} Codec (e.g. MPEG 1 Layer 3, MP4, Ogg Vorbis, FLAC,
MPC)</para></listitem>
<listitem><para>%1a %1{artist}, ... Use the prefix 1 to get values of tag 1</para></listitem>
<listitem><para>%2a %2{artist}, ... Use the prefix 2 to get values of tag 2</para></listitem>
</itemizedlist>
......
Begin4
Title: Kid3 -- Efficient Audio Tagger
Version: 1.2
Entered-date: 2009-03-14
Entered-date: 2009-04-02
Description: ID3 tagger to edit ID3v1.1, ID3v2.3, ID3v2.4, Ogg/Vorbis, FLAC
and MPC tags, multiple files, generate tags from file names
and vice versa, import and export album data in various formats.
......
......@@ -187,6 +187,9 @@ bool FileFilter::filter(TaggedFile& taggedFile, bool* ok)
taggedFile.getAllFramesV2(m_trackData2);
m_trackData12 = m_trackData2;
m_trackData12.merge(m_trackData1);
TaggedFile::DetailInfo info;
taggedFile.getDetailInfo(info);
m_trackData12.setDetailInfo(info);
bool result = parse();
if (m_parser.hasError()) {
......
......@@ -206,6 +206,11 @@ ImportConfig::ImportConfig(const QString& grp) :
m_exportFormatTracks.append(" <text><![CDATA[%{track}. %{title}]]></text>");
m_exportFormatTrailers.append(" </content>\\n</kover>");
m_exportFormatNames.append("Technical Details");
m_exportFormatHeaders.append("File\\tBitrate\\tVBR\\tDuration\\tSamplerate\\tChannels\\tMode\\tCodec");
m_exportFormatTracks.append("%{file}\\t%{bitrate}\\t%{vbr}\\t%{duration}\\t%{samplerate}\\t%{channels}\\t%{mode}\\t%{codec}");
m_exportFormatTrailers.append("");
m_exportFormatNames.append("Custom Format");
m_exportFormatHeaders.append("");
m_exportFormatTracks.append("");
......
......@@ -25,7 +25,6 @@
*/
#include "importtrackdata.h"
#include "taggedfile.h"
#include <qstring.h>
#include <qurl.h>
#include <qdir.h>
......@@ -82,7 +81,13 @@ QString TrackDataFormatReplacer::getReplacement(const QString& code) const
{ 'n', "tracks" },
{ 'e', "extension" },
{ 'O', "tag1" },
{ 'o', "tag2" }
{ 'o', "tag2" },
{ 'b', "bitrate" },
{ 'v', "vbr" },
{ 'r', "samplerate" },
{ 'm', "mode" },
{ 'h', "channels" },
{ 'k', "codec" }
};
#if QT_VERSION >= 0x040000
const char c = code[0].toLatin1();
......@@ -133,6 +138,28 @@ QString TrackDataFormatReplacer::getReplacement(const QString& code) const
result = m_trackData.getTagFormatV1();
} else if (name == "tag2") {
result = m_trackData.getTagFormatV2();
} else if (name == "bitrate") {
result.setNum(m_trackData.getDetailInfo().bitrate);
} else if (name == "vbr") {
result = m_trackData.getDetailInfo().vbr ? "VBR" : "";
} else if (name == "samplerate") {
result.setNum(m_trackData.getDetailInfo().sampleRate);
} else if (name == "mode") {
switch (m_trackData.getDetailInfo().channelMode) {
case TaggedFile::DetailInfo::CM_Stereo:
result = "Stereo";
break;
case TaggedFile::DetailInfo::CM_JointStereo:
result = "Joint Stereo";
break;
case TaggedFile::DetailInfo::CM_None:
default:
result = "";
}
} else if (name == "channels") {
result.setNum(m_trackData.getDetailInfo().channels);
} else if (name == "codec") {
result = m_trackData.getDetailInfo().format;
}
}
}
......@@ -190,6 +217,28 @@ QString TrackDataFormatReplacer::getToolTip(bool onlyRows)
str += QCM_translate("Tag 2");
str += "</td></tr>\n";
str += "<tr><td>%b</td><td>%{bitrate}</td><td>";
str += QCM_translate(I18N_NOOP("Bitrate"));
str += "</td></tr>\n";
str += "<tr><td>%v</td><td>%{vbr}</td><td>";
str += QCM_translate(I18N_NOOP("VBR"));
str += "</td></tr>\n";
str += "<tr><td>%r</td><td>%{samplerate}</td><td>";
str += QCM_translate(I18N_NOOP("Samplerate"));
str += "</td></tr>\n";
str += "<tr><td>%m</td><td>%{mode}</td><td>Stereo, Joint Stereo</td></tr>\n";
str += "<tr><td>%h</td><td>%{channels}</td><td>";
str += QCM_translate(I18N_NOOP("Channels"));
str += "</td></tr>\n";
str += "<tr><td>%k</td><td>%{codec}</td><td>";
str += QCM_translate(I18N_NOOP("Codec"));
str += "</td></tr>\n";
if (!onlyRows) str += "</table>\n";
return str;
}
......
......@@ -28,6 +28,7 @@
#define IMPORTTRACKDATA_H
#include "frame.h"
#include "taggedfile.h"
#include <qglobal.h>
#include "qtcompatmac.h"
#if QT_VERSION >= 0x040000
......@@ -141,6 +142,18 @@ public:
*/
void setTagFormatV2(const QString& tagFormatV2) { m_tagFormatV2 = tagFormatV2; }
/**
* Get detail info.
* @return detail info.
*/
const TaggedFile::DetailInfo& getDetailInfo() const { return m_detailInfo; }
/**
* Set detail info.
* @param detailInfo detail info
*/
void setDetailInfo(const TaggedFile::DetailInfo& detailInfo) { m_detailInfo = detailInfo; }
/**
* Format a string from track data.
* Supported format fields:
......@@ -186,6 +199,7 @@ private:
QString m_fileExtension;
QString m_tagFormatV1;
QString m_tagFormatV2;
TaggedFile::DetailInfo m_detailInfo;
};
/**
......
......@@ -2049,6 +2049,9 @@ void Kid3App::setExportData(int src)
trackData.setFileExtension(taggedFile->getFileExtension());
trackData.setTagFormatV1(taggedFile->getTagFormatV1());
trackData.setTagFormatV2(taggedFile->getTagFormatV2());
TaggedFile::DetailInfo info;
taggedFile->getDetailInfo(info);
trackData.setDetailInfo(info);
if (src == ExportDialog::SrcV1) {
taggedFile->getAllFramesV1(trackData);
} else {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment