-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConstants.py
More file actions
68 lines (63 loc) · 1.7 KB
/
Constants.py
File metadata and controls
68 lines (63 loc) · 1.7 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
""" All constants for SMG """
from os import environ
from os.path import dirname, join
import sys
# The time waited until the next loop
UI = None
CONFIG = None
TIMEOFFSET = 4
# if ZuneNowPlaying is running or not
ZUNESTARTED = False
JRIVER = None
ITUNES = None
# the version of the program, used for checking for updates.
VERSION = 1
# All programs that are toggled on by user
ACTIVEITEMS = {}
# All programs that are toggled off by user
INACTIVEITEMS = {}
# All items
ITEMS = {
'foobar2000': 'foobar',
'winamp': 'winamp',
'vlc media player': 'vlc',
'spotify': 'spotify',
'spotifyweb *': 'spotifyweb',
'grooveshark': 'grooveshark',
'youtube': 'youtube',
'soundcloud': 'soundcloud',
'pandora *': 'pandora',
'itunes': 'itunes',
'mediamonkey': 'mediamonkey',
'zune': 'zune',
'plug.dj *': 'plug',
'jriver media payer': 'jrivermp',
'zaycev *': 'zaycev',
'8tracks *': '8tracks',
'rdio *': 'rdio',
'google play music *': 'googleplay',
'musicbee': 'musicbee'
}
# Zune sup-process
SUBP = None
OPTIONS = {
'splitText': False
}
update_dialog_lbl = None
update_dialog = None
def resource_path(relative_path):
""" Get absolute path to resource, works for dev and for PyInstaller """
filename = relative_path
if hasattr(sys, '_MEIPASS'):
# PyInstaller >= 1.6
# chdir(sys._MEIPASS)
filename = join(sys._MEIPASS, filename)
elif '_MEIPASS2' in environ:
# PyInstaller < 1.6 (tested on 1.5 only)
# chdir(environ['_MEIPASS2'])
filename = join(environ['_MEIPASS2'], filename)
else:
# chdir(dirname(sys.argv[0]))
filename = join(dirname(sys.argv[0]), filename)
return filename
_timeOffset = 4