var windowWidth = $(window).width();
var columns = layoutColumns;
- if (isFullScreen() || windowWidth < 1200) {
+ if (isFullScreen() || windowWidth <= 1200) {
columns = 1; /* always 1 column when in full screen or mobile */
}
AUTH_URL = 'https://www.dropbox.com/1/oauth2/authorize'
TOKEN_URL = 'https://api.dropboxapi.com/1/oauth2/token'
- CLIENT_ID = 'dwiw710jz6r60pq'
- CLIENT_NOT_SO_SECRET = '8jz75qo405ritd5'
+ CLIENT_ID = 'dropbox_client_id_placeholder'
+ CLIENT_NOT_SO_SECRET = 'dropbox_client_secret_placeholder'
LIST_FOLDER_URL = 'https://api.dropboxapi.com/2/files/list_folder'
UPLOAD_URL = 'https://content.dropboxapi.com/2/files/upload'
from codecs import open
from setuptools import setup
+from setuptools.command.sdist import sdist
import motioneye
long_description = f.read()
+class SdistCommand(sdist):
+ def make_release_tree(self, base_dir, files):
+ sdist.make_release_tree(self, base_dir, files)
+ self.apply_patches(base_dir)
+
+ def apply_patches(self, base_dir):
+ dropbox_keys_file = os.path.join(os.getcwd(), base_dir, 'extra', 'dropbox.keys')
+ if os.path.exists(dropbox_keys_file):
+ g = {}
+ execfile(dropbox_keys_file, g)
+ upload_services_file = os.path.join(os.getcwd(), base_dir, 'motioneye', 'uploadservices.py')
+ if os.system("sed -i 's/dropbox_client_id_placeholder/%s/' %s" % (g['CLIENT_ID'], upload_services_file)):
+ raise Exception('failed to patch uploadservices.py')
+ if os.system("sed -i 's/dropbox_client_secret_placeholder/%s/' %s" % (g['CLIENT_SECRET'], upload_services_file)):
+ raise Exception('failed to patch uploadservices.py')
+
+
setup(
name=name,
version=version,
'console_scripts': [
'meyectl=motioneye.meyectl:main',
],
+ },
+
+ cmdclass={
+ 'sdist': SdistCommand
}
)