Posters stuck when using my own custom metadata agent

In my home grown and private metadata agent (for use with my custom tagged .m4v files), this code extracts posters and fanart embedded in the files:



#Coverart<br />
	try:<br />
		metadata.posters['atom'] = Proxy.Media(str(tags["covr"][0]))<br />
	except: Log("Exception in Coverart: " + metadata.title)<br />
<br />
#Fanart<br />
	try:<br />
		metadata.art['atom'] = Proxy.Media(str(tags["covr"][1]))<br />
	except: Log("Exception in Fanart: " + metadata.title)



Sometimes I change the embedded images, but even upon "Refresh Metadata", the old images stick.

How do I update the code above to remedy this problem? (Or is this a bug?).

Thanks :)

What? So this was not worthy of a Ninja reply?

Just a guess, but maybe deleting the key first before giving it a new value works:


#Coverart<br />
	try:<br />
		if 'atom' in metadata.posters:<br />
			del metadata.posters['atom']<br />
<br />
		metadata.posters['atom'] = Proxy.Media(str(tags["covr"][0]))<br />
	except: Log("Exception in Coverart: " + metadata.title)<br />
<br />
#Fanart<br />
	try:<br />
		if 'atom' in metadata.art:<br />
			del metadata.posters['atom']<br />
<br />
		metadata.art['atom'] = Proxy.Media(str(tags["covr"][1]))<br />
	except: Log("Exception in Fanart: " + metadata.title)


Thanks! I have tried that as that was my guess as well. I'll give it another try and report back! Thanks again :)

Doesn’t work - other ideas?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.