Replace emoji icons with local SVG files for consistent rendering
- Created 10 SVG icon files in app/static/icons/ (Feather Icons style) - Updated base.html with SVG icons in navigation and dark mode toggle - Updated dashboard.html with icons in stats cards and quick actions - Updated content_list_new.html (playlist management) with SVG icons - Updated upload_media.html with upload-related icons - Updated manage_player.html with player management icons - Icons use currentColor for automatic theme adaptation - Removed emoji dependency for better Raspberry Pi compatibility - Added ICON_INTEGRATION.md documentation
This commit is contained in:
44
add_orientation_column.py
Normal file
44
add_orientation_column.py
Normal file
@@ -0,0 +1,44 @@
|
||||
"""
|
||||
Add orientation column to playlist table
|
||||
Run this script to update the database schema
|
||||
"""
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Add parent directory to path
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
from app.app import app
|
||||
from app.extensions import db
|
||||
from sqlalchemy import text
|
||||
|
||||
def add_orientation_column():
|
||||
"""Add orientation column to playlist table."""
|
||||
with app.app_context():
|
||||
try:
|
||||
# Check if column exists
|
||||
result = db.session.execute(text("PRAGMA table_info(playlist)"))
|
||||
columns = [row[1] for row in result]
|
||||
|
||||
if 'orientation' in columns:
|
||||
print("✅ Column 'orientation' already exists in playlist table")
|
||||
return
|
||||
|
||||
# Add the column
|
||||
print("Adding 'orientation' column to playlist table...")
|
||||
db.session.execute(text("""
|
||||
ALTER TABLE playlist
|
||||
ADD COLUMN orientation VARCHAR(20) DEFAULT 'Landscape' NOT NULL
|
||||
"""))
|
||||
db.session.commit()
|
||||
|
||||
print("✅ Successfully added 'orientation' column to playlist table")
|
||||
print(" Default value: 'Landscape'")
|
||||
|
||||
except Exception as e:
|
||||
print(f"❌ Error adding column: {str(e)}")
|
||||
db.session.rollback()
|
||||
raise
|
||||
|
||||
if __name__ == '__main__':
|
||||
add_orientation_column()
|
||||
Reference in New Issue
Block a user