Changeset 1315:9e3eff0dc7e0
- Timestamp:
- 04/28/09 16:37:10 (11 months ago)
- Author:
- Mickael Royer <mickael.royer@…>
- Branch:
- default
- convert_revision:
- 5bf1521142cd6aa66de74c27e2e8336bad8a5d03
- Message:
-
[sources] set global vars for audio / video default result sort and use these vars
Ignore-this: e71204aa1ffeab8d9dafebb0af864815
darcs-hash:20090428143710-b0006-e19d3df5786d44b5c8c1344213368a039ff98068.gz
committer: Mickael Royer <mickael.royer@…>
- Location:
- deejayd
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r1311
|
r1315
|
|
| 694 | 694 | filter = mediafilters.Contains(type, pattern) |
| 695 | 695 | songs = self.audio_library.search(filter,\ |
| 696 | | [("album", "ascending"), ("discnumber", "ascending"),\ |
| 697 | | ("tracknumber", "ascending")]) |
| | 696 | mediafilters.DEFAULT_AUDIO_SORT) |
| 698 | 697 | |
| 699 | 698 | return songs |
-
|
r1291
|
r1315
|
|
| 24 | 24 | 'COMPLEX_FILTERS', 'NAME2COMPLEX', |
| 25 | 25 | 'And', 'Or', |
| | 26 | "DEFAULT_AUDIO_SORT", "DEFAULT_VIDEO_SORT" |
| 26 | 27 | ) |
| 27 | 28 | |
| … |
… |
|
| 140 | 141 | NAME2COMPLEX = dict([(x().get_identifier(), x) for x in COMPLEX_FILTERS]) |
| 141 | 142 | |
| | 143 | DEFAULT_AUDIO_SORT = [("album", "ascending"), ("discnumber", "ascending"),\ |
| | 144 | ("tracknumber", "ascending")] |
| | 145 | DEFAULT_VIDEO_SORT = [("title", "ascending")] |
| 142 | 146 | |
| 143 | 147 | # vim: ts=4 sw=4 expandtab |
-
|
r1311
|
r1315
|
|
| 124 | 124 | else: |
| 125 | 125 | filter = mediafilters.And() |
| 126 | | sorts = [("album", "ascending"), ("discnumber", "ascending"),\ |
| 127 | | ("tracknumber", "ascending")] |
| | 126 | sorts = mediafilters.DEFAULT_AUDIO_SORT |
| 128 | 127 | if properties["use-limit"] == "1": |
| 129 | 128 | sorts = [(properties["limit-sort-value"],\ |
-
|
r1311
|
r1315
|
|
| 38 | 38 | contains_tags = ('genre','artist','album','title','all') |
| 39 | 39 | sort_tags = ('genre','artist','album','title','rating','tracknumber') |
| 40 | | default_sorts = [("album", "ascending"), ("discnumber", "ascending"), \ |
| 41 | | ("tracknumber", "ascending")] |
| | 40 | default_sorts = DEFAULT_AUDIO_SORT |
| 42 | 41 | |
| 43 | 42 | def __init__(self, db, library, config): |
-
|
r1291
|
r1315
|
|
| 30 | 30 | source_signal = 'video.update' |
| 31 | 31 | sort_tags = ('title','rating','length') |
| 32 | | default_sorts = [("title", "ascending")] |
| | 32 | default_sorts = mediafilters.DEFAULT_VIDEO_SORT |
| 33 | 33 | |
| 34 | 34 | def __init__(self, db, library): |