File commander extension filters incomplete

Issue #661 resolved
prl created an issue

The set of filename extensions matched by the filter regular expressions movie, music and pictures in Plugins.Extensions.FileCommander.plugin is considerably smaller than the set of music, picture and movie extensions in Components.FileList.EXTENSIONS, which are used to select the FileCommander's icons for the file type. For example, the extension "ogm" will have a "movie" icon, but won't be accepted by the "movie" filter expression.

The filter regular expressions also don't have a $ end-of-string match, so that the RE that would match the "iso" extension would also match "isobar" or "isolated", and the extension match for "jpeg" is redundant, because it would be matched by "jpe".

Replication steps

Best checked by examining the code.

Comments (1)

  1. Peter Urbanec

    Fix issue #661: File commander extension filters incomplete

    Construct the File Commander media type filters from Plugins.Extensions.FileCommander.FileList.EXTENSIONS and from Plugins.Extensions.FileCommander.MOVIEEXTENSIONS so that the filters agree with the file type dicts.

    Make the filters more specific by anchoring the regular expressions at the string end, and bu explicityl enumerating the correct extensions in the records regular expression.

    Add a call of onLayout() to update the screen title to show/hide the "(*)" "filters enabled" flag when the filter settings change.

    In Components.FileList, add "jpe" as a "picture" extension and "iso" as a "movie" extension to match the old regular expressions in Plugins.Extensions.FileCommander.FileList and continue to have them in the new extensions.

    → <<cset 1f445bb05476>>

  2. Log in to comment