コード例 #1
0
def _meta_args(filename, artist, title, album):
    [year, month, day] = get_year_month_day(filename)
    args = [
        '-id3v2_version', '3',
        '-write_id3v1', '1',
        '-metadata', 'artist=' + artist,
        '-metadata', 'title=' + title,
        '-metadata', 'album=' + album,
        '-metadata', 'genre=Speech']
    if year:
        args += ['-metadata', 'date=' + year + '-' + month + '-' + day]
        args += ['-metadata', 'comment=' + year + '-' + month + '-' + day]
    return args
コード例 #2
0
ファイル: test_meta.py プロジェクト: santinoled/video-scripts
 def test_get_year_month_day(self):
     filename = self.get_test_filename('2016-10-07 brmadhusudan.mp4')
     [year, month, day] = meta.get_year_month_day(filename)
     self.assertEqual('2016', year)
     self.assertEqual('10', month)
     self.assertEqual('07', day)
コード例 #3
0
def meta_args_ru_stereo(filename):
    artist = get_artist_ru(filename)
    title = get_title_ru(filename)
    [year, month, day] = get_year_month_day(filename)
    return _meta_args(filename, artist, title, 'Гупта Говардхан ' + year)
コード例 #4
0
def _meta_args_en(filename):
    artist = get_artist_en(filename)
    title = get_title_en(filename)
    [year, month, day] = get_year_month_day(filename)
    return _meta_args(filename, artist, title, album='Gupta Govardhan ' + year)