def to_storage_name(english_name): a = replace_chars(english_name, removables, '') b = endot(a) c = b.lower() return c
def test_endot(self): self.assertEqual(endot('Able Baker.1981..mkv'), 'Able.Baker.1981.mkv') self.assertEqual(endot('baker.charlie.S2...01.[AAAAAAAA]..mkv'), 'baker.charlie.S2.01.[AAAAAAAA].mkv') self.assertEqual(endot('.baker.charlie.S2...01..mkv.'), 'baker.charlie.S2.01.mkv')