diff --git a/main.py b/main.py
index 157cbf8..d349422 100644
--- a/main.py
+++ b/main.py
@@ -5,7 +5,10 @@ import aiosqlite
from quart import Quart, render_template, request, send_from_directory, Response
from datetime import datetime
from babel.dates import format_datetime
+<<<<<<< HEAD
from urllib.parse import quote
+=======
+>>>>>>> 9cc0929a09596abeb93ee7f2711527fb5da25f7a
@@ -49,10 +52,15 @@ async def get_maps(page=1, per_page=30):
return maps
def get_image_path(filepath):
+<<<<<<< HEAD
print(f"Получение пути изображения для файла: {filepath}")
image_path = os.path.join(DATA, filepath)
if not os.path.exists(image_path):
print("Изображение не найдено, возвращаем дефолтное.")
+=======
+ image_path = os.path.join(DATA, filepath)
+ if not os.path.exists(image_path):
+>>>>>>> 9cc0929a09596abeb93ee7f2711527fb5da25f7a
return "/images/image.jpg"
return f"/images/{filepath.split('/')[0]}/{filepath.split('/')[1]}/{filepath.split('/')[1]}.jpg"
@@ -64,26 +72,41 @@ def get_star_image(stars):
@app.route('/images/
')
async def serve_image(filename):
+<<<<<<< HEAD
print(f"Запрос изображения с именем: {filename}")
image_path = os.path.join(DATA, filename)
if os.path.exists(image_path):
print(f"Изображение {filename} найдено и отправляется.")
+=======
+ image_path = os.path.join(DATA, filename)
+ if os.path.exists(image_path):
+>>>>>>> 9cc0929a09596abeb93ee7f2711527fb5da25f7a
return await send_from_directory(DATA, filename)
else:
default_image_path = os.path.join(DATA, 'image.jpg')
if os.path.exists(default_image_path):
+<<<<<<< HEAD
print("Изображение не найдено, отправляем дефолтное.")
return await send_from_directory(DATA, 'image.jpg')
print("Не найдено ни одного изображения.")
+=======
+ return await send_from_directory(DATA, 'image.jpg')
+>>>>>>> 9cc0929a09596abeb93ee7f2711527fb5da25f7a
return "Default image not found", 404
@app.route('/stars/')
async def serve_star_image(filename):
+<<<<<<< HEAD
print(f"Запрос изображения звезды: {filename}")
stars = os.path.join(DATA, 'stars')
star_path = os.path.join(stars, filename)
if os.path.exists(star_path):
print(f"Звезда {filename} найдена и отправляется.")
+=======
+ stars = os.path.join(DATA, 'stars')
+ star_path = os.path.join(stars, filename)
+ if os.path.exists(star_path):
+>>>>>>> 9cc0929a09596abeb93ee7f2711527fb5da25f7a
return await send_from_directory(stars, filename)
else:
print("Изображение звезды не найдено.")
@@ -123,7 +146,10 @@ async def download_bsp():
return "No .bsp file found in the same directory", 404
file_path = os.path.join(DATA, image_folder, bsp_filename)
+<<<<<<< HEAD
print(f"Найден файл для скачивания: {file_path}")
+=======
+>>>>>>> 9cc0929a09596abeb93ee7f2711527fb5da25f7a
SPEED_LIMIT = 60 * 1024 * 1024 // 8
@@ -366,10 +392,18 @@ async def robots_txt():
if __name__ == '__main__':
+<<<<<<< HEAD
print("Запуск приложения...")
import hypercorn.asyncio
from hypercorn.config import Config
config = Config()
config.bind = ["0.0.0.0:5000"]
- hypercorn.asyncio.run(app, config)
\ No newline at end of file
+ hypercorn.asyncio.run(app, config)
+=======
+ import hypercorn.asyncio
+ from hypercorn.config import Config
+ config = Config()
+ config.bind = ["0.0.0.0:5000"]
+ hypercorn.asyncio.run(app, config)
+>>>>>>> 9cc0929a09596abeb93ee7f2711527fb5da25f7a
diff --git a/requirements.txt b/requirements.txt
index 9c1bbff..9ee090e 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,8 @@
aiosqlite~=0.20.0
Hypercorn~=0.17.3
Quart~=0.19.6
+<<<<<<< HEAD
babel~=2.16.0
+=======
+babel~=2.16.0
+>>>>>>> 9cc0929a09596abeb93ee7f2711527fb5da25f7a