Stdout problem struggling + add access_token to gitignore
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
.cache
|
||||
access_token.txt
|
||||
|
||||
# Devenv
|
||||
.devenv*
|
||||
|
||||
@@ -5,4 +5,5 @@
|
||||
/nix/store/dzz1xf4nxx8v42pz5sxxx62r0jjpl0qf-craftcerts-script: line 5: 2: command not found
|
||||
req: Extra option: "1"
|
||||
req: Use -help for summary.
|
||||
- [ ] Make geturl.py needs to return playlist URL to the program
|
||||
- [ ] Make geturl.py return playlist URL to the program
|
||||
Currently hangs and returns nothing to stdout + returns flask stdout bullshit
|
||||
|
||||
@@ -8,10 +8,14 @@ import time
|
||||
import requests
|
||||
from datetime import datetime
|
||||
import subprocess
|
||||
import logging
|
||||
|
||||
app = Flask(__name__)
|
||||
stop_flask = threading.Event()
|
||||
|
||||
logger = logging.getLogger('flask')
|
||||
logger.setLevel(logging.ERROR) # Set to ERROR to ignore lower levels
|
||||
|
||||
client_id = "c0020cc0e05245efb2ddb61b7045e4f2"
|
||||
client_secret = "2e2e7c98f849403fbacc219c1f01c17d"
|
||||
redirect_uri = "https://elease-uncapsuled-yosef.ngrok-free.dev/callback" # Hardcoded ngrok URL
|
||||
@@ -86,8 +90,8 @@ def create_playlist():
|
||||
def run_flask():
|
||||
with open(os.devnull, 'w') as fnull:
|
||||
# Redirect both stdout and stderr to devnull
|
||||
sys.stdout = fnull
|
||||
sys.stderr = fnull
|
||||
#sys.stdout = fnull
|
||||
sys.stderr = fnull # COMMENT FOR DEBUG
|
||||
subprocess.run(["xdg-open", "http://192.168.0.100:8888"])
|
||||
app.run(host="0.0.0.0", port=8888, use_reloader=False)
|
||||
# sys.stdout = sys.__stdout__ # Restore original stdout
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
* Serving Flask app 'geturl'
|
||||
* Debug mode: off
|
||||
|
||||
Reference in New Issue
Block a user