晚了,但我在 OS X 上需要完全相同的 Plex。
我的解决方案是编写一个 Python 脚本,通过 AppleScript 桥向 iTunes 查询其电视节目,从每个轨道的位置属性获取文件路径,然后创建指向原始文件的符号链接,使用 iTunes 元数据为链接提供适合的名称Plex/XBMC 等
优点是您可以使用不同的命名方案轻松创建多组链接,例如My Name Is Earl S01E10.m4v或My Name Is Earl 01x10 White Lie Christmas.m4v
脚本的核心是(track
appscript桥提供的参考在哪里):
def trackInfo(track):
"""returns tuple (filename, filepath, show)
track is iTunes playlist track from appscript bridge,
filename is of format "Showname 01x02 Episode Name.avi" where
01 is the season number, 02 the episode number and the extension
will match that of filepath.
filepath is the UNIX path to the original file.
"""
try:
path = track.location().path
except CommandError:
return None, None, None
ext = os.path.splitext(path)[1]
name = "%s %02dx%02d %s%s" % (track.show(), track.season_number(),
track.episode_number(), track.name(), ext)
return name, path, track.show()