mirror of
https://github.com/fergalmoran/picard.git
synced 2025-12-22 09:18:18 +00:00
Modify explanation text in the image type selector
This commit is contained in:
@@ -73,10 +73,10 @@ class CoverArt:
|
|||||||
else:
|
else:
|
||||||
log.debug("Cover art disabled by user options.")
|
log.debug("Cover art disabled by user options.")
|
||||||
|
|
||||||
def _set_metadata(self, coverartimage, data, info):
|
def _set_metadata(self, coverartimage, data, image_info):
|
||||||
try:
|
try:
|
||||||
if coverartimage.can_be_processed:
|
if coverartimage.can_be_processed:
|
||||||
run_image_processors(coverartimage, data, info)
|
run_image_processors(coverartimage, data, image_info)
|
||||||
else:
|
else:
|
||||||
coverartimage.set_tags_data(data)
|
coverartimage.set_tags_data(data)
|
||||||
if coverartimage.can_be_saved_to_metadata:
|
if coverartimage.can_be_saved_to_metadata:
|
||||||
@@ -119,12 +119,12 @@ class CoverArt:
|
|||||||
echo=None
|
echo=None
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
info = imageinfo.identify(data)
|
image_info = imageinfo.identify(data)
|
||||||
filters_result = True
|
filters_result = True
|
||||||
if coverartimage.can_be_filtered:
|
if coverartimage.can_be_filtered:
|
||||||
filters_result = run_image_filters(data, info, self.album, coverartimage)
|
filters_result = run_image_filters(data, image_info, self.album, coverartimage)
|
||||||
if filters_result:
|
if filters_result:
|
||||||
self._set_metadata(coverartimage, data, info)
|
self._set_metadata(coverartimage, data, image_info)
|
||||||
except (CoverArtImageIOError, imageinfo.IdentificationError):
|
except (CoverArtImageIOError, imageinfo.IdentificationError):
|
||||||
# It doesn't make sense to store/download more images if we can't
|
# It doesn't make sense to store/download more images if we can't
|
||||||
# save them in the temporary folder, abort.
|
# save them in the temporary folder, abort.
|
||||||
|
|||||||
@@ -144,10 +144,18 @@ class CoverOptionsPage(OptionsPage):
|
|||||||
self.ui.ca_providers_groupbox.setEnabled(files_enabled or tags_enabled)
|
self.ui.ca_providers_groupbox.setEnabled(files_enabled or tags_enabled)
|
||||||
|
|
||||||
def select_never_replace_image_types(self):
|
def select_never_replace_image_types(self):
|
||||||
|
instructions_bottom = N_(
|
||||||
|
"Embedded cover art images with a type found in the 'Include' list will never be replaced "
|
||||||
|
"by a newly downloaded image UNLESS they also have an image type in the 'Exclude' list. "
|
||||||
|
"Images with types found in the 'Exclude' list will always be replaced by downloaded images "
|
||||||
|
"of the same type. Images types not appearing in the 'Include' or 'Exclude' list will "
|
||||||
|
"not be considered when determining whether or not to replace an embedded cover art image.\n"
|
||||||
|
)
|
||||||
(included_types, excluded_types, ok) = CAATypesSelectorDialog.display(
|
(included_types, excluded_types, ok) = CAATypesSelectorDialog.display(
|
||||||
types_include=self.dont_replace_included_types,
|
types_include=self.dont_replace_included_types,
|
||||||
types_exclude=self.dont_replace_excluded_types,
|
types_exclude=self.dont_replace_excluded_types,
|
||||||
parent=self,
|
parent=self,
|
||||||
|
instructions_bottom=instructions_bottom,
|
||||||
)
|
)
|
||||||
if ok:
|
if ok:
|
||||||
self.dont_replace_included_types = included_types
|
self.dont_replace_included_types = included_types
|
||||||
|
|||||||
@@ -110,5 +110,5 @@ class ImageList(MutableSequence):
|
|||||||
previous_image = types_dict[image_types]
|
previous_image = types_dict[image_types]
|
||||||
if image.width > previous_image.width or image.height > previous_image.height:
|
if image.width > previous_image.width or image.height > previous_image.height:
|
||||||
continue
|
continue
|
||||||
types_dict[image.normalized_types()] = image
|
types_dict[image_types] = image
|
||||||
return types_dict
|
return types_dict
|
||||||
|
|||||||
Reference in New Issue
Block a user