-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathController.py
More file actions
executable file
·41 lines (27 loc) · 876 Bytes
/
Controller.py
File metadata and controls
executable file
·41 lines (27 loc) · 876 Bytes
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
#!/usr/bin/python
import Settings
import Api
import CustomResource
import Users
import Tracks
import Sysaccess
import redis
class Controller:
def __init__(self):
CustomResource.CustomResource.controller = self
self.redis = redis.Redis('localhost')
self.settings = Settings.Settings(self)
self.api = Api.Api(self,self.settings.user['user'],self.settings.user['password'])
self.users = Users.Users(self)
self.tracks = Tracks.Tracks(self)
me = self.api.get('/me')
self.me = me.id
self.users[me.id] = me
self.users[me.id].download()
for guest in self.settings.guests:
self.users[guest].download()
if __name__ == "__main__":
c = Controller()
# print c.users[49299].utf8('username')
# print c.users[49299].ascii('username')
# print c.users[49299].path()