本文整理汇总了Python中ChannelList.ChannelList.cleanString方法的典型用法代码示例。如果您正苦于以下问题:Python ChannelList.cleanString方法的具体用法?Python ChannelList.cleanString怎么用?Python ChannelList.cleanString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ChannelList.ChannelList
的用法示例。
在下文中一共展示了ChannelList.cleanString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ChannelConfig
# 需要导入模块: from ChannelList import ChannelList [as 别名]
# 或者: from ChannelList.ChannelList import cleanString [as 别名]
#.........这里部分代码省略.........
self.showseqList.append("8 Shows")
self.showseqList.append("9 Shows")
self.showseqList.append("10 Shows")
self.movieseqList = []
self.movieseqList.append("1 Movie")
self.movieseqList.append("2 Movies")
self.movieseqList.append("3 Movies")
self.movieseqList.append("4 Movies")
self.movieseqList.append("5 Movies")
self.movieseqList.append("6 Movies")
self.movieseqList.append("7 Movies")
self.movieseqList.append("8 Movies")
self.movieseqList.append("9 Movies")
self.movieseqList.append("10 Movies")
# check if settings2.xml file exists
# read in channel playlists in video, music and mixed folders
channelNum = 0
for i in range(500):
if os.path.exists(
xbmc.translatePath("special://profile/playlists/video") + "/Channel_" + str(i + 1) + ".xsp"
):
channelNum = channelNum + 1
ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_type", "0")
ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_time", "0")
ADDON_SETTINGS.setSetting(
"Channel_" + str(channelNum) + "_1",
xbmc.translatePath("special://profile/playlists/video/") + "Channel_" + str(i + 1) + ".xsp",
)
ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_2", str(""))
ADDON_SETTINGS.setSetting(
"Channel_" + str(channelNum) + "_3",
ChannelList().cleanString(
ChannelList().getSmartPlaylistName(
xbmc.translatePath("special://profile/playlists/video") + "/Channel_" + str(i + 1) + ".xsp"
)
),
)
ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_4", str(""))
ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_5", str(""))
ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_6", str(""))
ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_7", str(""))
ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_8", str(""))
ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_9", str(""))
ADDON_SETTINGS.setSetting(
"Channel_" + str(channelNum) + "_playlist",
xbmc.translatePath("special://profile/playlists/video/") + "Channel_" + str(i + 1) + ".xsp",
)
# self.updateDialog(progressIndicator,"Auto Tune","Found " + str(self.channelList.getSmartPlaylistName(xbmc.translatePath('special://profile/playlists/video') + '/Channel_' + str(i + 1) + '.xsp')),"")
elif os.path.exists(
xbmc.translatePath("special://profile/playlists/mixed") + "/Channel_" + str(i + 1) + ".xsp"
):
channelNum = channelNum + 1
ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_type", "0")
ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_time", "0")
ADDON_SETTINGS.setSetting(
"Channel_" + str(channelNum) + "_1",
xbmc.translatePath("special://profile/playlists/mixed/") + "Channel_" + str(i + 1) + ".xsp",
)
ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_2", str(""))
ADDON_SETTINGS.setSetting(
"Channel_" + str(channelNum) + "_3",
ChannelList().cleanString(
ChannelList().getSmartPlaylistName(
xbmc.translatePath("special://profile/playlists/mixed") + "/Channel_" + str(i + 1) + ".xsp"