Exemplo n.º 1
0
    def check(self):
        match = self.title_re.search(self.html)

        if slugify(match.group('artist')) != slugify(self.artist):
            print ('%s != %s' % (slugify(match.group('artist')),
                                 slugify(self.artist)))
            return False

        if slugify(match.group('title')) != slugify(self.title):
            print ('%s != %s' % (slugify(match.group('title')),
                                 slugify(self.title)))
            return False

        return True
Exemplo n.º 2
0
    def __setattr__(self, attr, value):
        if attr == 'name':
            super(Album, self).__setattr__('slug', slugify(value))

        super(Album, self).__setattr__(attr, value)
Exemplo n.º 3
0
    def __setattr__(self, attr, value):
        if attr == 'title':
            super(Track, self).__setattr__('slug', slugify(value))

        super(Track, self).__setattr__(attr, value)
Exemplo n.º 4
0
    def __setattr__(self, attr, value):
        if attr == 'name':
            super(Album, self).__setattr__('slug', slugify(value))

        super(Album, self).__setattr__(attr, value)
Exemplo n.º 5
0
    def __setattr__(self, attr, value):
        if attr == 'title':
            super(Track, self).__setattr__('slug', slugify(value))

        super(Track, self).__setattr__(attr, value)