Giter Club home page Giter Club logo

Comments (8)

trumpy81 avatar trumpy81 commented on May 29, 2024 1

Thanks for that. For some reason I completely ignored the XML file ... doh!

You are quite right, there does seem to be an issue with the date/time not being parsed correctly.

Unfortunately, I cannot say when this will be fixed due to the aforementioned reasons.

from webtools-ng.

trumpy81 avatar trumpy81 commented on May 29, 2024

I believe the issue was actually caused by Plex itself. I recall in the past that a version or two of Plex was not adding the Date Added time correctly within the Plex DB, whenever you added new content.

That issue was corrected as far as I know, but any file added while you had the bad version/s of Plex installed, will exhibit this issue when exporting to .csv using WebTools-NG.

To correct the issue within the .csv file, you need to Plex Dance any file that displays an incorrect date/time in the .csv file.

  1. Remove the offending file/s from your library
  2. Optimise Database
  3. Clean Bundles
  4. Re-add the offending files to the library
  5. Rescan the library if needed
  6. Re-export with WebTools-NG and notice the corrected times/dates.

If the library itself is also effected, then the solution maybe to:

  1. Remove the library completely from Plex
  2. Optimise Database
  3. Clean Bundles
  4. Re-add as new library (Library name may be the same as the old library)

The above assumes that you have the latest version of Plex Media Server (1.31.3.6819) installed and not an earlier version.

from webtools-ng.

jdmallen avatar jdmallen commented on May 29, 2024

This is happening to me, too, and I doubt this is Plex. Like OP noted, Plex is reporting the date correctly. The exporter is storing the month with 0-based indexing, which I suspect is due to how JS treats months. It also happens with all exported dates. The likelihood of all the dates across all 700+ of my movies being wrong at the source is improbable.

I exported all the date fields available for Movies, attempted to parse them in Excel (via DATEVALUE), and highlighted the rows where there was a date that failed to parse. Note that there is no instance of the month of December (12), and that some instances of February have a day of either 30 or 31. This suggests an offset of -1 with the month values. Correcting with that in mind (using EDATE(A1,1) in Excel, for those looking for a quick way to fix an export) yields a date matching that from Plex.

image

from webtools-ng.

trumpy81 avatar trumpy81 commented on May 29, 2024

You state that Plex has the correct Date Added, but I am unable to confirm that.

Plex/Web displaying Date Added
230818438-61ac1462-8ebf-4f38-9b4f-40ff095b52d5

Raw .csv file contains no Date Added data in the specified format
image

As you can see from the images above, Plex does NOT display the actual Date Added value for anything other than the most recent entry, anywhere that I am aware of and the .csv file does NOT contain the actual date data, you only see the human readable format in the .csv file.

If I am in error, please show me evidence of that, thanks.

I do NOT discount what you have stated re: JavaScript and it's date handling, but Plex dancing the file/s in question resolved the issue for me at least and should do the same for you also.

I would also advise you to check the Release notes for Plex. They do show acknowledgement of the Date Added issue. Sorry, but I do NOT recall which version/s of Plex were affected.

That being said, Tommy is extremely busy with both life and work right now and he is facing a forced rewrite of WebTools-NG due to the coding environment being extensively updated and his current environment becoming obsolete and no longer supported.

Any possible updates/corrections will be quite some time in the making and we do not have any time frame for that unfortunately :(

from webtools-ng.

jdmallen avatar jdmallen commented on May 29, 2024

If I am in error, please show me evidence of that, thanks.

Not a problem; sorry I didn't originally include that.

Here is an excerpt from the XML from one in the middle of my screenshot in the comment above— The Batman (2022), reportedly added 2022-06-28— and screenshots showing how I obtained it.

image

image

<?xml version="1.0" encoding="UTF-8"?>
<MediaContainer size="1"
                allowSync="1"
                identifier="com.plexapp.plugins.library"
                librarySectionID="1"
                librarySectionTitle="Movies"
                librarySectionUUID="e0e0419b-0388-4f09-82de-cedb8f19def6"
                mediaTagPrefix="/system/bundle/media/flags/"
                mediaTagVersion="1670489099">
    <Video ratingKey="11525"
           key="/library/metadata/11525"
           guid="plex://movie/5d776c6fad5437001f7be040"
           studio="6th &amp; Idaho"
           type="movie"
           title="The Batman"
           titleSort="Batman"
           librarySectionTitle="Movies"
           librarySectionID="1"
           librarySectionKey="/library/sections/1"
           contentRating="PG-13"
           summary="When a sadistic serial killer begins [...TRUNCATED]"
           rating="8.5"
           audienceRating="8.7"
           year="2022"
           tagline="Unmask the truth."
           thumb="/library/metadata/11525/thumb/1680157620"
           art="/library/metadata/11525/art/1680157620"
           duration="10571610"
           originallyAvailableAt="2022-03-01"
           addedAt="1658988331"
           updatedAt="1680157620"
           audienceRatingImage="rottentomatoes://image.rating.upright"
           chapterSource="media"
           primaryExtraKey="/library/metadata/11527"
           ratingImage="rottentomatoes://image.rating.ripe">
    <!-- [...TRUNCATED...] -->
    </Video>
</MediaContainer>

Note that the addedAt and updatedAt fields contains their dates in the Unix Epoch format: 1658988331 and 1680157620, respectively.

Epoch date ISO 8601 date offset
1658988331 2022-07-28T02:05:31-04:00
1680157620 2023-03-30T02:27:00-04:00

(Verify here)

Look at the export again:
image

Plex is reporting the date correctly. The export is exactly 1 month off.

Please let me know if I left anything out.

from webtools-ng.

jdmallen avatar jdmallen commented on May 29, 2024

Thought it might also be useful to know my Export Settings:

image

I used a Custom Level with the fields TMDB ID, Title, Year, Rating, View Count, Last Viewed at, Added, and Updated selected. This was the raw output for The Batman (other movies deleted):

"TMDB ID"|"Title"|"Year"|"Rating"|"View Count"|"Last Viewed at"|"Added"|"Updated"
"414906"|"The Batman"|"2022"|"8.5"|"N/A"|"N/A"|"2022-06-28 2:05:31"|"2023-02-30 2:27:00"

I took a quick look at a code, but the only place I could find addedAt or updatedAt being parsed was here, which just pulls the date string split off using the function here. It's not clear to me yet where it pulls the time, and the function I just linked works fine.

I've never worked with Electron (nor Vue, for that matter), but I know JS and web dev, so I could probably take a crack at debugging this soon.

from webtools-ng.

jdmallen avatar jdmallen commented on May 29, 2024

Oh, and the code snippets I linked are the version of the app I used, 1.2.1. Probably should have mentioned that, too.

from webtools-ng.

DoubleDownAgain avatar DoubleDownAgain commented on May 29, 2024

Glad I found this, thought I was losing my mind. I set up my new Plex library in early July and exports are still a month off. Great tool, very helpful.

from webtools-ng.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.