Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:X0F:branches:multimedia
easytag
easytag-taglib-2.0.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File easytag-taglib-2.0.patch of Package easytag
diff --git a/src/tags/gio_wrapper.cc b/src/tags/gio_wrapper.cc index 8716331..8772d52 100644 --- a/src/tags/gio_wrapper.cc +++ b/src/tags/gio_wrapper.cc @@ -47,11 +47,11 @@ GIO_InputStream::name () const } TagLib::ByteVector -GIO_InputStream::readBlock (TagLib::ulong len) +GIO_InputStream::readBlock (ulong len) { if (error) { - return TagLib::ByteVector::null; + return TagLib::ByteVector(); } TagLib::ByteVector rv (len, 0); @@ -70,14 +70,14 @@ GIO_InputStream::writeBlock (TagLib::ByteVector const &data) void GIO_InputStream::insert (TagLib::ByteVector const &data, - TagLib::ulong start, - TagLib::ulong replace) + TagLib::offset_t start, + size_t replace) { g_warning ("%s", "Trying to write to read-only file!"); } void -GIO_InputStream::removeBlock (TagLib::ulong start, TagLib::ulong len) +GIO_InputStream::removeBlock (TagLib::offset_t start, size_t len) { g_warning ("%s", "Trying to write to read-only file!"); } @@ -200,11 +200,11 @@ GIO_IOStream::name () const } TagLib::ByteVector -GIO_IOStream::readBlock (TagLib::ulong len) +GIO_IOStream::readBlock (ulong len) { if (error) { - return TagLib::ByteVector::null; + return TagLib::ByteVector(); } gsize bytes = 0; @@ -239,8 +239,8 @@ GIO_IOStream::writeBlock (TagLib::ByteVector const &data) void GIO_IOStream::insert (TagLib::ByteVector const &data, - TagLib::ulong start, - TagLib::ulong replace) + TagLib::offset_t start, + size_t replace) { if (error) { @@ -351,9 +351,9 @@ GIO_IOStream::insert (TagLib::ByteVector const &data, } void -GIO_IOStream::removeBlock (TagLib::ulong start, TagLib::ulong len) +GIO_IOStream::removeBlock (TagLib::offset_t start, size_t len) { - if (start + len >= (TagLib::ulong)length ()) + if (start + len >= (ulong)length ()) { truncate (start); return; diff --git a/src/tags/gio_wrapper.h b/src/tags/gio_wrapper.h index e49e54d..2f80d3a 100644 --- a/src/tags/gio_wrapper.h +++ b/src/tags/gio_wrapper.h @@ -33,10 +33,10 @@ public: GIO_InputStream (GFile *file_); virtual ~GIO_InputStream (); virtual TagLib::FileName name () const; - virtual TagLib::ByteVector readBlock (TagLib::ulong length); + virtual TagLib::ByteVector readBlock (ulong length); virtual void writeBlock (TagLib::ByteVector const &data); - virtual void insert (TagLib::ByteVector const &data, TagLib::ulong start = 0, TagLib::ulong replace = 0); - virtual void removeBlock (TagLib::ulong start = 0, TagLib::ulong length = 0); + virtual void insert (TagLib::ByteVector const &data, TagLib::offset_t start = 0, size_t replace = 0); + virtual void removeBlock (TagLib::offset_t start = 0, size_t length = 0); virtual bool readOnly () const; virtual bool isOpen () const; virtual void seek (long int offset, TagLib::IOStream::Position p = TagLib::IOStream::Beginning); @@ -61,10 +61,10 @@ public: GIO_IOStream (GFile *file_); virtual ~GIO_IOStream (); virtual TagLib::FileName name () const; - virtual TagLib::ByteVector readBlock (TagLib::ulong length); + virtual TagLib::ByteVector readBlock (ulong length); virtual void writeBlock (TagLib::ByteVector const &data); - virtual void insert (TagLib::ByteVector const &data, TagLib::ulong start = 0, TagLib::ulong replace = 0); - virtual void removeBlock (TagLib::ulong start = 0, TagLib::ulong len = 0); + virtual void insert (TagLib::ByteVector const &data, TagLib::offset_t start = 0, size_t replace = 0); + virtual void removeBlock (TagLib::offset_t start = 0, size_t length = 0); virtual bool readOnly () const; virtual bool isOpen () const; virtual void seek (long int offset, TagLib::IOStream::Position p = TagLib::IOStream::Beginning); diff --git a/src/tags/mp4_tag.cc b/src/tags/mp4_tag.cc index 7e1dd5e..4bb7b79 100644 --- a/src/tags/mp4_tag.cc +++ b/src/tags/mp4_tag.cc @@ -167,27 +167,15 @@ mp4tag_read_file_tag (GFile *file, if (extra_tag.contains ("ENCODEDBY")) et_file_tag_set_encoded_by(FileTag, extra_tag["ENCODEDBY"].front().toCString(true)); - const TagLib::MP4::ItemListMap &extra_items = tag->itemListMap (); + const TagLib::MP4::ItemMap &extra_items = tag->itemMap (); /* Album Artist */ -#if (TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION < 10) - /* No "ALBUMARTIST" support in TagLib until 1.10; use atom directly. */ - if (extra_items.contains ("aART")) - et_file_tag_set_album_artist(FileTag, extra_items["aART"].toStringList().front().toCString(true)); -#else if (extra_tag.contains ("ALBUMARTIST")) et_file_tag_set_album_artist(FileTag, extra_tag["ALBUMARTIST"].front().toCString(true)); -#endif /* Description */ -#if (TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION < 12) - /* No "PODCASTDESC" support in TagLib until 1.12; use atom directly. */ - if (extra_items.contains ("desc")) - et_file_tag_set_description(FileTag, extra_items["desc"].toStringList().front().toCString(true)); -#else if (extra_tag.contains ("PODCASTDESC")) et_file_tag_set_description(FileTag, extra_tag["PODCASTDESC"].front().toCString(true)); -#endif // TOD support ReplayGain, requires TagLib 2.0 @@ -316,38 +304,18 @@ mp4tag_write_file_tag (const ET_File *ETFile, add_field(FileTag->encoded_by, "ENCODEDBY"); - TagLib::MP4::ItemListMap &extra_items = tag->itemListMap (); - /* Album artist. */ if (!et_str_empty (FileTag->album_artist)) { TagLib::String string (FileTag->album_artist, TagLib::String::UTF8); -#if (TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION < 10) - /* No "ALBUMARTIST" support in TagLib until 1.10; use atom directly. */ - extra_items.insert ("aART", TagLib::MP4::Item (string)); - } - else - { - extra_items.erase ("aART"); -#else fields.insert ("ALBUMARTIST", string); -#endif } /* Description. */ if (!et_str_empty (FileTag->description)) { TagLib::String string (FileTag->description, TagLib::String::UTF8); -#if (TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION < 12) - /* No "PODCASTDESC" support in TagLib until 1.12; use atom directly. */ - extra_items.insert ("desc", TagLib::MP4::Item (string)); - } - else - { - extra_items.erase ("desc"); -#else fields.insert ("PODCASTDESC", string); -#endif } // TOD support ReplayGain, requires TagLib 2.0 @@ -386,12 +354,12 @@ mp4tag_write_file_tag (const ET_File *ETFile, TagLib::MP4::CoverArt art (f, TagLib::ByteVector((char *)data, data_size)); - extra_items.insert ("covr", + tag->setItem("covr", TagLib::MP4::Item (TagLib::MP4::CoverArtList ().append (art))); } else { - extra_items.erase ("covr"); + tag->removeItem("covr"); } tag->setProperties (fields);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor