本文整理汇总了Python中DownloadUtils.DownloadUtils.getUserArtwork方法的典型用法代码示例。如果您正苦于以下问题:Python DownloadUtils.getUserArtwork方法的具体用法?Python DownloadUtils.getUserArtwork怎么用?Python DownloadUtils.getUserArtwork使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DownloadUtils.DownloadUtils
的用法示例。
在下文中一共展示了DownloadUtils.getUserArtwork方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: updateInfo
# 需要导入模块: from DownloadUtils import DownloadUtils [as 别名]
# 或者: from DownloadUtils.DownloadUtils import getUserArtwork [as 别名]
#.........这里部分代码省略.........
self.logMsg("TrailersUnWatchedCount" + str(trailers_unwatched_count), level=2)
self.logMsg("PhotosCount" + str(photos_count), level=2)
#item_count = item_count + 1
movie_watched_count = movie_count - movie_unwatched_count
musicvideos_watched_count = musicvideos_count - musicvideos_unwatched_count
episode_watched_count = episode_count - episode_unwatched_count
music_songs_played_count = music_songs_count - music_songs_unplayed_count
trailers_watched_count = trailers_count - trailers_unwatched_count
WINDOW.setProperty("MB3TotalMovies", str(movie_count))
WINDOW.setProperty("MB3TotalUnWatchedMovies", str(movie_unwatched_count))
WINDOW.setProperty("MB3TotalWatchedMovies", str(movie_watched_count))
WINDOW.setProperty("MB3TotalMusicVideos", str(musicvideos_count))
WINDOW.setProperty("MB3TotalUnWatchedMusicVideos", str(musicvideos_unwatched_count))
WINDOW.setProperty("MB3TotalWatchedMusicVideos", str(musicvideos_watched_count))
WINDOW.setProperty("MB3TotalTvShows", str(tv_count))
WINDOW.setProperty("MB3TotalEpisodes", str(episode_count))
WINDOW.setProperty("MB3TotalUnWatchedEpisodes", str(episode_unwatched_count))
WINDOW.setProperty("MB3TotalWatchedEpisodes", str(episode_watched_count))
WINDOW.setProperty("MB3TotalMusicAlbums", str(music_count))
WINDOW.setProperty("MB3TotalMusicSongs", str(music_songs_count))
WINDOW.setProperty("MB3TotalUnPlayedMusicSongs", str(music_songs_unplayed_count))
WINDOW.setProperty("MB3TotalPlayedMusicSongs", str(music_songs_played_count))
WINDOW.setProperty("MB3TotalTrailers", str(trailers_count))
WINDOW.setProperty("MB3TotalUnWatchedTrailers", str(trailers_unwatched_count))
WINDOW.setProperty("MB3TotalWatchedTrailers", str(trailers_watched_count))
WINDOW.setProperty("MB3TotalPhotos", str(photos_count))
userUrl = "http://" + mb3Host + ":" + mb3Port + "/mediabrowser/Users/" + userid + "?format=json"
jsonData = downloadUtils.downloadUrl(userUrl, suppress=True, popup=1 )
result = json.loads(jsonData)
userImage = downloadUtils.getUserArtwork(result, "Primary")
WINDOW.setProperty("MB3UserImage", userImage)
if(result.get("Name") != None):
userName = result.get("Name").encode('utf-8')
WINDOW.setProperty("MB3UserName", userName)
self.logMsg("InfoTV start")
infoTVUrl = "http://" + mb3Host + ":" + mb3Port + "/mediabrowser/Users/" + userid + "/Items?&IncludeItemTypes=Series&Recursive=true&SeriesStatus=Continuing&format=json"
jsonData = downloadUtils.downloadUrl(infoTVUrl, suppress=True, popup=1 )
result = json.loads(jsonData)
self.logMsg("InfoTV Json Data : " + str(result), level=2)
totalRunning = result.get("TotalRecordCount")
self.logMsg("TotalRunningCount " + str(totalRunning))
WINDOW.setProperty("MB3TotalRunningTvShows", str(totalRunning))
self.logMsg("InfoNextAired start")
InfoNextAiredUrl = "http://" + mb3Host + ":" + mb3Port + "/mediabrowser/Users/" + userid + "/Items?IsUnaired=true&SortBy=PremiereDate%2CAirTime%2CSortName&SortOrder=Ascending&IncludeItemTypes=Episode&Limit=1&Recursive=true&Fields=SeriesInfo%2CUserData&format=json"
jsonData = downloadUtils.downloadUrl(InfoNextAiredUrl, suppress=True, popup=1 )
result = json.loads(jsonData)
self.logMsg("InfoNextAired Json Data : " + str(result), level=2)
result = result.get("Items")
if(result == None):
result = []
episode = ""
for item in result:
title = ""
seriesName = ""
if(item.get("SeriesName") != None):