The API Documentation mentions an optional
sort argument, which I assumed was used for specifying how the results should be sorted. However when I tried to used a standard beets sort string I ran into the following:
# offending code lib.items(query='album_id:1', sort='track+') # error File "/home/callum/code/git-repos/beets/beets/library.py", line 1422, in items return self._fetch(Item, query, sort or self.get_default_item_sort()) File "/home/callum/code/git-repos/beets/beets/library.py", line 1396, in _fetch return super(Library, self)._fetch( File "/home/callum/code/git-repos/beets/beets/dbcore/db.py", line 1028, in _fetch order_by = sort.order_clause() AttributeError: 'str' object has no attribute 'order_clause'
The funny thing is that including the sort string in the query like
lib.items(query='album_id:1 track+') works perfectly, which made me think that there might be a different, special purpose for the
Is that the case or am I doing something wrong?