-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added detection if photo or video is 360
- Loading branch information
1 parent
9e780fd
commit dc6a2c5
Showing
2,421 changed files
with
1,085,101 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,29 @@ | ||
from controller.modules.home.geocode_utils import GeoCodeUtils | ||
|
||
from config import UPLOAD_FOLDER | ||
from config import UPLOAD_FOLDER, load_custom_video_folder | ||
from controller import create_app | ||
from flask_sqlalchemy import SQLAlchemy | ||
import db | ||
from controller.models.models import Wanderpi | ||
from controller import socketio | ||
from flask_dropzone import Dropzone | ||
from flask import send_from_directory | ||
from config import STATIC_FOLDER, CUSTOM_STATIC_FOLDER | ||
from config import STATIC_FOLDER | ||
from controller.modules.files.utils import get_file_extension | ||
import os | ||
import json | ||
|
||
app = create_app('dev') | ||
droppzone = Dropzone(app) | ||
|
||
|
||
@app.route("/static/<path:path>") | ||
def static_dir(path): | ||
print(path) | ||
extension = get_file_extension() | ||
if extension == 'css' or extension == 'js' or extension == 'json': | ||
return send_from_directory(STATIC_FOLDER, path) | ||
else: | ||
return send_from_directory(CUSTOM_STATIC_FOLDER, path) | ||
|
||
|
||
@app.route('/wanderpi/<path:filename>') | ||
def custom_static(filename): | ||
print("Serving this: " + str(filename)) | ||
CUSTOM_STATIC_FOLDER, VIDEOS_FOLDER, UPLOAD_FOLDER = load_custom_video_folder() | ||
return send_from_directory(CUSTOM_STATIC_FOLDER, filename) | ||
|
||
if __name__ == '__main__': | ||
#app.run(threaded=True, host="0.0.0.0") | ||
db.Base.metadata.create_all(db.engine) | ||
|
||
app.run(threaded=True, host="0.0.0.0", ssl_context='adhoc') | ||
# w = threading.Thread(target=ImagesWatcher(UPLOAD_FOLDER).run()) | ||
|
||
# w.start() | ||
# t.start() | ||
load_custom_video_folder() | ||
app.run(threaded=True, host="0.0.0.0", ssl_context=('/etc/letsencrypt/live/wanderpi.duckdns.org/fullchain.pem', '/etc/letsencrypt/live/wanderpi.duckdns.org/privkey.pem')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.