Compare commits

...

3 Commits

Author SHA1 Message Date
Marius Lindvall db5c34ea96
Merge e9c09b1c40 into f76dbffa6b 2024-03-25 08:08:58 +01:00
Clementine Buildbot f76dbffa6b Automatic merge of translations from Transifex 2024-03-24 02:30:19 +00:00
Marius Lindvall e9c09b1c40
Fix usage of deprecated TagLib functions 2024-01-31 17:33:28 +01:00
4 changed files with 37 additions and 36 deletions

View File

@ -91,7 +91,7 @@ void CloudStream::Precache() {
clear();
}
TagLib::ByteVector CloudStream::readBlock(ulong length) {
TagLib::ByteVector CloudStream::readBlock(size_t length) {
const uint start = cursor_;
const uint end = qMin(cursor_ + length - 1, length_ - 1);
@ -144,11 +144,11 @@ void CloudStream::writeBlock(const TagLib::ByteVector&) {
qLog(Debug) << Q_FUNC_INFO << "not implemented";
}
void CloudStream::insert(const TagLib::ByteVector&, ulong, ulong) {
void CloudStream::insert(const TagLib::ByteVector&, TagLib::offset_t, size_t) {
qLog(Debug) << Q_FUNC_INFO << "not implemented";
}
void CloudStream::removeBlock(ulong, ulong) {
void CloudStream::removeBlock(TagLib::offset_t, size_t) {
qLog(Debug) << Q_FUNC_INFO << "not implemented";
}
@ -159,7 +159,7 @@ bool CloudStream::readOnly() const {
bool CloudStream::isOpen() const { return true; }
void CloudStream::seek(long offset, TagLib::IOStream::Position p) {
void CloudStream::seek(TagLib::offset_t offset, TagLib::IOStream::Position p) {
switch (p) {
case TagLib::IOStream::Beginning:
cursor_ = offset;
@ -178,11 +178,11 @@ void CloudStream::seek(long offset, TagLib::IOStream::Position p) {
void CloudStream::clear() { cursor_ = 0; }
long CloudStream::tell() const { return cursor_; }
TagLib::offset_t CloudStream::tell() const { return cursor_; }
long CloudStream::length() { return length_; }
TagLib::offset_t CloudStream::length() { return length_; }
void CloudStream::truncate(long) {
void CloudStream::truncate(TagLib::offset_t) {
qLog(Debug) << Q_FUNC_INFO << "not implemented";
}

View File

@ -35,17 +35,17 @@ class CloudStream : public QObject, public TagLib::IOStream {
// Taglib::IOStream
virtual TagLib::FileName name() const;
virtual TagLib::ByteVector readBlock(ulong length);
virtual TagLib::ByteVector readBlock(size_t length);
virtual void writeBlock(const TagLib::ByteVector&);
virtual void insert(const TagLib::ByteVector&, ulong, ulong);
virtual void removeBlock(ulong, ulong);
virtual void insert(const TagLib::ByteVector&, TagLib::offset_t, size_t);
virtual void removeBlock(TagLib::offset_t, size_t);
virtual bool readOnly() const;
virtual bool isOpen() const;
virtual void seek(long offset, TagLib::IOStream::Position p);
virtual void seek(TagLib::offset_t offset, TagLib::IOStream::Position p);
virtual void clear();
virtual long tell() const;
virtual long length();
virtual void truncate(long);
virtual TagLib::offset_t tell() const;
virtual TagLib::offset_t length();
virtual void truncate(TagLib::offset_t);
google::sparsetable<char>::size_type cached_bytes() const {
return cache_.num_nonempty();

View File

@ -198,7 +198,7 @@ void TagReader::ReadFile(const QString& filename,
// Find album artists
TagLib::APE::ItemListMap::ConstIterator it = items.find("ALBUM ARTIST");
if (it != items.end()) {
TagLib::StringList album_artists = it->second.toStringList();
TagLib::StringList album_artists = it->second.values();
if (!album_artists.isEmpty()) {
Decode(album_artists.front(), nullptr, song->mutable_albumartist());
}
@ -243,22 +243,22 @@ void TagReader::ReadFile(const QString& filename,
}
if (items.contains("BPM")) {
Decode(items["BPM"].toStringList().toString(", "), nullptr,
Decode(items["BPM"].values().toString(", "), nullptr,
song->mutable_performer());
}
if (items.contains("PERFORMER")) {
Decode(items["PERFORMER"].toStringList().toString(", "), nullptr,
Decode(items["PERFORMER"].values().toString(", "), nullptr,
song->mutable_performer());
}
if (items.contains("COMPOSER")) {
Decode(items["COMPOSER"].toStringList().toString(", "), nullptr,
Decode(items["COMPOSER"].values().toString(", "), nullptr,
song->mutable_composer());
}
if (items.contains("GROUPING")) {
Decode(items["GROUPING"].toStringList().toString(" "), nullptr,
Decode(items["GROUPING"].values().toString(" "), nullptr,
song->mutable_grouping());
}
@ -565,8 +565,8 @@ void TagReader::ReadFile(const QString& filename,
if (fileref->audioProperties()) {
song->set_bitrate(fileref->audioProperties()->bitrate());
song->set_samplerate(fileref->audioProperties()->sampleRate());
song->set_length_nanosec(fileref->audioProperties()->length() *
kNsecPerSec);
song->set_length_nanosec(fileref->audioProperties()->lengthInMilliseconds() *
kNsecPerMsec);
}
// Get the filetype if we can
@ -1376,9 +1376,9 @@ bool TagReader::ReadCloudFile(const QUrl& download_url, const QString& title,
std::unique_ptr<TagLib::File> tag;
if (mime_type == "audio/mpeg" &&
title.endsWith(".mp3", Qt::CaseInsensitive)) {
tag.reset(new TagLib::MPEG::File(stream.get(),
TagLib::ID3v2::FrameFactory::instance(),
TagLib::AudioProperties::Accurate));
tag.reset(new TagLib::MPEG::File(stream.get(), true,
TagLib::AudioProperties::Accurate,
TagLib::ID3v2::FrameFactory::instance()));
} else if (mime_type == "audio/mp4" ||
(mime_type == "audio/mpeg" &&
title.endsWith(".m4a", Qt::CaseInsensitive))) {
@ -1398,9 +1398,9 @@ bool TagReader::ReadCloudFile(const QUrl& download_url, const QString& title,
TagLib::AudioProperties::Accurate));
} else if (mime_type == "application/x-flac" || mime_type == "audio/flac" ||
mime_type == "audio/x-flac") {
tag.reset(new TagLib::FLAC::File(stream.get(),
TagLib::ID3v2::FrameFactory::instance(),
true, TagLib::AudioProperties::Accurate));
tag.reset(new TagLib::FLAC::File(stream.get(), true,
TagLib::AudioProperties::Accurate,
TagLib::ID3v2::FrameFactory::instance()));
} else if (mime_type == "audio/x-ms-wma") {
tag.reset(new TagLib::ASF::File(stream.get(), true,
TagLib::AudioProperties::Accurate));
@ -1431,7 +1431,7 @@ bool TagReader::ReadCloudFile(const QUrl& download_url, const QString& title,
song->set_type(cpb::tagreader::SongMetadata_Type_STREAM);
if (tag->audioProperties()) {
song->set_length_nanosec(tag->audioProperties()->length() * kNsecPerSec);
song->set_length_nanosec(tag->audioProperties()->lengthInMilliseconds() * kNsecPerMsec);
}
return true;
}

View File

@ -42,6 +42,7 @@
# Martin Brodbeck <martin@brodbeck-online.de>, 2013
# Martin Herkt <lachs0r@hong-mailing.de>, 2011
# Martin Herkt <luck3r@phicode.de>, 2010
# Michael Kohler, 2024
# MCMicS, 2020
# Mohamed Sakhri, 2013
# Mohamed Sakhri, 2013
@ -70,7 +71,7 @@ msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-04-09 10:24+0000\n"
"PO-Revision-Date: 2011-10-27 18:53+0000\n"
"Last-Translator: 6543 <6543@obermui.de>, 2020\n"
"Last-Translator: Michael Kohler, 2024\n"
"Language-Team: German (http://app.transifex.com/davidsansome/clementine/language/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -219,7 +220,7 @@ msgid "1 track"
msgstr "1 Titel"
msgid "128K MP3"
msgstr ""
msgstr "128K MP3"
msgid "128k MP3"
msgstr "128k MP3"
@ -240,7 +241,7 @@ msgid "A Grooveshark Anywhere account is required."
msgstr ""
msgid "A Spotify Premium account is required."
msgstr ""
msgstr "Spotify Premium Zugang wird benötigt."
msgid ""
"A smart playlist is a dynamic list of songs that come from your library. "
@ -293,7 +294,7 @@ msgid "Action"
msgstr "Aktion"
msgid "Active/deactive Wiiremote"
msgstr ""
msgstr "Aktivieren/deaktivieren Wiiremote"
msgid "Add Stream"
msgstr "Datenstrom hinzufügen"
@ -326,7 +327,7 @@ msgid "Add folder..."
msgstr "Ordner hinzufügen …"
msgid "Add media"
msgstr ""
msgstr "Medien hinzufügen ..."
msgid "Add new folder..."
msgstr "Neuen Ordner hinzufügen …"
@ -386,7 +387,7 @@ msgid "Add wiimotedev action"
msgstr "Aktion für Wii-Fernbedienung hinzufügen"
msgid "Add..."
msgstr ""
msgstr "Hinzufügen …"
msgid "Added this month"
msgstr "Diesen Monat hinzugefügt"
@ -422,7 +423,7 @@ msgid "Album info on jamendo.com..."
msgstr "Albuminformationen auf jamendo.com …"
msgid "Albumartist"
msgstr ""
msgstr "Albumkünstler"
msgid "Albums with covers"
msgstr "Alben mit Titelbildern"
@ -633,7 +634,7 @@ msgid "CUE sheet support"
msgstr "Unterstützung von Cuesheets"
msgid "Cancel"
msgstr ""
msgstr "Abbrechen"
msgid "Change cover art"
msgstr "Titelbilder ändern"