本文整理汇总了Python中lib.beets.mediafile.MediaFile.art方法的典型用法代码示例。如果您正苦于以下问题:Python MediaFile.art方法的具体用法?Python MediaFile.art怎么用?Python MediaFile.art使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lib.beets.mediafile.MediaFile
的用法示例。
在下文中一共展示了MediaFile.art方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: embedAlbumArt
# 需要导入模块: from lib.beets.mediafile import MediaFile [as 别名]
# 或者: from lib.beets.mediafile.MediaFile import art [as 别名]
def embedAlbumArt(artwork, downloaded_track_list):
logger.info("Embedding album art")
for downloaded_track in downloaded_track_list:
try:
f = MediaFile(downloaded_track)
except:
logger.error("Could not read %s. Not adding album art" % downloaded_track)
logger.debug("Adding album art to: %s" % downloaded_track)
f.art = artwork
f.save()
示例2: embedAlbumArt
# 需要导入模块: from lib.beets.mediafile import MediaFile [as 别名]
# 或者: from lib.beets.mediafile.MediaFile import art [as 别名]
def embedAlbumArt(artwork, downloaded_track_list):
logger.info('Embedding album art')
for downloaded_track in downloaded_track_list:
try:
f = MediaFile(downloaded_track)
except:
logger.error('Could not read %s. Not adding album art' % downloaded_track)
continue
logger.debug('Adding album art to: %s' % downloaded_track)
f.art = artwork
f.save()
示例3: embedAlbumArt
# 需要导入模块: from lib.beets.mediafile import MediaFile [as 别名]
# 或者: from lib.beets.mediafile.MediaFile import art [as 别名]
def embedAlbumArt(artwork, downloaded_track_list):
logger.info('Embedding album art')
for downloaded_track in downloaded_track_list:
try:
f = MediaFile(downloaded_track)
except:
logger.error(u'Could not read %s. Not adding album art' % downloaded_track.decode(headphones.SYS_ENCODING, 'replace'))
continue
logger.debug('Adding album art to: %s' % downloaded_track)
f.art = artwork
f.save()