getmusicbee.com

General => MusicBee Wishlist => Topic started by: redwing on December 12, 2017, 08:32:58 PM

Title: Auto-retrieve artwork stored in the parent / same level folder
Post by: redwing on December 12, 2017, 08:32:58 PM
It would be great if there's an option to tell MB to auto-retrieve artwork stored in the parent folder.

<CD 1> - Tracks
<CD 2> - Tracks
Cover.jpg

Also in the same level folder named "Covers".

<CD 1> - Tracks
<CD 2> - Tracks
<Covers> - Cover.jpg
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: vzell on December 12, 2017, 11:42:01 PM
+2
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: sveakul on December 13, 2017, 12:37:45 AM
+1
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: wobbly on December 13, 2017, 04:19:30 AM
+1
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: Bee-liever on December 15, 2017, 11:28:32 AM
+1
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: redwing on December 15, 2017, 12:31:50 PM
I'm requesting one more scenario for box sets that are using the same front cover for all albums inside it without individual cover for each album. The location of the box front cover is not uniform for every box set. I see three most common patterns: either first or last album contains "Covers" folder, or "Covers" folder is placed on the same level of albums. The problem is some albums contain tracks just inside it whereas other albums contain them inside sub-folders "CD 1", "CD 2", etc. which makes them two levels away from the cover image.

So maybe the user could move the covers folder manually to the same level as albums if it's located in a different place, and then MB could take care of the rest.

<Album 1> - Tracks
<Album 2> - <CD 1> - Tracks
                      <CD 2> - Tracks
...
<Covers> - Box Front.jpg
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: Steven on December 23, 2017, 05:10:07 PM
I have been looking into this and am planning to implement it such that you can specify additional folders to search over and above the current folder for the music file.
A folder can be specified as a relative (or absolute) path to the music file and can include tags in the construction of the folder path eg.
Code
../<Grouping>/
The order of precedence for the primary picture would be first matching artwork in the current file folder and then the additional folders would be searched. All matching artwork files would be associated with the music file.
When additional folders are specified, you wont be able to set the include sub-folders ie. you can either set "include sub-folders" or specify additional search folders but not both.

Does anyone have any comments on that approach?
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: redwing on December 23, 2017, 06:03:06 PM
Can that approach support all the three example cases? So when it searches one level of path, can it search either pictures or pictures inside <Covers> folder on the level as well? If that's possible, doesn't that include searching a sub-folder of the current path level as well?
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: Steven on December 23, 2017, 06:32:38 PM
you would be able to specify multiple additional folders. Cover.* would need to be enabled in the retrieval filters

<CD 1> - Tracks
<CD 2> - Tracks
Cover.jpg
Code
../

<CD 1> - Tracks
<CD 2> - Tracks
<Covers> - Cover.jpg
Code
../Covers/


<Album 1> - Tracks
<Album 2> - <CD 1> - Tracks
                 <CD 2> - Tracks
...
<Covers> - Box Front.jpg
Code
../../Covers/
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: redwing on December 23, 2017, 06:37:46 PM
Then what if I make it search <Covers> sub-folder on the same level as well?
Can't I just add one more rule?

Code
/Covers/
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: redwing on December 23, 2017, 06:44:11 PM
<Album 1> - Tracks
<Album 2> - <CD 1> - Tracks
                    <CD 2> - Tracks
...
<Covers> - Box Front.jpg
Code
../../Covers/

And you meant that case requires two rules: "../Covers/" and "../../Covers/", right?
Can you support "*Front.*" filter as well to cover such case as "Box Front.jpg"?
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: Steven on December 23, 2017, 06:46:11 PM
Then what if I make it search <Covers> sub-folder on the same level as well?
Can't I just add one more rule?

Code
/Covers/
Code
./Covers/
or
Code
Covers/

for the last question, yes it would need 2 rules
and no, "*Front.*" is not supported but "*.*" is
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: redwing on December 23, 2017, 06:47:41 PM
That's great!

and no, "*Front.*" is not supported but "*.*" is

OK. Thanks a lot!
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: wobbly on December 24, 2017, 02:40:21 AM
great work on  this thank you 
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: redwing on December 25, 2017, 01:58:27 AM
I'm testing this now.

When additional folders are specified, you wont be able to set the include sub-folders ie. you can either set "include sub-folders" or specify additional search folders but not both.

I tried setting the both, and it seems it's working both for sub-folders and additional folders. Is it supported now?
Also the slashes in your code examples should be all backslashes, right?
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: redwing on December 26, 2017, 03:04:35 AM
All rules are working fine except that "include sub-folder" option gets unticked on every restart if there are additional rules. So I guess you didn't intend to allow it, but it's working fine. In case you have to disable it for some reason, then please offer another box for additional rule to include a sub-folder.
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: Steven on December 26, 2017, 08:36:47 AM
All rules are working fine except that "include sub-folder" option gets unticked on every restart if there are additional rules. So I guess you didn't intend to allow it, but it's working fine. In case you have to disable it for some reason, then please offer another box for additional rule to include a sub-folder.
i changed my mind after i said that but i see its not persisting and fixed for the next update. Its only sub-folders of the music file folder, not the additional paths
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: redwing on December 26, 2017, 10:52:35 AM
i changed my mind after i said that but i see its not persisting and fixed for the next update. Its only sub-folders of the music file folder, not the additional paths

Thanks!

BTW I found some issue with linking pictures with the same name in different folders. For instance, if there are three front.jpg in three different locations, it links only two of them. To link the third, you have to change its name to another filtered name (e.g. cover/folder.jpg). Then it includes it.

