Repository navigation
feat(recommendations): mark a movie or series Not interested on phone and TV #1105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 3 commits
23302e3
f96b7d7
9c8f7c0
ddfdb0d
302fe77
8d5fa96
7a91997
56b08c2
0743817
4f97c8e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| platform=android | ||
| version=2026.11.23-73e6a54 | ||
| sha256=86e06e01b86d10bf79d824a9cd2c5307fbee294857b81bd655246f4ce6b86498 | ||
| version=local-57fd74b4c7c3 | ||
| sha256=- | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| # Generated by silo-translations 2026.11.23-73e6a54 from catalog/*.arb; do not edit. | ||
| # Generated by silo-translations local-57fd74b4c7c3 from catalog/*.arb; do not edit. | ||
| # Resource qualifiers per app, for androidResources.localeFilters. | ||
| phone=en,es,de,fr,pt-rBR,nl,it,pl,tr,sv,da,nb,fi,cs,hr,ru,uk,ja,ko,b+zh+Hans,b+zh+Hant,ar,hu,ro,sk,sl,bg,el,ca,lt,lv,et,vi,pt-rPT,in,ms,iw,hi,th | ||
| tv=en,es,de,fr,pt-rBR,nl,it,pl,tr,sv,da,nb,fi,cs,hr,ru,uk,ja,ko,b+zh+Hans,b+zh+Hant,ar,hu,ro,sk,sl,bg,el,ca,lt,lv,et,vi,pt-rPT,in,ms,iw,hi,th |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| package org.siloserver.silo.common.catalog | ||
|
|
||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.res.stringResource | ||
| import org.siloserver.silo.common.R | ||
| import org.siloserver.silo.common.i18n.LocaleFormat | ||
| import org.siloserver.silo.common.i18n.currentNumberLocale | ||
| import org.siloserver.silo.model.catalog.BrowseItem | ||
|
|
||
| /** A Settings → Not Interested row's caption: "2004 · Movie", or the kind alone without a year. */ | ||
| @Composable | ||
| fun BrowseItem.notInterestedCaption(): String = listOfNotNull( | ||
| year.takeIf { it > 0 }?.let { LocaleFormat.integer(it, currentNumberLocale()) }, | ||
| stringResource(if (type == "series") R.string.settings_notInterested_series else R.string.settings_notInterested_movie), | ||
| ).joinToString(" · ") |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ import org.siloserver.silo.common.data.db.entity.DirtyOperationEntity | |
| import org.siloserver.silo.network.ApiResult | ||
| import org.siloserver.silo.network.AuthScopeSnapshot | ||
| import org.siloserver.silo.network.TokenManager | ||
| import org.siloserver.silo.network.map | ||
| import org.siloserver.silo.network.apiv2.MembershipV2Api | ||
|
|
||
| /** | ||
|
|
@@ -24,7 +25,7 @@ class MembershipOutbox( | |
| private val processOwner: String, | ||
| ) { | ||
| data class Authority(val key: String, val scope: AuthScopeSnapshot) | ||
| enum class ListKind { FAVORITE, WATCHLIST } | ||
| enum class ListKind { FAVORITE, WATCHLIST, NOT_INTERESTED } | ||
| enum class Resolution { ACKNOWLEDGED, RECONCILED, NEEDS_RECONCILIATION, PAUSED, NOT_CLAIMED } | ||
| data class Result(val resolution: Resolution, val mayPublish: Boolean = false) | ||
|
|
||
|
|
@@ -66,6 +67,8 @@ class MembershipOutbox( | |
| else api.removeFavorite(command.targetContentId, authority.scope) | ||
| "MEMBERSHIP_WATCHLIST" -> if (present) api.addToWatchlist(command.targetContentId, authority.scope) | ||
| else api.removeFromWatchlist(command.targetContentId, authority.scope) | ||
| "MEMBERSHIP_NOT_INTERESTED" -> if (present) api.markNotInterested(command.targetContentId, authority.scope) | ||
| else api.clearNotInterested(command.targetContentId, authority.scope) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Definite not-interested clear refusals are treated as unknown outcomes A definite 4xx refusal from Also found in:
Kody rule violation: Reconcile ambiguous mutation outcomes without replaying them Prompt for LLMTalk to Kody by mentioning @kody Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not changed: this is the outbox's rule for every membership kind. Favorites and Watchlist send a 4xx to reconciliation the same way on main, and 🤖 Claude Code (claude-opus-5-5) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the clarification. Since the existing membership contract explicitly specifies a single mutation attempt followed by reconciliation, and this change applies that same behavior to Not Interested, I would not require a separate 4xx handling change in this PR. The possibility of an unresolved outcome if the follow-up read fails is a broader outbox concern, not a regression introduced by this change. |
||
| else -> error("Invalid membership operation") | ||
| } | ||
| if (response is ApiResult.Success) { | ||
|
|
@@ -91,14 +94,15 @@ class MembershipOutbox( | |
| command.profileId != authority.scope.profileId.orEmpty() || command.state !in listOf(RECONCILE, PAUSED) || | ||
| authority.scope != tokens.snapshotCurrentScope()) return Result(Resolution.NOT_CLAIMED) | ||
| val claim = command.membershipClaim ?: return Result(Resolution.NOT_CLAIMED) | ||
| val response = when (command.opKind) { | ||
| "MEMBERSHIP_FAVORITE" -> api.favorite(command.targetContentId, authority.scope) | ||
| "MEMBERSHIP_WATCHLIST" -> api.watchlist(command.targetContentId, authority.scope) | ||
| val response: ApiResult<Boolean> = when (command.opKind) { | ||
| "MEMBERSHIP_FAVORITE" -> api.favorite(command.targetContentId, authority.scope).map { it != null } | ||
| "MEMBERSHIP_WATCHLIST" -> api.watchlist(command.targetContentId, authority.scope).map { it != null } | ||
| "MEMBERSHIP_NOT_INTERESTED" -> api.notInterested(command.targetContentId, authority.scope).map { it != null } | ||
| else -> return Result(Resolution.PAUSED) | ||
| } | ||
| if (authority.scope != tokens.snapshotCurrentScope()) return Result(Resolution.NEEDS_RECONCILIATION) | ||
| if (response !is ApiResult.Success) return Result(Resolution.NEEDS_RECONCILIATION) | ||
| if ((response.data != null) == command.payloadJson.toBooleanStrict()) { | ||
| if (response.data == command.payloadJson.toBooleanStrict()) { | ||
| val removed = dao.resolveMembership(id, claim, authority.key, command.state) == 1 | ||
| // Observed state is not an acknowledgement that mutation side effects were replayed. | ||
| return Result(if (removed) Resolution.RECONCILED else Resolution.NOT_CLAIMED) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <!-- Generated by silo-translations 2026.11.23-73e6a54 from catalog/*.arb; do not edit. --> | ||
| <!-- Generated by silo-translations local-57fd74b4c7c3 from catalog/*.arb; do not edit. --> | ||
| <resources xmlns:tools="http://schemas.android.com/tools"> | ||
| <string name="account_backToSignIn">العودة إلى تسجيل الدخول</string> | ||
| <string name="account_create_creating">جارٍ الإنشاء…</string> | ||
|
|
@@ -259,9 +259,11 @@ | |
| <string name="calendar_tomorrow">غدًا</string> | ||
| <string name="calendar_watched">تمت المشاهدة</string> | ||
| <string name="cardMenu_addWatchlist">إضافة إلى قائمة المشاهدة</string> | ||
| <string name="cardMenu_notInterested">غير مهتم</string> | ||
| <string name="cardMenu_play">تشغيل</string> | ||
| <string name="cardMenu_removeContinueWatching">إزالة من متابعة المشاهدة</string> | ||
| <string name="cardMenu_resume">استئناف</string> | ||
| <string name="cardMenu_showInRecommendations">العرض في التوصيات</string> | ||
| <string name="cast_button">إرسال</string> | ||
| <string name="cast_miniBar_casting">جارٍ الإرسال</string> | ||
| <string name="cast_miniBar_connected">متصل</string> | ||
|
|
@@ -1154,6 +1156,7 @@ | |
| <string name="error_account_disabled">هذا الحساب معطّل.</string> | ||
| <string name="error_account_required">تحتاج إلى حساب على هذا الخادم.</string> | ||
| <string name="error_already_linked">هذا مرتبط بالفعل بهذا الحساب.</string> | ||
| <string name="error_app_code_invalid">هذا الرمز غير معروف أو مستخدم أو منتهي الصلاحية. احصل على رمز جديد من صفحة الخادم.</string> | ||
| <string name="error_authentication_required">سجّل الدخول للمتابعة.</string> | ||
| <string name="error_backup_unauthenticated">تعذّر التحقق من هذه النسخة الاحتياطية.</string> | ||
| <string name="error_break_glass_required">أبقِ مسؤولًا واحدًا على الأقل يمكنه تسجيل الدخول بكلمة المرور.</string> | ||
|
|
@@ -1174,11 +1177,17 @@ | |
| <string name="error_field_invalid_enum">اختر إحدى القيم المسموح بها.</string> | ||
| <string name="error_field_invalid_sort_field">يحدد الفرز حقلًا لا تفرز هذه العملية حسبه، أو يحدد حقلًا مرتين.</string> | ||
| <string name="error_field_invalid_type">نوع هذه القيمة غير صحيح.</string> | ||
| <string name="error_field_key_enrolled">هذا المفتاح مستخدم بالفعل على هذا الخادم.</string> | ||
| <string name="error_field_malformed_form">تعذّرت قراءة الملف المرفوع.</string> | ||
| <string name="error_field_malformed_json">تعذّرت قراءة الطلب.</string> | ||
| <string name="error_field_managed_by_environment">يُعيَّن هذا الخيار من البيئة. غيّره هناك وأعد تشغيل الخدمة المتأثرة.</string> | ||
| <string name="error_field_missing">هذه القيمة مفقودة.</string> | ||
| <string name="error_field_out_of_range">هذه القيمة خارج النطاق المسموح.</string> | ||
| <string name="error_field_password_needs_special">أدرج رمزًا خاصًا واحدًا على الأقل، مثل ! أو #.</string> | ||
| <string name="error_field_password_needs_uppercase">أدرج حرفًا لاتينيًا كبيرًا واحدًا على الأقل.</string> | ||
| <string name="error_field_password_too_long">كلمة المرور هذه طويلة جدًا.</string> | ||
| <string name="error_field_password_too_short">كلمة المرور هذه قصيرة جدًا.</string> | ||
| <string name="error_field_reordered_series">يستخدم هذا المسلسل ترتيب حلقات خاصًا به. أعد تعيين المسلسل بأكمله بدلًا من موسم أو حلقة واحدة.</string> | ||
| <string name="error_field_required">هذا الحقل مطلوب.</string> | ||
| <string name="error_field_unknown_field">هذا الحقل غير معروف.</string> | ||
| <string name="error_field_unknown_parameter">هذه المعلمة غير معروفة.</string> | ||
|
|
@@ -1221,6 +1230,7 @@ | |
| <string name="error_request_timeout">استغرق الطلب وقتًا طويلًا. حاول مرة أخرى.</string> | ||
| <string name="error_restore_set_changed">تغيّرت النسخة الاحتياطية منذ اخترتها. اخترها مرة أخرى.</string> | ||
| <string name="error_session_expired">انتهت صلاحية الجلسة. سجّل الدخول مرة أخرى.</string> | ||
| <string name="error_sign_in_provider_required">عندما يكون تسجيل الدخول بكلمة المرور معطّلًا، يجب أن يبقى مفعّلًا مزود تسجيل دخول يمكن للمستخدمين استخدامه. ويحتاج OpenID Connect أيضًا إلى عنوان URL العام للخادم.</string> | ||
| <string name="error_snapshot_request_conflict">هناك مزامنة أخرى قيد التشغيل. حاول مرة أخرى بعد قليل.</string> | ||
| <string name="error_sync_reset_required">يجب مزامنة تقدم المشاهدة من جديد. أعد التحميل وحاول مرة أخرى.</string> | ||
| <string name="error_token_refresh_required">يجب تحديث تسجيل الدخول. حاول مرة أخرى.</string> | ||
|
|
@@ -3502,6 +3512,10 @@ | |
| <string name="settingsManifest_playback_cellular_preferred_quality_option_480p">480p</string> | ||
| <string name="settingsManifest_playback_cellular_preferred_quality_option_720p">720p</string> | ||
| <string name="settingsManifest_playback_cellular_preferred_quality_option_auto">تلقائي</string> | ||
| <string name="settingsManifest_playback_connection_path_description">لا يزال خيار «مباشر فقط» يستخدم اتصال الشبكة المحلية عند توفره.</string> | ||
| <string name="settingsManifest_playback_connection_path_label">مسار الاتصال</string> | ||
| <string name="settingsManifest_playback_connection_path_option_automatic">تلقائي</string> | ||
| <string name="settingsManifest_playback_connection_path_option_direct_only">مباشر فقط</string> | ||
| <string name="settingsManifest_playback_intro_skip_mode_description">ما يفعله Silo عند بدء المقدمة: تركها، أو عرض زر «تخطي المقدمة»، أو تخطيها مع إتاحة التراجع.</string> | ||
| <string name="settingsManifest_playback_intro_skip_mode_label">تخطي المقدمات</string> | ||
| <string name="settingsManifest_playback_intro_skip_mode_option_always">التخطي تلقائيًا</string> | ||
|
|
@@ -4140,7 +4154,7 @@ | |
| <string name="upNext_onDeck">قيد المشاهدة</string> | ||
| <string name="upNext_pickAnother">اختيار غيره</string> | ||
| <string name="upNext_pickAnotherFailed">تعذّر اختيار عنصر آخر.</string> | ||
| <string name="upNext_playNow">التشغيل الآن</string> | ||
| <string name="upNext_playNow">تشغيل الحلقة التالية</string> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use content-neutral Arabic text for The Arabic value Revise the Arabic translation so it does not name episodes. Apply the change in the translation source (silo-translations) and regenerate
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not from this PR: these values are already on silo-translations main (from Silo-Server/silo-translations#163, which renamed the button to Play Next Up and describes it as starting the next episode). This branch only syncs them in with its own keys, and any later sync would bring them in too. A wording change belongs in the catalog. 🤖 Claude Code (claude-opus-5-5) |
||
| <plurals name="upNext_runtime"> | ||
| <item quantity="zero">%1$d د</item> | ||
| <item quantity="one">%1$d د</item> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocks merge: the strings are pinned to a local catalog build.
version=local-…withsha256=-names a commit that isn't a published silo-translations release, and CI'scheck-translationsfails on it (the Select CI work job). The catalog PR, Silo-Server/silo-translations#205, was also missing its translation pass, sotranslations-completefailed there.I've pushed the translation pass to #205 and re-synced this branch against it with
--local. Once #205 merges and its release publishes, this branch needsscripts/sync-translations --version <release>.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed the translation pass to Silo-Server/silo-translations#205 (ec136c7, 18 keys in 38 languages, validator clean) and re-synced this branch against it in 302fe77. The re-pin to a published release still has to wait for #205 to merge.
🤖 Claude Code (claude-opus-5-5)