コード例 #1
0
ファイル: test_util.py プロジェクト: elfalem/quodlibet
 def test_originally_by(self):
     self.failUnlessEqual(
         split_people("title (originally by artist)"),
         ("title", ["artist"]))
     self.failUnlessEqual(
         split_people("title [originally by artist & artist2]"),
         ("title", ["artist", "artist2"]))
コード例 #2
0
 def test_originally_by(self):
     self.failUnlessEqual(
         split_people("title (originally by artist)"),
         ("title", ["artist"]))
     self.failUnlessEqual(
         split_people("title [originally by artist & artist2]"),
         ("title", ["artist", "artist2"]))
コード例 #3
0
ファイル: edittags.py プロジェクト: urielz/quodlibet
 def __init__(self, tag, value):
     super(SplitPerson, self).__init__(label=self.title, use_underline=True)
     self.set_image(Gtk.Image.new_from_icon_name(
         Icons.EDIT_FIND_REPLACE, Gtk.IconSize.MENU))
     spls = config.get("editing", "split_on").decode(
         'utf-8', 'replace').split()
     self.set_sensitive(bool(split_people(value, spls)[1]))
コード例 #4
0
ファイル: edittags.py プロジェクト: socialpercon/quodlibet
 def __init__(self, tag, value):
     super(SplitPerson, self).__init__(label=self.title, use_underline=True)
     self.set_image(
         Gtk.Image.new_from_icon_name(Icons.EDIT_FIND_REPLACE,
                                      Gtk.IconSize.MENU))
     spls = config.gettext("editing", "split_on").split()
     self.set_sensitive(bool(split_people(value, spls)[1]))
コード例 #5
0
ファイル: edittags.py プロジェクト: ch1huizong/scode
 def __init__(self, tag, value):
     super(SplitPerson, self).__init__(label=self.title, use_underline=True)
     self.set_image(Gtk.Image.new_from_stock(
         Gtk.STOCK_FIND_AND_REPLACE, Gtk.IconSize.MENU))
     spls = config.get("editing", "split_on").decode(
         'utf-8', 'replace').split()
     self.set_sensitive(bool(split_people(value, spls)[1]))
コード例 #6
0
    def __init__(self, tag, value):
        super().__init__(label=self.title, use_underline=True)
        self.set_image(Gtk.Image.new_from_icon_name(
            Icons.EDIT_FIND_REPLACE, Gtk.IconSize.MENU))
        tag_spls = config.gettext("editing", "split_on").split()
        sub_spls = config.gettext("editing", "sub_split_on").split()

        artist, others = split_people(value, tag_spls, sub_spls)
        if others:
            artist = artist if len(artist) <= 64 else artist[:64] + "…"
            others = [other if len(other) <= 64 else other[:64] + "…"
                      for other in others]
            string = (", ".join(["{}={}".format(tag, artist)] +
                                ["{}={}".format(self.needs[0], o) for o in
                                 others]))
            self.set_label(string)

        self.set_sensitive(bool(others))
コード例 #7
0
 def activated(self, tag, value):
     spls = config.get("editing", "split_on").decode('utf-8',
                                                     'replace').split()
     artist, others = split_people(value, spls)
     return [(tag, artist)] + [(self.needs[0], o) for o in others]
コード例 #8
0
 def test_cover(self):
     self.failUnlessEqual(
         split_people("Pyscho Killer [Talking Heads Cover]"),
         ("Pyscho Killer", ["Talking Heads"]))
コード例 #9
0
ファイル: edittags.py プロジェクト: mikechen66/QuodLibet
 def activated(self, tag, value):
     tag_spls = config.gettext("editing", "split_on").split()
     sub_spls = config.gettext("editing", "sub_split_on").split()
     artist, others = split_people(value, tag_spls, sub_spls)
     return [(tag, artist)] + [(self.needs[0], o) for o in others]
コード例 #10
0
 def test_featuring_two_people(self):
     self.failUnlessEqual(split_people("foo featuring bar, qx"),
                          ("foo", ["bar", "qx"]))
コード例 #11
0
 def test_featuring_person_bracketed(self):
     self.failUnlessEqual(split_people("foo (Ft. bar)"), ("foo", ["bar"]))
     self.failUnlessEqual(split_people("foo(feat barman)"),
                          ("foo", ["barman"]))
コード例 #12
0
 def test_parened_person(self):
     self.failUnlessEqual(split_people("foo (bar)"), ("foo", ["bar"]))
コード例 #13
0
 def test_with_with_person(self):
     self.failUnlessEqual(split_people("foo (with with bar)"),
                          ("foo", ["with bar"]))
コード例 #14
0
ファイル: test_util.py プロジェクト: elfalem/quodlibet
 def test_parened_person(self):
     self.failUnlessEqual(split_people("foo (bar)"), ("foo", ["bar"]))
コード例 #15
0
ファイル: edittags.py プロジェクト: piotrdrag/quodlibet
 def activated(self, tag, value):
     spls = config.gettext("editing", "split_on").split()
     artist, others = split_people(value, spls)
     return [(tag, artist)] + [(self.needs[0], o) for o in others]
コード例 #16
0
 def test_custom_splitter(self):
     self.failUnlessEqual(
         split_people("foo |With bar|", " ", ["||"]), ("foo", ["bar"]))
コード例 #17
0
ファイル: test_util.py プロジェクト: elfalem/quodlibet
 def test_with_with_person(self):
     self.failUnlessEqual(
         split_people("foo (with with bar)"), ("foo", ["with bar"]))
コード例 #18
0
ファイル: test_util.py プロジェクト: elfalem/quodlibet
 def test_cover(self):
     self.failUnlessEqual(
         split_people("Psycho Killer [Talking Heads Cover]"),
         ("Psycho Killer", ["Talking Heads"]))
コード例 #19
0
ファイル: test_util.py プロジェクト: elfalem/quodlibet
 def test_featuring_two_people(self):
     self.failUnlessEqual(
         split_people("foo featuring bar, qx"), ("foo", ["bar", "qx"]))
コード例 #20
0
ファイル: test_util.py プロジェクト: elfalem/quodlibet
 def test_featuring_person_bracketed(self):
     self.failUnlessEqual(
         split_people("foo (Ft. bar)"), ("foo", ["bar"]))
     self.failUnlessEqual(
         split_people("foo(feat barman)"), ("foo", ["barman"]))