Fix Sort by Last Played for Movies and TV Shows#1062
Conversation
Sort by Last Played was a no-op for both the Movies and TV Shows lists. The library sync omits the lastplayed field via JSON-RPC, so the local cache column stays NULL and the menu option produces an effectively unordered list. VideoType.FieldsMovie.LASTPLAYED and VideoType.FieldsTVShow.LASTPLAYED are both commented out of the property arrays in SyncMovies.java and SyncTVShows.java. SyncUtils already writes the field to the local cache when present (lines 61 and 160), so uncommenting in the property arrays is sufficient. Verified on a Pixel emulator against a live Kodi library: both lists now sort with most-recently-played at the top.
|
Decision: APPROVE kodiai responseDecision: APPROVE Evidence:
Review Details
|
Summary
Sort by Last Played was a no-op for both the Movies and TV Shows lists. The library sync omits the
lastplayedfield via JSON-RPC, so the local cache column stays NULL and the menu option produces an effectively unordered list.Root cause
VideoType.FieldsMovie.LASTPLAYEDandVideoType.FieldsTVShow.LASTPLAYEDare both commented out of the property arrays inSyncMovies.javaandSyncTVShows.javarespectively. A 2022 commit (f8c8d48) explicitly split the TV Shows line and leftLASTPLAYEDcommented while uncommentingVOTES, but no rationale was recorded. The Movies version appears to have been commented since the file was created.SyncUtils(lines 61 and 160) already writes the field to the local cache when present, so requesting it via JSON-RPC is sufficient to populate the column.Fix
Uncomment the field in both property arrays. One line each, two files.
Test plan
./gradlew assembleRelease lintRelease testDebugUnitTest— clean