Skip to content

Commit ab84ac7

Browse files
simplification
1 parent b313b05 commit ab84ac7

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

app/api/endpoints/manifest.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ def get_base_manifest(user_settings: UserSettings | None = None):
1818
catalogs = []
1919

2020
if user_settings:
21-
22-
print(user_settings)
2321
# Handle watchly.rec
2422
rec_config = next((c for c in user_settings.catalogs if c.id == "watchly.rec"), None)
2523
if not rec_config or rec_config.enabled:
@@ -94,8 +92,6 @@ async def _manifest_handler(response: Response, token: str):
9492
if not creds:
9593
raise HTTPException(status_code=401, detail="Token not found. Please reconfigure the addon.")
9694

97-
logger.info(f"[{token}] User settings: {user_settings}")
98-
9995
base_manifest = get_base_manifest(user_settings)
10096

10197
bundle = StremioBundle()

app/services/profile/scorer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def _year_to_era(year: int) -> str:
136136
if year < 1970:
137137
return "pre-1970s"
138138
elif year < 1980:
139-
return "1970s"
139+
return "1980s"
140140
elif year < 1990:
141141
return "1990s"
142142
elif year < 2000:

app/services/scoring.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@ def _calculate_score_components(self, item: StremioLibraryItem) -> dict:
6565
completion_score = 0.0
6666
completion_rate = 0.0
6767

68-
# Prefer ratio-based completion when duration is available to avoid
69-
# treating short partial plays as full completion just because
70-
# `timesWatched` was incremented. If duration is missing, fall back
71-
# to conservative estimates based on timesWatched/flaggedWatched.
7268
if state.duration and state.duration > 0:
7369
try:
7470
ratio = min(float(state.timeWatched) / float(state.duration), 1.0)
@@ -144,7 +140,7 @@ def _calculate_score_components(self, item: StremioLibraryItem) -> dict:
144140
days_since = (now - last_watched).days
145141

146142
MAX_RECENCY_SCORE = 100.0
147-
HALF_LIFE_DAYS = 20.0 # Days for score to halve
143+
HALF_LIFE_DAYS = 60.0 # Days for score to halve
148144

149145
if days_since >= 0:
150146
recency_score = MAX_RECENCY_SCORE * math.exp(-days_since / HALF_LIFE_DAYS)

0 commit comments

Comments
 (0)