mirror of
https://github.com/fergalmoran/picard.git
synced 2026-02-20 14:44:05 +00:00
PICARD-2130: Added a placeholder text "cover" to cover_image_filename input
This indicates the default being used if the image filename is not configured.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# Copyright (C) 2007 Oliver Charles
|
||||
# Copyright (C) 2007, 2010-2011 Lukáš Lalinský
|
||||
# Copyright (C) 2007-2011, 2014, 2018-2020 Philipp Wolfer
|
||||
# Copyright (C) 2007-2011, 2014, 2018-2021 Philipp Wolfer
|
||||
# Copyright (C) 2011 Michael Wiencek
|
||||
# Copyright (C) 2011-2012, 2015 Wieland Hoffmann
|
||||
# Copyright (C) 2013-2015, 2018-2019 Laurent Monin
|
||||
@@ -41,7 +41,10 @@ from PyQt5.QtCore import (
|
||||
)
|
||||
|
||||
from picard import log
|
||||
from picard.config import get_config
|
||||
from picard.config import (
|
||||
Option,
|
||||
get_config,
|
||||
)
|
||||
from picard.coverart.utils import translate_caa_type
|
||||
from picard.metadata import Metadata
|
||||
from picard.util import (
|
||||
@@ -289,7 +292,7 @@ class CoverArtImage:
|
||||
metadata.add_unique("coverart_types", cover_type)
|
||||
filename = script_to_filename(filename, metadata)
|
||||
if not filename:
|
||||
filename = "cover"
|
||||
filename = Option.get('setting', 'cover_image_filename').default
|
||||
if not is_absolute_path(filename):
|
||||
filename = os.path.join(dirname, filename)
|
||||
return encode_filename(filename)
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
from picard.config import (
|
||||
BoolOption,
|
||||
ListOption,
|
||||
Option,
|
||||
TextOption,
|
||||
get_config,
|
||||
)
|
||||
@@ -71,6 +72,7 @@ class CoverOptionsPage(OptionsPage):
|
||||
super().__init__(parent)
|
||||
self.ui = Ui_CoverOptionsPage()
|
||||
self.ui.setupUi(self)
|
||||
self.ui.cover_image_filename.setPlaceholderText(Option.get('setting', 'cover_image_filename').default)
|
||||
self.ui.save_images_to_files.clicked.connect(self.update_filename)
|
||||
self.ui.save_images_to_tags.clicked.connect(self.update_save_images_to_tags)
|
||||
self.ui.save_only_one_front_image.toggled.connect(self.ui.image_type_as_filename.setDisabled)
|
||||
|
||||
Reference in New Issue
Block a user