-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
71 lines (47 loc) · 1.5 KB
/
main.py
File metadata and controls
71 lines (47 loc) · 1.5 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import mc
import jobmanager
import jobs
import utils
from params import *
myJobManager = 0
adsList = 0
leftImage = 0
rightImage = 0
topImage = 0
adImage = 0
def onload():
global myJobManager, rssRoot, adsList, leftImage, rightImage, topImage, adImage
#Set Global Lists/Images
adsList = mc.GetActiveWindow().GetList(120)
leftImage = mc.GetActiveWindow().GetImage(300)
rightImage = mc.GetActiveWindow().GetImage(310)
topImage = mc.GetActiveWindow().GetImage(320)
adImage = mc.GetActiveWindow().GetImage(150)
#Create JobManager
myJobManager = jobmanager.BoxeeJobManager(1)
#Scroll Menu Automatically
myJob = jobs.MenuScrollJob(menuInterval, 6, leftImage, rightImage, topImage)
myJob.process()
myJobManager.addJob(myJob)
utils.SetScrollAds(adsList, adImage, myJobManager)
utils.SetBreakingNews(14010, myJobManager, 120)
#Start Job Manager
myJobManager.start()
def onunload():
global myJobManager
myJobManager.stop()
#Scroll Left & Right Menus according to scrollDirection
def scrollMenu(scrollDirection="none"):
global leftMenuList, rightMenuList
#Scroll Menu List
{
"left" : leftMenuList.ScrollPageUp,
"right": leftMenuList.ScrollPageDown,
"none" : leftMenuList.GetFocusedItem #Do Nothing
}[scrollDirection]()
#Get Focused ListItem
focusedItem = utils.GetFocusedListItem(leftMenuList)
#focusedItem.Dump()
#mc.ShowDialogNotification(focusedItem.GetPath())
#Set Right Menu Content Url Based on focusedItem
rightMenuList.SetContentURL(focusedItem.GetPath())