Fixes issue with both sort_field and sort_expression, which are using functionality specific to list (others filters might as well). Current version fails to sort without a selection:
$ /tmp/subdigest.py -i test.ass --sort-field layer ASC
Traceback (most recent call last):
File "/tmp/subdigest.py", line 569, in <module>
sys.exit(main())
File "/tmp/subdigest.py", line 557, in main
sub_obj = filt(*filter_args)
File "/tmp/subdigest.py", line 408, in sort_field
self._process_selection(_sort)
File "/tmp/subdigest.py", line 134, in _process_selection
f(self._get_section())
File "/tmp/subdigest.py", line 407, in _sort
events.sort(key=lambda line: getattr(line, field), reverse=order == "DESC")
AttributeError: 'EventsSection' object has no attribute 'sort'
Fixes issue with both
sort_field
andsort_expression
, which are using functionality specific tolist
(others filters might as well). Current version fails to sort without a selection:Changes:
Subtitles._get_selection()
Subtitles._process_selection()
_get_selection()
for items to process