Author Topic: can't add artwork to track using mb api  (Read 4815 times)

boroda

  • Sr. Member
  • ****
  • Posts: 4595
i try to use Library_SetArtworkEx(sourceFileUrl, 0, imageData) command and it -replaces- existing artwork very well, but it can't -add- new artwork for tracks without artwork.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34351
for new artwork, MB would be using the settings from Preferences/ Tags(1)/artwork/ downloaded album cover storage

i cant see any reason for it not to work, so can you confirm whether there is anything in the error log. Also can you confirm the returned value from the function call is false.

edit:
i am going to change the function so it saves the artwork synchronously
Last Edit: September 29, 2016, 07:55:20 PM by Steven


boroda

  • Sr. Member
  • ****
  • Posts: 4595
sorry, Steven, this patch didn't help. i still can replace existing artwork, but can't add new one. Library_SetArtworkEx returns true in both cases. i've tried imageIndex = 0 only.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34351
well thats a bit strange. I have created a test plugin and it works fine for me.
Can you post a screenshot of your tags(1)/ artwork settings and also how are you verifying that there is no artwork added?

boroda

  • Sr. Member
  • ****
  • Posts: 4595
here are my artwork storage settings:



here is latest plugin version:

source:

http://www.mediafire.com/file/82zwatv8w2025wp/TagTools_2016-09-30.rar

binary:

http://www.mediafire.com/file/7nidu1z81crt8so/mb_TagTools_2016-09-30.zip

doesn't matter if my code is sophisticated or nor, what matters is that the same code very well replaces existing artwork, but can't add new artwork. just try context 'tag history' command (you might need to enable context menus in plugin prefs and to set displayed tags in 'tag history' command).

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34351
can you confirm how you are verifying whether the artwork is being saved? eg. if you open the file with the tag editor, does the new artwork show there

boroda

  • Sr. Member
  • ****
  • Posts: 4595
no, it doesn't matter how i check the presence of artwork, no artwork is displayed.

BTW, i'm using ReshreshPanels(), but it doesn't change anything.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34351
are you doing other changes to the file at the same time or in sequence eg. update tags, set artwork and then commit changes to file?
if thats the case then i can imagine why it wouldnt recognise the artwork in MB but i would expect you would still see the artwork using an external tool such as mp3Tag.
So i will address that

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34351
as described above:
http://musicbee.niblseed.com/V3_0/MusicBee3_Patched.zip

if you are setting tags and artwork, i recommend you set the artwork after setting the tags