Update "Last Played Date"

Hello,

I tried searching for an answer to this but did not find one.

I have a need to update the “Last Played Date” of some of my media. Is there a way I can select or search for a number of files (by title works) and update the “Last Played Date” to a specific date?

Even if I have to modify a file, that would work.

You would need to edit the database file directly to do that. Can’t be done in the interface.

if you are not comfortable with editing DB then the only other thing i can think of is to change the date of your computer to whatever you needed then mark something as played.

I am definitely comfortable editing the database. I am actually an Oracle PL/SQL developer at my day job. So I guess I just need to know how to access the DB.

location of the db file is ~/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db

it is sqlite3

Thanks!

So I am looking at the DB now, but would you happen to know what table contains the “Last Played Date”?

Should be “metadata_item_settings”

Ok, the “Last Played Date” (column actually called last_viewed_at) is in metadata_item_settings.

It took me some digging around, but I finally figured out that if I am looking for the “Last Played Date” for a particular TV show, I can use this query:

> select *
>   from metadata_item_settings
>  where guid in (
>                 select guid
>                   from metadata_item_views
>                  where grandparent_title = 'Seinfeld' -- show title
>                  --and parent_index = 3               -- season #
>                  --and "index" > 16                   -- episode #
>                )
> ;
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.