Skip to content

Commit 2531a8c

Browse files
chore: add app version in config and in fe
1 parent 2ae1bfb commit 2531a8c

File tree

5 files changed

+21
-2
lines changed

5 files changed

+21
-2
lines changed

app/api/endpoints/manifest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
def get_base_manifest():
1414
return {
1515
"id": settings.ADDON_ID,
16-
"version": "0.1.1",
16+
"version": settings.APP_VERSION,
1717
"name": settings.ADDON_NAME,
1818
"description": "Movie and series recommendations based on your Stremio library",
1919
"logo": "https://raw.githubusercontent.com/TimilsinaBimal/Watchly/refs/heads/main/static/logo.png",

app/core/app.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ async def lifespan(app: FastAPI):
6161
app = FastAPI(
6262
title="Watchly",
6363
description="Stremio catalog addon for movie and series recommendations",
64-
version="0.1.0",
64+
version=settings.APP_VERSION,
6565
lifespan=lifespan,
6666
)
6767

@@ -99,6 +99,8 @@ async def configure_page(token: str | None = None):
9999
if announcement_html:
100100
snippet = '\n <div class="announcement">' f"{announcement_html}" "</div>"
101101
html_content = html_content.replace("<!-- ANNOUNCEMENT_HTML -->", snippet, 1)
102+
# Inject version
103+
html_content = html_content.replace("<!-- APP_VERSION -->", settings.APP_VERSION, 1)
102104
return HTMLResponse(content=html_content, media_type="text/html")
103105
return HTMLResponse(
104106
content="Watchly API is running. Static files not found.",

app/core/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class Settings(BaseSettings):
1717
PORT: int = 8000
1818
ADDON_ID: str = "com.bimal.watchly"
1919
ADDON_NAME: str = "Watchly"
20+
APP_VERSION: str = "0.1.1"
2021
REDIS_URL: str = "redis://localhost:6379/0"
2122
TOKEN_SALT: str = "change-me"
2223
TOKEN_TTL_SECONDS: int = 0 # 0 = never expire

static/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ <h1>
5656
<div class="card-header">
5757
<img src="/static/logo.png" alt="Watchly Logo" class="logo">
5858
<h2>Configure Watchly</h2>
59+
<div class="version-badge">v<!-- APP_VERSION --></div>
5960
<!-- ANNOUNCEMENT_HTML -->
6061
</div>
6162

static/style.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,21 @@ body {
473473
animation: spin 0.8s linear infinite;
474474
}
475475

476+
/* Version Badge */
477+
.version-badge {
478+
display: inline-block;
479+
background: rgba(14, 165, 233, 0.1);
480+
border: 1px solid rgba(14, 165, 233, 0.3);
481+
color: var(--primary);
482+
padding: 0.25rem 0.75rem;
483+
border-radius: 12px;
484+
font-size: 0.75rem;
485+
font-weight: 600;
486+
margin-top: 0.5rem;
487+
font-family: 'JetBrains Mono', monospace;
488+
letter-spacing: 0.05em;
489+
}
490+
476491
/* Announcement */
477492
.announcement {
478493
background: linear-gradient(to right, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.1));

0 commit comments

Comments
 (0)