Jellyfin Forum
SOLVED: Unplayed Filter not working - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: SOLVED: Unplayed Filter not working (/t-solved-unplayed-filter-not-working)



Unplayed Filter not working - vong - 2024-09-18

TLDR: Setting Filter to Unplayed shows many played items (but does filter some out).

I have just migrated over to Jellyfin from Kodi due to its ease of setup and client / server architecture, very nice!

Everything went very smoothly in the migration - few hiccups (The watched status migration via Trakt was a bit of a chore, but I think I got it manually fixed.  Was mostly the kodi side not setting the watch list properly I think).

I have Jellyfin server installed via dropbox, accessing via a multitude of apps (WebOS, Web Browser, Android app, iOS App, etc).

When I set the filter to Un-played, it seems to be showing most of the items in my library.  The library item shows that it has been played (Blue check mark, and the played check mark when looking at the item detail)

If I manually unset the play status, then re-set the played status in the library, it does filter it out until a server reboot.  Each time the server reboots the filter shows a different set of items (with lots of overlap).

I have about 60 unplayed items in the library, about 500 total.  When the unplayed filter is activated, it shows about 400 items.

This is happening on all the clients, so it makes me think this is a server problem?  For ease of debugging I will use the web browser for versioning information:

Server version: 10.9.10
Web version: 10.9.10
Build version: 10.9.10

Ive looked in the debug log, but they all seem to be about library scanning / streaming.  Nothing in there about UI.  I did play around with the REST interface to confirm the error there, and it is there too:

Items?filters=IsUnplayed&isPlayed=false&sortBy=Name&limit=100&includeItemTypes=Movie&isMovie=true&recursive=true&apikey=***&userId=***

I did try with both Filters=IsUnplayed, or isPlayed=false, with various combinations and permutations - each giving odd results (and none giving a null result, which you would expect with filters=IsUnplayed & isPlayed=True)

But you can see in the below code:

        "Played": true,
        "PlayCount": 1


Code:
  {
      "Name": "A Good Day to Die Hard",
      "ServerId": "xxx",
      "Id": "yyy",
      "HasSubtitles": true,
      "Container": "avi",
      "PremiereDate": "2013-02-06T00:00:00.0000000Z",
      "CriticRating": 15,
      "OfficialRating": "14A",
      "ChannelId": null,
      "CommunityRating": 5.3,
      "RunTimeTicks": 58590240000,
      "ProductionYear": 2013,
      "IsFolder": false,
      "Type": "Movie",
      "UserData": {
        "PlaybackPositionTicks": 0,
        "PlayCount": 1,
        "IsFavorite": false,
        "LastPlayedDate": "2024-09-09T02:32:40.453Z",
        "Played": true,
        "Key": "47964"
      },
      "VideoType": "VideoFile",
    
      },
      "LocationType": "FileSystem",
      "MediaType": "Video"
    },


Anyone have any thoughts?


RE: Unplayed Filter not working - TheDreadPirate - 2024-09-18

Are you saving watch status in NFOs?


RE: Unplayed Filter not working - vong - 2024-09-18

Yes, I believe I checked that box. Looking in the nfo I can see :
<watched>false</watched>

Which is odd, but progress!


RE: Unplayed Filter not working - TheDreadPirate - 2024-09-18

Since you are using both Trakt and NFOs for watch status, I'm wondering if there is a conflict. Depending on what state each is in when the library scan runs.

You should use one or the other, IMO.


RE: Unplayed Filter not working - vong - 2024-09-18

OK so I unchecked the NFO, and the watched list is displaying correctly now. Should I submit a bug report?

PS, apparently I marked one of my posts as the solution instead of yours - not sure how to undo that :s


RE: Unplayed Filter not working - TheDreadPirate - 2024-09-18

This is not a bug. Both settings were working correctly, but working against each other.

You could argue that they should sync up, but then you'd have to decide which source is authoritative. Or which source has higher precedence. Trakt or the status in the NFO?

I'm barely an amateur programmer (I'm a sys admin) but my understanding says that this would require a lot of new code, and reworking of existing code, to implement some sort of sync or order of precedence. Keeping in mind that Trakt is an optional plugin.


RE: Unplayed Filter not working - vong - 2024-09-18

Yea, that is true. I had thought about it when I first checked the NFO button (but apparently forgot about it by the time I noticed this issue lol), but I was hoping that it would overwrite the NFO as it was unchecked before, so once it was added it should have set the data.

But alas, we found the root cause, that is something Smiling-face

Worst case I could likely delete all the NFOs then regenerate them from the database.

Thank you for the help!