-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.py
More file actions
43 lines (31 loc) · 1.13 KB
/
utils.py
File metadata and controls
43 lines (31 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import mc
import jobs
from params import *
def SetScrollAds(adsList, adImage, myJobManager):
global adInterval
if (adSource == "rss"):
adsList.SetVisible(True)
#Set Ads Container Path & Load Content
adsList.SetContentURL("rss://"+rssRoot+"Ads/ads.xml")
#Add Ads Scroll Job To JobManager
myJob = jobs.ContainerScrollJob(adInterval, adsList)
myJobManager.addJob(myJob)
elif (adSource == "local"):
adImage.SetVisible(True)
#Create Local Image Scroll Job To JobManager
myJob = jobs.LocalImageScrollJob(adInterval, adImage, localAdList)
#Process First Image
myJob.process()
#Add to Job Manager
myJobManager.addJob(myJob)
def SetBreakingNews(windowId, myJobManager, imageId):
global breakingNewsInterval, breakingNewsDuration
#Add Breaking News Job To JobManager
myJob = jobs.BreakingNewsJob(breakingNewsInterval, windowId, breakingNewsDuration, imageId, breakingNewsImageList)
myJobManager.addJob(myJob)
################################
##### General Utilities ####
################################
def GetFocusedListItem(list):
focusedItemId = list.GetFocusedItem()
return list.GetItem(focusedItemId)