[mythtv] embedded albumart working in current master?

Paul Harrison mythtv at sky.com
Mon Jan 4 23:11:27 UTC 2016


On 03/01/16 23:07, Mike Rice wrote:
> I've been testing out the latest master and am not seeing album art in 
> MythMusic.  I have all my music in a single directory which is listed 
> in the Music storage group and each has an embedded image.  All worked 
> fine in 0.27.
>
> There is a MusicArt storage directory which doesn't contain anything.
>
> Should I expect this stuff to be working at this point?
>

MythMusic now uses storage groups only and I believe everything is 
working. A lot of this stuff has been in master for close to 2 years 
now. I don't have many files with embedded images but I know Stuart M. 
has lots of them and hasn't reported any problems.

> I've spent some time stepping through the source but I am not sure I 
> understand what the desired behavior is.  When the Music scanner runs 
> it always reports no album art.   Should the embedded images be 
> extracted from the .mp3 file when the scanner runs and placed in the 
> MusicArt directory?  Or does MythMusic just try to load the image when 
> it is needed from the ,mp3 file?  Or is something else supposed to happen?
>

The file scanner will find both images in the same directory and 
embedded images in a files tag and record what it finds in the 
music_albumart table. Because embedded images can be a little slow to 
extract the first time an image is needed it is extracted and stored in 
the AlbumArt storage group. The next time it is required it is pulled 
from the AlbumArt SG without touching the tag.


> Also what should this command do?
>
> mythutil --extractimage --imagetype=1 --songid=1
>

This command will be run on the backend where the music file is stored 
and will extract the required image and store it in the AlbumArt SG for 
quick retrieval. It then sends a message to the frontend telling it the 
image is ready for use.


> I see this:
>
>  E  SG(Music): FindFile: Unable to find '/usr1/music/10,000 Maniacs - 
> Because The Night.mp3'!
>
> This happens because this particular FindFile call tries to open 
> "/usr1/music/usr1/music/10,000 Maniacs - Because The Night.mp3'
>

The double /usr1/music looks like the problem. We used to store the full 
path to each file in the DB at some point that was changed to only store 
the path minus the start path and now we just look for that relative 
path in the Music storage group. It looks like the migration has gone 
wrong somewhere.

> Fixing that doesn't seem to help me a whole lot though. Still no albumart.
>
> I'd like to debug and/or fix this but I think I need a hint or two.  :)
>
> Thanks.
>

A quick fix would be just to clear the music tables (there is a button 
on the general settings pages to do that) and perform a scan for music 
but it would be nice to figure out what went wrong here first.

The place to start would be the music tables and the files paths stored 
in there.

The tables of interest are music_songs, music_albumart, and 
music_directories. I'm too tired to figure out the proper queries but 
something like this will get you started :)

select song_id, name, directory_id from music_songs where song_id=12345;
select * from music_albumart where song_id=12345;
select * from music_directories where directory_id=9876;

Paul H.


More information about the mythtv-dev mailing list