Also I'm testing to see how it determines the primary picture. For that, it seems always naming comes first than location. If name is the same, then it gives precedence to the same folder> sub-folders> additional folders. And the order of additional folders has no effect but it seems to prefer pictures outside of folders to those inside folders.
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: Steven on December 26, 2017, 10:59:02 AM
Also I'm testing to see how it determines the primary picture. For that, it seems always naming comes first than location. If name is the same, then it gives precedence to the same folder> sub-folders> additional folders. And the order of additional folders has no effect but it seems to prefer pictures outside of folders to those inside folders.
it goes by folder rule (ie music file folder first) then naming precedence within that folder/ then next folder etc
i would rather not change that as i think it makes most sense to treat the music file folder with precedence over other folders
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: redwing on December 26, 2017, 11:07:09 AM
Also I'm testing to see how it determines the primary picture. For that, it seems always naming comes first than location. If name is the same, then it gives precedence to the same folder> sub-folders> additional folders. And the order of additional folders has no effect but it seems to prefer pictures outside of folders to those inside folders.
it goes by folder rule (ie music file folder first) then naming precedence within that folder/ then next folder etc
i would rather not change that as i think it makes most sense to treat the music file folder with precedence over other folders

That's what I expected, but it doesn't work that way. If you have set front over cover, and you have cover in the music files folder and front in the parent folder, then it displays front.jpg in the parent folder as primary artwork.

One more question about rescan artwork command in artwork retrieval filter. When you adjust the setting and run rescan artwork, it doesn't update artwork cache. So you have to run "Rescan All Files" additionally to update what's displayed in the main panel. Is that correct?
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: Steven on December 26, 2017, 11:44:38 AM
That's what I expected, but it doesn't work that way. If you have set front over cover, and you have cover in the music files folder and front in the parent folder, then it displays front.jpg in the parent folder as primary artwork.
i will fix that
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: Steven on December 26, 2017, 01:50:17 PM
One more question about rescan artwork command in artwork retrieval filter. When you adjust the setting and run rescan artwork, it doesn't update artwork cache. So you have to run "Rescan All Files" additionally to update what's displayed in the main panel. Is that correct?
no, that shouldnt be the case. It's definitely clearing the album artwork cache and then refreshing the main panel (tested to confirm and from reviewing the code)

The picture priority handling has been corrected to give the music folder precedence
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: redwing on December 26, 2017, 03:00:35 PM
One more question about rescan artwork command in artwork retrieval filter. When you adjust the setting and run rescan artwork, it doesn't update artwork cache. So you have to run "Rescan All Files" additionally to update what's displayed in the main panel. Is that correct?
no, that shouldnt be the case. It's definitely clearing the album artwork cache and then refreshing the main panel (tested to confirm and from reviewing the code)

Found what causes the issue. It's external cuesheet files. They require file rescan to update artwork. Also tried importing those files to the library. They don't display artwork. Running rescan artwork has no effect. You have to rescan the files to display artwork.
For normal files, your description is correct.
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: Steven on December 26, 2017, 03:48:09 PM
Found what causes the issue. It's external cuesheet files. They require file rescan to update artwork. Also tried importing those files to the library. They don't display artwork. Running rescan artwork has no effect. You have to rescan the files to display artwork.
that does appear to be the case but to fix it would require changes i dont really want to make. It should fix itself on the next restart without the need to do a file rescan.

edit:
it wasnt so bad, so i have fixed it for the next update
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: redwing on December 26, 2017, 04:13:25 PM
OK. That's fine. But there's one thing I don't understand which has nothing to do with cuesheet files.
I linked files to artwork in the parent folder. And then I removed all additional folder rules from the setting and ran rescan artwork. They are still all linked to the artwork in the parent folder even after restart. Why? Then how can I reset the link so that they show no artwork?
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: redwing on December 26, 2017, 04:15:34 PM
it wasnt so bad, so i have fixed it for the next update

Thanks!
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: redwing on January 02, 2018, 02:32:10 PM
The picture priority handling has been corrected to give the music folder precedence

I saw your fix working with a few patches right after that, but it's no longer working.
Actually it has become worse. Now parent folder always takes precedence over music files folder and its sub-folders regardless of naming order.
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: Steven on January 02, 2018, 07:07:18 PM
yes it appears there was always a small mistake. Its fixed for the next update
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: Steven on January 02, 2018, 07:45:05 PM
http://musicbee.niblseed.com/V3_2/MusicBee32_Patched.zip
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: redwing on January 02, 2018, 09:13:13 PM
It's fixed. Thanks!
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: redwing on July 03, 2018, 08:58:28 AM
Noticed a new bug since a few weeks ago.

For a box set like this

<Album 1> - Tracks
<Album 2> - Tracks
<Album 3> - Tracks
Cover.jpg

when you delete Cover.jpg in the parent folder and rescans the box set, it searches an image in sub-folders and replaces the deleted image with the first found one.
So if <Album 2> happens to contain folder.jpg, then now the entire tracks are linked to that image instead of the deleted Cover.jpg.
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: redwing on July 07, 2018, 04:48:28 AM
Regarding the issue reported above, rescanning such albums again sometimes change those wrong images to another wrong ones that can't be linked to by auto-retrieve settings.
As I said, this bug occurs only when an existing linked files get removed. MB seems somehow to try to fill in the removed image with something else disregarding the settings.
Title: Re: Auto-retrieve artwork stored in the parent / same level folder
Post by: redwing on September 05, 2018, 01:57:23 PM
The reported bug still persists.
BTW I found a workaround. Never delete an linked image outside MB and always delete them using artwork manager to prevent the bug to occur.