[prev in list] [next in list] [prev in thread] [next in thread] 

List:       taglib-devel
Subject:    Re: Taglib 1.9.1 upgrade not reading embedded artwork
From:       Lukáš Lalinský <lalinsky () gmail ! com>
Date:       2013-10-18 16:06:57
Message-ID: CAGUtLj84eazGB8kj1TMJDLb8pK+pxtw+gffcDUz4aLOJ22dUUQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Maybe the file is still open when you are trying to open it again for the
cover art. You should generally only open the file once, it has to read and
parse all the tags every time you open it. It's best to pass a FileRef
pointer to the extractEmbeddedArtwork object.

Lukas



On Fri, Oct 18, 2013 at 3:57 PM, wifanlith <wifanlith@googlemail.com> wrote:

> Hello,
>
> I am not thinking its specific to the embedded artwork, but its how I
> noticed the change. I thought everything was working for 1.9.1, then I
> noticed that some of the albums I had imported had no artwork. It was only
> the albums that were mp3s with embedded artwork that had not had their
> artwork read.
>
> In the method that calls extractEmbeddedArtwork it calls the same code:-
>
> #ifdef Q_OS_WIN32
>                 // TAGLIB (under Windows) does not like UTF8
> paths/filenames with
> top-bit-set characters.
>                 // (conversion from UTF8 to const wchar_t seems to be the
> cause of the
> problem - file
>                 // is effectively not recognised as an audio file and will
> therefore not
> be loaded)
>         TagLib::FileRef f(reinterpret_cast<const wchar_t
> *>(path.constData()));
> #else
>                 //  No such problem with UTF8 for Mac and Linux versions.
>         TagLib::FileRef f(path.toUtf8().data());
> #endif
>
>                 TagLib::Tag* tags = f.tag();
>         TagLib::AudioProperties* ap = f.audioProperties();
>
> then extracts the artist/album/genre etc
>
> it then calls extractEmbedded artwork with the same QString path and calls
> the same fileRef on it, and comes up with the same file ref, and a
> different
> FileRefPrivate, and the f.tag() call fails, and we return without gathering
> artwork.
>
> Unfortunately the UTF16 change had no effect.
>
> I am really confused....
>
>
>
> --
> View this message in context:
> http://kde.6490.n7.nabble.com/Taglib-1-9-1-upgrade-not-reading-embedded-artwork-tp1546223p1546366.html
> Sent from the taglib-devel mailing list archive at Nabble.com.
> _______________________________________________
> taglib-devel mailing list
> taglib-devel@kde.org
> https://mail.kde.org/mailman/listinfo/taglib-devel
>

[Attachment #5 (text/html)]

<div dir="ltr">Maybe the file is still open when you are trying to open it again for \
the cover art. You should generally only open the file once, it has to read and parse \
all the tags every time you open it. It&#39;s best to pass a FileRef pointer to the \
<span style="font-family:arial,sans-serif;font-size:13px">extractEmbeddedArtwork \
object.</span><div>

<br></div><div>Lukas</div><div><br></div></div><div class="gmail_extra"><br><br><div \
class="gmail_quote">On Fri, Oct 18, 2013 at 3:57 PM, wifanlith <span dir="ltr">&lt;<a \
href="mailto:wifanlith@googlemail.com" \
target="_blank">wifanlith@googlemail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Hello,<br> <br>
I am not thinking its specific to the embedded artwork, but its how I<br>
noticed the change. I thought everything was working for 1.9.1, then I<br>
noticed that some of the albums I had imported had no artwork. It was only<br>
the albums that were mp3s with embedded artwork that had not had their<br>
artwork read.<br>
<br>
In the method that calls extractEmbeddedArtwork it calls the same code:-<br>
<div class="im"><br>
#ifdef Q_OS_WIN32<br>
                // TAGLIB (under Windows) does not like UTF8 paths/filenames with<br>
top-bit-set characters.<br>
                // (conversion from UTF8 to const wchar_t seems to be the cause of \
the<br> problem - file<br>
                // is effectively not recognised as an audio file and will therefore \
not<br> be loaded)<br>
</div>        TagLib::FileRef f(reinterpret_cast&lt;const wchar_t<br>
*&gt;(path.constData()));<br>
<div class="im">#else<br>
                //  No such problem with UTF8 for Mac and Linux versions.<br>
</div>        TagLib::FileRef f(path.toUtf8().data());<br>
#endif<br>
<br>
                TagLib::Tag* tags = f.tag();<br>
        TagLib::AudioProperties* ap = f.audioProperties();<br>
<br>
then extracts the artist/album/genre etc<br>
<br>
it then calls extractEmbedded artwork with the same QString path and calls<br>
the same fileRef on it, and comes up with the same file ref, and a different<br>
FileRefPrivate, and the f.tag() call fails, and we return without gathering<br>
artwork.<br>
<br>
Unfortunately the UTF16 change had no effect.<br>
<br>
I am really confused....<br>
<br>
<br>
<br>
--<br>
View this message in context: <a \
href="http://kde.6490.n7.nabble.com/Taglib-1-9-1-upgrade-not-reading-embedded-artwork-tp1546223p1546366.html" \
target="_blank">http://kde.6490.n7.nabble.com/Taglib-1-9-1-upgrade-not-reading-embedded-artwork-tp1546223p1546366.html</a><br>



<div class="HOEnZb"><div class="h5">Sent from the taglib-devel mailing list archive \
at Nabble.com.<br> _______________________________________________<br>
taglib-devel mailing list<br>
<a href="mailto:taglib-devel@kde.org">taglib-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/taglib-devel" \
target="_blank">https://mail.kde.org/mailman/listinfo/taglib-devel</a><br> \
</div></div></blockquote></div><br></div>



_______________________________________________
taglib-devel mailing list
taglib-devel@kde.org
https://mail.kde.org/mailman/listinfo/taglib-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic