Querying media links in custom fields.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2024-04-02 08:33:39 -05:00
parent beac5afca1
commit 6901ad18a6

View File

@ -170,6 +170,17 @@ Tiddler >> customFields [
^ customFields ifNil: [ customFields := Dictionary new]
]
{ #category : #accessing }
Tiddler >> customFieldsWithMediaLinks [
| response |
response := OrderedDictionary new.
self customFields keysAndValuesDo: [:k :v |
(v endsWithAnyOf: #('mp4' 'jpg' 'jpeg' 'png'))
ifTrue: [response at: k put: v ]
].
^ response
]
{ #category : #accessing }
Tiddler >> deleteUid [
self customFields deleteKey: 'uid'.