~ubuntu-branches/ubuntu/lucid/exaile/lucid

« back to all changes in this revision

Viewing changes to xl/trax/search.py

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Starr-Bochicchio
  • Date: 2010-04-12 20:46:51 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20100412204651-3dk9ogh1rtp9sc1k
Tags: 0.3.1.1-0ubuntu1
* New upstream bugfix release.

* debian/exaile.1, debian/exaile.manpages: Include and
  install manpage for exaile based on help2man output
  but including additions and tweaks.
* debian/source/format: Add a file conataining "1.0"
  to make lintian happy. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
    __slots__ = ['tag', 'content', 'lower']
45
45
    def __init__(self, tag, content, lower):
46
46
        self.tag = tag
 
47
        if content and not self.tag.startswith("__"):
 
48
            content = lower(content)
47
49
        self.content = content
48
50
        self.lower = lower
49
51
 
283
285
                tag, content = token.split("==", 1)
284
286
                if content == "__null__":
285
287
                    content = None
286
 
                else:
287
 
                    content = lower(content)
288
288
                matcher = _ExactMatcher(tag, content, lower)
289
289
                matchers.append(matcher)
290
290
 
292
292
            elif "=" in token:
293
293
                tag, content = token.split("=", 1)
294
294
                content = content.strip().strip('"')
295
 
                matcher = _InMatcher(tag, lower(content), lower)
 
295
                matcher = _InMatcher(tag, content, lower)
296
296
                matchers.append(matcher)
297
297
 
298
298
            elif ">" in token:
299
299
                tag, content = token.split(">", 1)
300
300
                content = content.strip().strip('"')
301
 
                matcher = _GtMatcher(tag, lower(content), lower)
 
301
                matcher = _GtMatcher(tag, content, lower)
302
302
                matchers.append(matcher)
303
303
 
304
304
            elif "<" in token:
305
305
                tag, content = token.split("<", 1)
306
306
                content = content.strip().strip('"')
307
 
                matcher = _LtMatcher(tag, lower(content), lower)
 
307
                matcher = _LtMatcher(tag, content, lower)
308
308
                matchers.append(matcher)
309
309
 
310
310
            # plain keyword
312
312
                content = token.strip().strip('"')
313
313
                mmm = []
314
314
                for tag in self.keyword_tags:
315
 
                    matcher = _InMatcher(tag, lower(content), lower)
 
315
                    matcher = _InMatcher(tag, content, lower)
316
316
                    mmm.append(matcher)
317
317
                matchers.append(_ManyMultiMetaMatcher(mmm))
318
318