Exemplo n.º 1
0
 def test_originally_by(self):
     self.failUnlessEqual(
         util.split_people("title (originally by artist)"),
         ("title", ["artist"]))
     self.failUnlessEqual(
         util.split_people("title [originally by artist & artist2]"),
         ("title", ["artist", "artist2"]))
Exemplo n.º 2
0
 def activated(self, tag, value):
     spls = config.get("editing", "split_on").decode("utf-8", "replace").split()
     artist, others = util.split_people(value, spls)
     return [(tag, artist)] + [(self.needs[0], o) for o in others]
Exemplo n.º 3
0
 def __init__(self, tag, value):
     super(SplitPerson, self).__init__(self.title)
     self.set_image(gtk.image_new_from_stock(gtk.STOCK_FIND_AND_REPLACE, gtk.ICON_SIZE_MENU))
     spls = config.get("editing", "split_on").decode("utf-8", "replace").split()
     self.set_sensitive(bool(util.split_people(value, spls)[1]))
Exemplo n.º 4
0
 def test_cover(self):
     self.failUnlessEqual(
         util.split_people("Pyscho Killer [Talking Heads Cover]"),
         ("Pyscho Killer", ["Talking Heads"]))
Exemplo n.º 5
0
 def test_featuring_person_bracketed(self):
     self.failUnlessEqual(
         util.split_people("foo (Ft. bar)"), ("foo", ["bar"]))
     self.failUnlessEqual(
         util.split_people("foo(feat barman)"), ("foo", ["barman"]))
Exemplo n.º 6
0
 def test_featuring_two_people(self):
     self.failUnlessEqual(
         util.split_people("foo featuring bar, qx"), ("foo", ["bar", "qx"]))
Exemplo n.º 7
0
 def test_with_with_person(self):
     self.failUnlessEqual(
         util.split_people("foo (with with bar)"), ("foo", ["with bar"]))
Exemplo n.º 8
0
 def test_parened_person(self):
     self.failUnlessEqual(util.split_people("foo (bar)"), ("foo", ["bar"]))