ursus
September 27, 2025, 8:54am
1
The ‘storage facility’ editor presents a default Mediatype of ‘Book’. Can I change the default?
[Sorry if my translation of the editor window is wrong]
Does it not remember the last-used Media Type?
Edit: it appears that Repository records default to the top entry in the monitored data types…
)
self.title = MonitoredEntry(
self.top.get_object("repo_name"),
self.source.set_name,
self.source.get_name,
self.db.readonly,
)
self.type_selector = MonitoredDataType(
self.top.get_object("media_type"),
self.source_ref.set_media_type,
self.source_ref.get_media_type,
self.db.readonly,
self.db.get_source_media_types(),
)
self.media_type_selector = MonitoredDataType(
self.top.get_object("repo_type"),
self.source.set_type,
self.source.get_type,
Ah-ha… here is where the hard-coded default is set:
FILM = 6
MAGAZINE = 7
MANUSCRIPT = 8
MAP = 9
NEWSPAPER = 10
PHOTO = 11
TOMBSTONE = 12
VIDEO = 13
_CUSTOM = CUSTOM
_DEFAULT = BOOK
_DATAMAP = [
(UNKNOWN, _("Unknown"), "Unknown"),
(CUSTOM, _("Custom"), "Custom"),
(AUDIO, _("Audio"), "Audio"),
(BOOK, _("Book"), "Book"),
(CARD, _("Card"), "Card"),
(ELECTRONIC, _("Electronic"), "Electronic"),
(FICHE, _("Fiche"), "Fiche"),
(FILM, _("Film"), "Film"),
ursus
September 27, 2025, 9:16am
4
This implicates that I need to remember the change and do it again after each update, correct?
Yep.
I keep a placeholder Person named “Gramps, customizations” with notes on all the tweaks that I wish to remember.
You can also file an enhancement request in MantisBT.
But the enhancements backlog is so big that it is unlikely to be fulfilled … unless you also work out the PR too.
ursus
September 27, 2025, 9:39am
6
Thanks. This my very first customization. Am not in to programming in anyway, so no PR.
2 Likes
system
Closed
October 27, 2025, 9:40am
7
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.