Git Product home page Git Product logo

Comments (5)

druckdev avatar druckdev commented on July 22, 2024 1

Yes, they do.

I also did some light debugging through prints and it looked as if up into addActivity the timestamps are correct. Almost as if they are being overwritten later.

I am not very proficient with Go but could it be caused by some kind of pass-by-reference issue? I saw that CustomDate is defined as a pointer in the Activity and ActivityAddRequest structs.

Thanks!

from watcharr.

druckdev avatar druckdev commented on July 22, 2024 1

Oh, I just reopened my library and noticed that the timestamps are correct now... After further testing it seems like the movies have the wrong timestamps directly after the import but the correct ones after a page refresh. Navigating to a different movie and back does not help though - I needed to actually refresh the page.

Here an example json:

[
  {
    "id": 1,
    "createdAt": "2024-04-15T12:50:30.403313124+02:00",
    "updatedAt": "2024-04-15T12:50:43.247365724+02:00",
    "deletedAt": null,
    "status": "WATCHING",
    "rating": 8,
    "thoughts": "",
    "content": {
      "id": 1,
      "tmdbId": 226979,
      "title": "Test",
      "poster_path": "/tTWRomgIMOoIB3CJLPlVbqSawEm.jpg",
      "overview": "San Francisco, 1985. Two opposites attract at a modern dance company. Together, their courage and resilience are tested as they navigate a world full of risks and promise, against the backdrop of a disease no one seems to know anything about.",
      "type": "movie",
      "release_date": "2013-06-29T00:00:00Z",
      "popularity": 6.698,
      "vote_average": 6.8,
      "vote_count": 197,
      "imdb_id": "tt2407380",
      "status": "Released",
      "budget": 0,
      "revenue": 0,
      "runtime": 89,
      "numberOfEpisodes": 0,
      "numberOfSeasons": 0
    },
    "activity": [
      {
        "id": 1,
        "createdAt": "2024-04-15T12:50:30.408406997+02:00",
        "updatedAt": "2024-04-15T12:50:30.408406997+02:00",
        "deletedAt": null,
        "watchedId": 1,
        "type": "ADDED_WATCHED",
        "data": "{\"rating\":3,\"status\":\"FINISHED\"}"
      },
      {
        "id": 2,
        "createdAt": "2024-04-15T12:50:34.562653432+02:00",
        "updatedAt": "2024-04-15T12:50:34.562653432+02:00",
        "deletedAt": null,
        "watchedId": 1,
        "type": "RATING_CHANGED",
        "data": "8"
      },
      {
        "id": 3,
        "createdAt": "2024-04-15T12:50:43.252948636+02:00",
        "updatedAt": "2024-04-15T12:50:43.252948636+02:00",
        "deletedAt": null,
        "watchedId": 1,
        "type": "STATUS_CHANGED",
        "data": "WATCHING"
      }
    ]
  }
]

from watcharr.

IRHM avatar IRHM commented on July 22, 2024 1

@druckdev Thanks again for reporting this, happy to see it looks like it hasn't affected your list after that refresh.

You were right, it was an issue with it using the same pointer for all of the dates, so when returned, the object would have the same value for all of the dates (but each activity is added sequentially so it didn't effect the values in the database).

from watcharr.

IRHM avatar IRHM commented on July 22, 2024

Hi @druckdev, sorry this is causing you issues.

Do the dates and times look right in the exported json file?

I will have a look into this when possible, hopefully tonight.

from watcharr.

IRHM avatar IRHM commented on July 22, 2024

I haven't touched the code in a while, but yep, you might be right on that. Will definitely check this out.

By any chance, if you're able to provide your watcharr json export (not all of it's needed, just one movie/show that is broken), it may help me reproduce later, incase I can't tonight (incase you go offline, I'll have it as a backup so this issue won't be delayed an extra day if i need it).

Thanks for looking into it too, it'll help me pin point the issue quicker!

from watcharr.

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.