本文整理汇总了Python中tvnamer.utils.EpisodeInfo.generateFilename方法的典型用法代码示例。如果您正苦于以下问题:Python EpisodeInfo.generateFilename方法的具体用法?Python EpisodeInfo.generateFilename怎么用?Python EpisodeInfo.generateFilename使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tvnamer.utils.EpisodeInfo
的用法示例。
在下文中一共展示了EpisodeInfo.generateFilename方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_simple_no_ext
# 需要导入模块: from tvnamer.utils import EpisodeInfo [as 别名]
# 或者: from tvnamer.utils.EpisodeInfo import generateFilename [as 别名]
def test_simple_no_ext(self):
"""Simple episode with out extension
"""
ep = EpisodeInfo(
seriesname="Scrubs", seasonnumber=1, episodenumbers=[2], episodename="My Mentor", filename=None
)
self.assertEquals(ep.generateFilename(), "Scrubs - [01x02] - My Mentor")
示例2: test_no_name
# 需要导入模块: from tvnamer.utils import EpisodeInfo [as 别名]
# 或者: from tvnamer.utils.EpisodeInfo import generateFilename [as 别名]
def test_no_name():
"""Episode without a name
"""
ep = EpisodeInfo(
seriesname="Scrubs", seasonnumber=1, episodenumbers=[2], episodename=None, filename="scrubs.example.file.avi"
)
assertEquals(ep.generateFilename(), "Scrubs - [01x02].avi")
示例3: test_no_series_number
# 需要导入模块: from tvnamer.utils import EpisodeInfo [as 别名]
# 或者: from tvnamer.utils.EpisodeInfo import generateFilename [as 别名]
def test_no_series_number(self):
"""Episode without series number
"""
ep = EpisodeInfo(
seriesname="Scrubs", seasonnumber=None, episodenumbers=[2], episodename="My Mentor", filename=None
)
self.assertEquals(ep.generateFilename(), "Scrubs - [02] - My Mentor")
示例4: get_episode_description
# 需要导入模块: from tvnamer.utils import EpisodeInfo [as 别名]
# 或者: from tvnamer.utils.EpisodeInfo import generateFilename [as 别名]
def get_episode_description(episode):
populateFromTvdb(episode)
ep = EpisodeInfo(
seriesname = episode.seriesname,
seasonnumber = episode.seasonnumber,
episodenumbers = episode.episodenumbers,
episodename = episode.episodename,
filename = None)
return ep.generateFilename()
示例5: test_multi_episodes_continuous
# 需要导入模块: from tvnamer.utils import EpisodeInfo [as 别名]
# 或者: from tvnamer.utils.EpisodeInfo import generateFilename [as 别名]
def test_multi_episodes_continuous(self):
ep = EpisodeInfo(
seriesname="Stargate SG-1",
seasonnumber=1,
episodenumbers=[1, 2],
episodename=["Children of the Gods (1)", "Children of the Gods (2)"],
filename="stargate.example.file.avi",
)
self.assertEquals(ep.generateFilename(), "Stargate SG-1 - [01x01-02] - Children of the Gods (1-2).avi")
示例6: test_multi_episodes_continuous
# 需要导入模块: from tvnamer.utils import EpisodeInfo [as 别名]
# 或者: from tvnamer.utils.EpisodeInfo import generateFilename [as 别名]
def test_multi_episodes_continuous():
"""A two-part episode should not have the episode name repeated
"""
ep = EpisodeInfo(
seriesname="Stargate SG-1",
seasonnumber=1,
episodenumbers=[1, 2],
episodename=["Children of the Gods (1)", "Children of the Gods (2)"],
filename="stargate.example.file.avi",
)
assertEquals(ep.generateFilename(), "Stargate SG-1 - [01x01-02] - Children of the Gods (1-2).avi")
示例7: test_multi_episodes_seperate
# 需要导入模块: from tvnamer.utils import EpisodeInfo [as 别名]
# 或者: from tvnamer.utils.EpisodeInfo import generateFilename [as 别名]
def test_multi_episodes_seperate():
"""File with two episodes, but with different names
"""
ep = EpisodeInfo(
seriesname="Stargate SG-1",
seasonnumber=1,
episodenumbers=[2, 3],
episodename=["Children of the Gods (2)", "The Enemy Within"],
filename="stargate.example.file.avi",
)
assertEquals(ep.generateFilename(), "Stargate SG-1 - [01x02-03] - Children of the Gods (2), The Enemy Within.avi")
示例8: test_datedepisode_no_name_no_ext
# 需要导入模块: from tvnamer.utils import EpisodeInfo [as 别名]
# 或者: from tvnamer.utils.EpisodeInfo import generateFilename [as 别名]
def test_datedepisode_no_name_no_ext():
"""Dated EpisodeInfo with no name or extension
"""
ep = EpisodeInfo(
seriesname = 'Scrubs',
eptype = 'dated',
episodenumbers = [datetime.date(2010, 11, 23)],
episodename = '',
filename = '')
assertEquals(
ep.generateFilename(),
'Scrubs - [2010-11-23]')
示例9: test_noseason_no_name_no_ext
# 需要导入模块: from tvnamer.utils import EpisodeInfo [as 别名]
# 或者: from tvnamer.utils.EpisodeInfo import generateFilename [as 别名]
def test_noseason_no_name_no_ext():
"""NoSeason EpisodeInfo with no name or extension
"""
ep = EpisodeInfo(
seriesname = 'Scrubs',
eptype = 'noseason',
episodenumbers = [2],
episodename = '',
filename = '')
assertEquals(
ep.generateFilename(),
'Scrubs - [02]')
示例10: test_single_episode
# 需要导入模块: from tvnamer.utils import EpisodeInfo [as 别名]
# 或者: from tvnamer.utils.EpisodeInfo import generateFilename [as 别名]
def test_single_episode():
"""Simple episode name, with show/season/episode/name/filename
"""
ep = EpisodeInfo(
seriesname="Scrubs",
seasonnumber=1,
episodenumbers=[2],
episodename="My Mentor",
filename="scrubs.example.file.avi",
)
assertEquals(ep.generateFilename(), "Scrubs - [01x02] - My Mentor.avi")
示例11: test_episode_no_name_no_ext
# 需要导入模块: from tvnamer.utils import EpisodeInfo [as 别名]
# 或者: from tvnamer.utils.EpisodeInfo import generateFilename [as 别名]
def test_episode_no_name_no_ext():
"""EpisodeInfo with no name or extension
"""
ep = EpisodeInfo(
seriesname = 'Scrubs',
seasonnumber = 1,
episodenumbers = [2],
episodename = None,
filename = None)
assertEquals(
ep.generateFilename(),
'Scrubs - [01x02]')
示例12: test_simple_no_ext
# 需要导入模块: from tvnamer.utils import EpisodeInfo [as 别名]
# 或者: from tvnamer.utils.EpisodeInfo import generateFilename [as 别名]
def test_simple_no_ext():
"""Simple episode with out extension
"""
ep = EpisodeInfo(
seriesname = 'Scrubs',
seasonnumber = 1,
episodenumbers = [2],
episodename = 'My Mentor',
filename = None)
assertEquals(
ep.generateFilename(),
'Scrubs - [01x02] - My Mentor')
示例13: test_downcase
# 需要导入模块: from tvnamer.utils import EpisodeInfo [as 别名]
# 或者: from tvnamer.utils.EpisodeInfo import generateFilename [as 别名]
def test_downcase():
"""Simple episode name, converted to lowercase
"""
ep = EpisodeInfo(
seriesname="Scrubs",
seasonnumber=1,
episodenumbers=[2],
episodename="My Mentor",
filename="scrubs.example.file.avi",
)
assertEquals(ep.generateFilename(lowercase=True), "scrubs - [01x02] - my mentor.avi")
示例14: test_multi_episodes_seperate
# 需要导入模块: from tvnamer.utils import EpisodeInfo [as 别名]
# 或者: from tvnamer.utils.EpisodeInfo import generateFilename [as 别名]
def test_multi_episodes_seperate():
ep = EpisodeInfo(
seriesname = 'Stargate SG-1',
seasonnumber = 1,
episodenumbers = [2, 3],
episodename = [
'Children of the Gods (2)',
'The Enemy Within'],
filename = 'stargate.example.file.avi')
assertEquals(
ep.generateFilename(),
'Stargate SG-1 - [01x02-03] - Children of the Gods (2), The Enemy Within.avi')
示例15: test_multi_episodes_continuous
# 需要导入模块: from tvnamer.utils import EpisodeInfo [as 别名]
# 或者: from tvnamer.utils.EpisodeInfo import generateFilename [as 别名]
def test_multi_episodes_continuous():
ep = EpisodeInfo(
seriesname = 'Stargate SG-1',
seasonnumber = 1,
episodenumbers = [1, 2],
episodename = [
'Children of the Gods (1)',
'Children of the Gods (2)'],
filename = 'stargate.example.file.avi')
assertEquals(
ep.generateFilename(),
'Stargate SG-1 - [01x01-02] - Children of the Gods (1-2).avi')