coollsd commited on
Commit
0128340
·
verified ·
1 Parent(s): 04437b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -22
app.py CHANGED
@@ -201,11 +201,10 @@ HTML_CONTENT = """
201
  margin: 15% auto;
202
  padding: 20px;
203
  border: 1px solid #333;
204
- width: 90%;
205
  max-width: 600px;
206
  border-radius: 10px;
207
  color: #e0e0e0;
208
- text-align: center;
209
  }
210
  .close {
211
  color: #aaa;
@@ -227,22 +226,7 @@ HTML_CONTENT = """
227
  border: 1px solid #555;
228
  color: #e0e0e0;
229
  border-radius: 5px;
230
- font-size: 14px;
231
- word-break: break-all;
232
- }
233
- .copy-embed-btn {
234
- background-color: #333;
235
- color: #e0e0e0;
236
- border: none;
237
- padding: 10px 20px;
238
- border-radius: 5px;
239
- cursor: pointer;
240
- transition: all 0.3s ease;
241
- font-size: 16px;
242
- margin-top: 15px;
243
- }
244
- .copy-embed-btn:hover {
245
- background-color: #444;
246
  }
247
  </style>
248
  </head>
@@ -272,7 +256,7 @@ HTML_CONTENT = """
272
  <h2>Embed Video Link</h2>
273
  <p>Copy the following link to embed the video:</p>
274
  <input type="text" id="embedLink" readonly>
275
- <button onclick="copyEmbedLink()" class="copy-embed-btn">Copy Embed Link</button>
276
  </div>
277
  </div>
278
 
@@ -424,7 +408,7 @@ HTML_CONTENT = """
424
  selectedFiles = [];
425
  }
426
 
427
- function addResultLink(url, fileName) {
428
  const linkContainer = document.createElement('div');
429
  linkContainer.style.marginBottom = '10px';
430
 
@@ -446,7 +430,7 @@ HTML_CONTENT = """
446
  linkContainer.appendChild(link);
447
  linkContainer.appendChild(copyBtn);
448
 
449
- if (fileName.toLowerCase().endsWith('.mp4')) {
450
  const embedBtn = document.createElement('button');
451
  embedBtn.textContent = 'Embed Video for Discord';
452
  embedBtn.className = 'embed-btn';
@@ -622,4 +606,4 @@ async def retry_upload(upload_url: str, file_content: bytes, content_type: str,
622
  time.sleep(delay)
623
  delay *= 2 # Exponential backoff
624
  print('Upload failed after all retry attempts')
625
- return False
 
201
  margin: 15% auto;
202
  padding: 20px;
203
  border: 1px solid #333;
204
+ width: 80%;
205
  max-width: 600px;
206
  border-radius: 10px;
207
  color: #e0e0e0;
 
208
  }
209
  .close {
210
  color: #aaa;
 
226
  border: 1px solid #555;
227
  color: #e0e0e0;
228
  border-radius: 5px;
229
+ text-align: center;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
230
  }
231
  </style>
232
  </head>
 
256
  <h2>Embed Video Link</h2>
257
  <p>Copy the following link to embed the video:</p>
258
  <input type="text" id="embedLink" readonly>
259
+ <button onclick="copyEmbedLink()" class="btn" style="margin-top: 10px;">Copy Embed Link</button>
260
  </div>
261
  </div>
262
 
 
408
  selectedFiles = [];
409
  }
410
 
411
+ function addResultLink(url, fileName) {
412
  const linkContainer = document.createElement('div');
413
  linkContainer.style.marginBottom = '10px';
414
 
 
430
  linkContainer.appendChild(link);
431
  linkContainer.appendChild(copyBtn);
432
 
433
+ if (fileName.toLowerCase().endsWith('.mp4')) {
434
  const embedBtn = document.createElement('button');
435
  embedBtn.textContent = 'Embed Video for Discord';
436
  embedBtn.className = 'embed-btn';
 
606
  time.sleep(delay)
607
  delay *= 2 # Exponential backoff
608
  print('Upload failed after all retry attempts')
609
+ return False