Beispiel #1
0
def _audio_tsot(atuple):
    audio, atag, advanced, _, _ = atuple
    if advanced:
        param = ast.literal_eval(atag)
        audio.add(TSOT(3, param[1]))
    else:
        audio.add(TSOT(3, atag))
Beispiel #2
0
    def test_update_to_v23_on_load(self):
        audio = ID3(self.filename)
        audio.add(TSOT(text=["Ha"], encoding=3))
        audio.save()

        # update_to_v23 called
        id3 = ID3(self.filename, v2_version=3)
        self.assertFalse(id3.getall("TSOT"))

        # update_to_v23 not called
        id3 = ID3(self.filename, v2_version=3, translate=False)
        self.assertTrue(id3.getall("TSOT"))
                                                    '-StarMusiQ.Com',
                                                    '').replace(
                                                        '-MassTamilan.com', '')
                        try:
                            id3.add(TPE1(encoding=3, text=a))
                            id3.add(TSOP(encoding=3, text=a))
                        except:
                            print "***encoding error***"

                    #TITLE
                    tit2 = id3.getall('TIT2')
                    if tit2:
                        if tit2 == tpe1:
                            try:
                                id3.add(TIT2(encoding=3, text=s))
                                id3.add(TSOT(encoding=3, text=s))
                            except:
                                print "***encoding error***"
                        else:
                            b = str(tit2[0]).replace(
                                ' - [Masstamilan.In]',
                                '').replace('-[Masstamilan.In]', '').replace(
                                    ' [Masstamilan.In]', ''
                                ).replace(' [Masstamilan.in]', '').replace(
                                    ' - Masstamilan.In', ''
                                ).replace('[Masstamilan.in]', '').replace(
                                    ' - MassTamilan.com', ''
                                ).replace(' - Masstamilan.in', '').replace(
                                    ' -Masstamilan.In',
                                    '').replace('Masstamilan.In', '').replace(
                                        'masstamilan.in', '').replace(