If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Plex Sort by Date

Zodiac69Zodiac69 Posts: 86Members ✭✭

Can i set Plex to sort by file date and not by date that the Pleax database was created?
I just changes from Windows back to linux, new hardware, and did a clean install of PLEX.

My files are now all over the show instead of in the sequince they were saved on my drives.
Is the Windows Database the same as the Linux one as i tried this: https://forums.plex.tv/discussion/200415/recently-added-changed-to-file-create-modified-date and it did not work on my Plex database file.

Can our Plex guru's please assist so that i can sort the add date to be file date?

Z

Best Answer

Answers

  • gjaltembagjaltemba Posts: 310Members ✭✭✭

    what is the output of

    select metadata_items.added_at, media_items.updated_at from metadata_items, media_items where media_items.metadata_item_id=metadata_items.id

  • Zodiac69Zodiac69 Posts: 86Members ✭✭

    I get a list of date and time stamps that are almost all the same, the date and time stamps match when i re-created my database, they are all 2017-08-19 00:XX:YY

  • Zodiac69Zodiac69 Posts: 86Members ✭✭
    edited August 20

    When i run this on my Linux box i get "Error: no such table: metadata_items"

  • gjaltembagjaltemba Posts: 310Members ✭✭✭

    The file modified date is stored in the updated_at column. If it contains recent timestamp, are they the same as the file timestamps?

    It may help if you state which linux distro you are running.

  • Zodiac69Zodiac69 Posts: 86Members ✭✭
    edited August 20

    Hi gjaltemba

    I am no sql fundi, if you show me how to check i can.
    I run ClearOS as my home media server

  • gjaltembagjaltemba Posts: 310Members ✭✭✭

    You can list the file timestamp in your media library with

    ls -la /my/media/folder

    By the sounds of it, the timestamps are recent.

  • Zodiac69Zodiac69 Posts: 86Members ✭✭

    Hi gjaltemba

    Attached is a listing of one of my media drives.
    As you can see, the timestamps are not all recent.

    list.txt 256.1K
  • Zodiac69Zodiac69 Posts: 86Members ✭✭
    edited August 21

    I had a look at the database and "directories" and updated_at match the folder date and time.
    I looked at "media_items" and here updated_at match the file date and time stamp.
    What else can i look for that can cause Plex sort by date to be so screwed-up?

    Recently Added Television and Recently Added Movies does not match.
    I have a movie from 2016/09/16 that show it is the lates movie added and series from 2014/10/05 that is the latest.

  • gjaltembagjaltemba Posts: 310Members ✭✭✭

    select metadata_items.added_at, media_items.updated_at from metadata_items, media_items where media_items.metadata_item_id=metadata_items.id and metadata_items.title="Moonraker"

    Should result in 2011/12/04 13:04

    If not the Get Info -> View XML and post the addedAt updatedAt

  • Zodiac69Zodiac69 Posts: 86Members ✭✭

    This is the output: "2017-08-18 18:33:03|2011-12-04 13:04:58"

  • Zodiac69Zodiac69 Posts: 86Members ✭✭
    edited August 22

    I get an error - no sutch table: metadata_items

  • Zodiac69Zodiac69 Posts: 86Members ✭✭
    edited August 22

    So, for some reasom sqlite on linux did not like what we treid to do.
    I coppied the file to my win 10 desktop, use DB Browser for SQLite and ammended the file as per your instructions and it all worked.
    Thank you for the assitance.
    Do you know why this happened? Is this a issue with the version of PMS i have?

    P.S. - is their a way to fix "On-Deck" as it is also a mess....

  • gjaltembagjaltemba Posts: 310Members ✭✭✭

    Need write permission to /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases/ folder.

    https://forums.plex.tv/discussion/comment/1243314#Comment_1243314

    Need better definition of "On-Deck" problem. Best to start a new topic.

  • Zodiac69Zodiac69 Posts: 86Members ✭✭
    edited August 25

    What i mean is... do you know why my dates in the database was all screwed up?
    I just loaded a 2nd drive with old animation movies and the same happened.

Sign In or Register to comment.