[mythtv] embedded albumart working in current master?

Paul Harrison mythtv at sky.com
Tue Jan 5 07:22:42 UTC 2016


On 5 January 2016 at 05:11, Mike Rice <mikerice1969 at gmail.com> wrote:
> The tables look reasonable to me:
>
> mysql> select song_id, name, directory_id,filename from music_songs where
> song_id=1;
> +---------+-------------------+--------------+----------------------------------------+
> | song_id | name              | directory_id | filename
> |
> +---------+-------------------+--------------+----------------------------------------+
> |       1 | Because The Night |            1 | 10,000 Maniacs - Because The
> Night.mp3 |
> +---------+-------------------+--------------+----------------------------------------+
> 1 row in set (0.00 sec..)
>

I'll have to check the code when I get home but I would expect the
directory_id to be 0 here if the file is called '/usr1/music/10,000
Maniacs - Because the Night.mp3' and the Music SG is '/usr1/Music'.


> mysql> select * from music_albumart where song_id=1;
> +-------------+-------------+--------------+-----------+---------+----------+----------+
> | albumart_id | filename    | directory_id | imagetype | song_id | embedded
> | hostname |
> +-------------+-------------+--------------+-----------+---------+----------+----------+
> |           1 | 1-front.jpg |            0 |         1 |       1 |        1
> | testbox  |
> +-------------+-------------+--------------+-----------+---------+----------+----------+
> 1 row in set (0.00 sec)
>
> mysql> select * from music_directories where directory_id=1;
> +--------------+-------------+-----------+
> | directory_id | path        | parent_id |
> +--------------+-------------+-----------+
> |            1 | /usr1/music |         0 |
> +--------------+-------------+-----------+
> 1 row in set (0.00 sec)
>
> mysql> select * from storagegroup where groupname like 'Music%';
> +----+-----------+----------+-----------------+
> | id | groupname | hostname | dirname         |
> +----+-----------+----------+-----------------+
> | 23 | Music     | testbox  | /usr1/music/    |
> | 25 | MusicArt  | testbox  | /usr1/musicart/ |
> +----+-----------+----------+-----------------+
> 2 rows in set (0.02 sec)
>
> root at testbox:/home/mike# ls -ld /usr1/music*
> drwxrwxrwx 2 root root 147456 Jan  4 19:28 /usr1/music
> drwxrwxrwx 3 root root   4096 Jan  4 19:28 /usr1/musicart
>
> No files ever appear in /usr1/musicart.
>
> Like I mentioned I think there is at least a problem in the mythutil
> --extractimage where FindFile is called with the full path:
>
> In ExtractImage in mythutil/musicmetautils.cpp the MusicMetadata is obtained
> with MusicMetadata::createFromID.  Looking there you will see m_filename is
> set from:
>
> "CONCAT_WS('/', music_directories.path, music_songs.filename) AS filename,
>
> And then FindFile is called but doesn't expect a full path and fails.  When
> I fix createFromID to set the relative path I can get mythutil
> --extractimage to place files in /usr1/musicart/AlbumArt but MythMusic still
> didn't locate and use it.  At that point I thought I better stop and make
> sure I understand what is supposed to happen since it doesn't appear this
> could be working as it.
>
> So is this correct:
>
> Initial music scan just creates the tables above.  It looks it the mp3 to
> see if it has albumart and sets the embedded column to TRUE.  It doesn't do
> any extraction.
>
> When the track is played MythMusic will try to get the embedded image.  To
> find it it can:
> 1. Look for it in a local cache (~feuser/.mythtv/MythMusic/AlbumArt ?)
> 2. Look for it in /usr1/musicart
> 3. If not found, execute mythutil --extractimage to extract it to
> /usr1/musicart
> 4. When event says it has been generated the image is obtained from
> /usr1/musicart and displayed by MythMusic.
>
> If that understanding is correct I think I can make progress debugging it.


>From memory this sounds correct except I don't think we use the local
cache in ~ anymore it's stored in the MusicArt  SG now.

Paul H.


More information about the mythtv-dev mailing list