style: 💄 Update title for all pages
This commit is contained in:
		
							
								
								
									
										5
									
								
								main.py
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								main.py
									
									
									
									
									
								
							@ -41,7 +41,6 @@ def create_playlist():
 | 
				
			|||||||
        data = requests.get((os.getenv("n8n_webhook_create_playlist") + "/" + str(roomid) + "/" + playlistName))
 | 
					        data = requests.get((os.getenv("n8n_webhook_create_playlist") + "/" + str(roomid) + "/" + playlistName))
 | 
				
			||||||
        playlistID = data.json()['playlistID']
 | 
					        playlistID = data.json()['playlistID']
 | 
				
			||||||
        spotifyURL = data.json()['spotifyURL']
 | 
					        spotifyURL = data.json()['spotifyURL']
 | 
				
			||||||
        print(playlistID)
 | 
					 | 
				
			||||||
        cursor.execute("INSERT INTO rooms (roomid, spotify_id, playlist_name, spotify_URL) VALUES (?, ?, ?, ?)",
 | 
					        cursor.execute("INSERT INTO rooms (roomid, spotify_id, playlist_name, spotify_URL) VALUES (?, ?, ?, ?)",
 | 
				
			||||||
                       (roomid, playlistID, playlistName, spotifyURL))
 | 
					                       (roomid, playlistID, playlistName, spotifyURL))
 | 
				
			||||||
        database.commit()
 | 
					        database.commit()
 | 
				
			||||||
@ -71,14 +70,10 @@ def search(roomid):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
@app.route('/add/room/<string:roomid>/playlist/<string:playlistID>/track/<string:trackid>', methods=['GET'])
 | 
					@app.route('/add/room/<string:roomid>/playlist/<string:playlistID>/track/<string:trackid>', methods=['GET'])
 | 
				
			||||||
def add_to_playlist(roomid, playlistID, trackid):
 | 
					def add_to_playlist(roomid, playlistID, trackid):
 | 
				
			||||||
    print(roomid)
 | 
					 | 
				
			||||||
    print(playlistID)
 | 
					 | 
				
			||||||
    print(trackid)
 | 
					 | 
				
			||||||
    if not os.getenv("n8n_webhook_add_tracks"):
 | 
					    if not os.getenv("n8n_webhook_add_tracks"):
 | 
				
			||||||
        return render_template("add.html", response="No n8n webhook provided", comment="Please provide a n8n webhook in the .env file", type="error", roomid=roomid)
 | 
					        return render_template("add.html", response="No n8n webhook provided", comment="Please provide a n8n webhook in the .env file", type="error", roomid=roomid)
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        data = requests.get(os.getenv("n8n_webhook_add_tracks") + "/" + playlistID + "/" + trackid)
 | 
					        data = requests.get(os.getenv("n8n_webhook_add_tracks") + "/" + playlistID + "/" + trackid)
 | 
				
			||||||
        print(data.json)
 | 
					 | 
				
			||||||
        if data.json()['status'] == 'success':
 | 
					        if data.json()['status'] == 'success':
 | 
				
			||||||
            return render_template("add.html", response="Track added to playlist successfully", comment="Enjoy the night \U0001f57a", type="success", roomid=roomid)
 | 
					            return render_template("add.html", response="Track added to playlist successfully", comment="Enjoy the night \U0001f57a", type="success", roomid=roomid)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -2,7 +2,7 @@
 | 
				
			|||||||
<html lang="en">
 | 
					<html lang="en">
 | 
				
			||||||
    <head>
 | 
					    <head>
 | 
				
			||||||
        <meta charset="UTF-8">
 | 
					        <meta charset="UTF-8">
 | 
				
			||||||
        <title>Fête de la musique</title>
 | 
					        <title>Make this playlist</title>
 | 
				
			||||||
        <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
 | 
					        <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
 | 
				
			||||||
        {{ bootstrap.load_css() }}
 | 
					        {{ bootstrap.load_css() }}
 | 
				
			||||||
    </head>
 | 
					    </head>
 | 
				
			||||||
 | 
				
			|||||||
@ -2,7 +2,7 @@
 | 
				
			|||||||
<html lang="en">
 | 
					<html lang="en">
 | 
				
			||||||
    <head>
 | 
					    <head>
 | 
				
			||||||
        <meta charset="UTF-8">
 | 
					        <meta charset="UTF-8">
 | 
				
			||||||
        <title>Fête de la musique</title>
 | 
					        <title>Make this playlist</title>
 | 
				
			||||||
        <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
 | 
					        <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
 | 
				
			||||||
        {{ bootstrap.load_css() }}
 | 
					        {{ bootstrap.load_css() }}
 | 
				
			||||||
    </head>
 | 
					    </head>
 | 
				
			||||||
 | 
				
			|||||||
@ -2,7 +2,7 @@
 | 
				
			|||||||
<html lang="en">
 | 
					<html lang="en">
 | 
				
			||||||
    <head>
 | 
					    <head>
 | 
				
			||||||
        <meta charset="UTF-8">
 | 
					        <meta charset="UTF-8">
 | 
				
			||||||
        <title>Fête de la musique</title>
 | 
					        <title>Make this playlist</title>
 | 
				
			||||||
        <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
 | 
					        <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
 | 
				
			||||||
        {{ bootstrap.load_css() }}
 | 
					        {{ bootstrap.load_css() }}
 | 
				
			||||||
    </head>
 | 
					    </head>
 | 
				
			||||||
 | 
				
			|||||||
@ -2,7 +2,7 @@
 | 
				
			|||||||
<html lang="en">
 | 
					<html lang="en">
 | 
				
			||||||
<head>
 | 
					<head>
 | 
				
			||||||
    <meta charset="UTF-8">
 | 
					    <meta charset="UTF-8">
 | 
				
			||||||
    <title>Fête de la musique</title>
 | 
					    <title>Make this playlist - Search</title>
 | 
				
			||||||
    {{ bootstrap.load_css() }}
 | 
					    {{ bootstrap.load_css() }}
 | 
				
			||||||
</head>
 | 
					</head>
 | 
				
			||||||
<body>
 | 
					<body>
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user