[ Home ] [ wiz / dep / hob / lounge / jp / meta / games / music ] [ all ] [  Rules ] [  FAQ ] [  Search /  History ] [  Textboard ] [  Wiki ]

/meta/ - Meta

Suggestions and Feedback
Password (For file deletion.)

  [Go to bottom]   [Catalog]   [Return]   [Archive]

File: 1709659690919.jpg (55.31 KB, 1077x864, 359:288, Broken.JPG) ImgOps iqdb

df341 No.64578

Any News on whats going on with /lounge/?

The other boards seem to work fine but lounge has debug stuff showing at the bottom of the page and all the images are more or less broken.


Sorry, I thought it was fixed these past few hours but I guess I was viewing every image through my own cache (lol). There was an explainable bug, that led to a less sensible bug, that somehow changed some deep serverside stuff that for some reason deleted every image on /lounge/. I enabled the debug menu myself and forgot it was viewable for regular users.

Images are being restored, thumbnails may have to be rebuilt. This is entirely different from when I deleted all of /lounge/'s images and had to regenerate thumbnails the last time.


It's fixed now, minus video and animated thumbnails again.

df341 No.64581

Cool beans!

a9b18 No.64592

why not just use chatgpt to fix it for you with a python script

import os
import subprocess
import mysql.connector

# Configuration variable
board = "lounge"

# Function to connect to MySQL database
def connect_to_database():
        connection = mysql.connector.connect(
        return connection
    except mysql.connector.Error as err:
        print("Error: ", err)
        return None

# Function to query the database
def query_database(connection, filename):
        cursor = connection.cursor()
        truncated_filename = filename[:10]
        next_truncated_filename = str(int(truncated_filename) + 1)
        query = f"SELECT * FROM posts_{board} WHERE (files LIKE %s OR files LIKE %s) AND (files NOT LIKE %s) AND (files NOT LIKE %s)"
        cursor.execute(query, (f'%{truncated_filename}%', f'%{next_truncated_filename}%', '%spoiler%', '%thumb%'))
        result = cursor.fetchone()
        return result
    except mysql.connector.Error as err:
        print("Error: ", err)
        return None

# Function to generate thumbnails
def generate_thumbnail(video_path, thumbnail_path):
            "-i", video_path,
            "-vf", "thumbnail,scale='if(gt(iw,ih),min(255,iw),-2):if(gt(iw,ih),-2,min(255,ih))'",
            "-frames:v", "1",
        ], check=True)
        print(f"Thumbnail generated for {video_path}")
    except subprocess.CalledProcessError as err:
        print("Error: ", err)

# Main function
def main():
    src_directory = os.path.join("/var/www/wizchan", board, "src/")
    thumb_directory = os.path.join("/var/www/wizchan", board, "thumb/")
    # Connect to the database
    connection = connect_to_database()
    if not connection:
    # Iterate through files in src directory
    for filename in os.listdir(src_directory):
        if filename.endswith(".mp4") or filename.endswith(".webm"):
            full_path = os.path.join(src_directory, filename)
            # Check if filename is in database and does not contain "spoiler"
            db_result = query_database(connection, filename)
            if db_result and "spoiler" not in db_result[1]:
                thumbnail_name = os.path.splitext(filename)[0] + ".jpg"
                thumbnail_path = os.path.join(thumb_directory, thumbnail_name)
                generate_thumbnail(full_path, thumbnail_path)
    # Close the database connection

if __name__ == "__main__":


File: 1710032689391.gif (731.85 KB, 498x346, 249:173, 0d32650136a6c030ac47318ae6….gif) ImgOps iqdb

>why not just
Because I don't know how. I'm not a developer and I don't know what any of that does.

b43ad No.64594

i'll codemonkey for free

0d0e1 No.64595

File: 1710095827708.jpg (49.42 KB, 598x491, 598:491, DPmPZXtXUAAPpXM.jpg) ImgOps iqdb

>AI art is easier, now everyone can do art!
>cut to the fucking github logo
>this shit appears


[Go to top] [Catalog] [Return][Post a Reply]
Delete Post [ ]
[ Home ] [ wiz / dep / hob / lounge / jp / meta / games / music ] [ all ] [  Rules ] [  FAQ ] [  Search /  History ] [  Textboard ] [  Wiki ]