class PurunNVR(object): MAX_CAMERA_NUM = 4 APP_PATH = os.path.abspath(os.path.dirname(__file__)) RESOURCE_PATH = os.path.join(APP_PATH, 'resources') def __init__(self): '''self.config = {} if mntdir is None: self.config['VIDEO_PATH'] = os.path.join(self.APP_PATH, 'videos') self.config['SNAPSHOT_PATH'] = os.path.join(self.APP_PATH, 'snapshot') else: self.config['VIDEO_PATH'] = os.path.join(mntdir, 'videos') self.config['SNAPSHOT_PATH'] = os.path.join(mntdir, 'snapshot') self.config['SNAPSHOT_PREFIX'] = 'sshot_' self.config['Motion'] = True self.config['Timeout'] = 30 * 60''' # self.pb = Pushbullet(PB_API_KEY) self.pref = Preferences(self) self._setupUI() def _setupUI(self): self.win = NvrWindow(self) def start(self): self.win.start() Gtk.main()
def _setupUI(self): self.win = NvrWindow(self)