Exemplo n.º 1
0
 def activated(self, tag, value):
     album, disc = util.split_album(value)
     return [(tag, album), ("discnumber", disc)]
Exemplo n.º 2
0
 def test_weird_not_disc(self):
     self.failUnlessEqual(
         util.split_album("foo ~crazy 3~"), ("foo ~crazy 3~", None))
Exemplo n.º 3
0
 def __init__(self, tag, value):
     super(SplitDisc, self).__init__(_("Split Disc out of _Album"))
     self.set_image(gtk.image_new_from_stock(gtk.STOCK_FIND_AND_REPLACE, gtk.ICON_SIZE_MENU))
     self.set_sensitive(util.split_album(value)[1] is not None)
Exemplo n.º 4
0
 def test_weird_disc(self):
     self.failUnlessEqual(
         util.split_album("foo ~disk 3~"), ("foo", "3"))
Exemplo n.º 5
0
 def test_disc_album_and_disc(self):
     self.failUnlessEqual(
         util.split_album("disc foo disc 1"), ("disc foo", "1"))
Exemplo n.º 6
0
 def test_looks_like_disc_but_isnt(self):
     self.failUnlessEqual(
         util.split_album("disc foo disc"), ("disc foo disc", None))
Exemplo n.º 7
0
 def test_basic_disc(self):
     self.failUnlessEqual(
         util.split_album("foo disc 1/2"), ("foo", "1/2"))
Exemplo n.º 8
0
 def test_album_looks_like_disc(self):
     self.failUnlessEqual(
         util.split_album("disk 2"), ("disk 2", None))