Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] The Date fields are not working. #213

Open
bigjohn98pl opened this issue May 23, 2024 · 4 comments
Open

[BUG] The Date fields are not working. #213

bigjohn98pl opened this issue May 23, 2024 · 4 comments
Labels
Type: Bug Something isn't working as intended Type: Enhancement New feature or request

Comments

@bigjohn98pl
Copy link

bigjohn98pl commented May 23, 2024

Sw version: 9.2.1

When user want to add the Date fields (Date, Date Created, Date_x...) then the filed is added without date or the filed have old data from another filed.

Actions:

  1. Click on the picture
  2. Click on the "Add Field" button
  3. Choose filed with the date
  4. Add the filed

Expected:

  • new data filed is added with the right data format.

Observed:

  • Every date type filed is empty or have values form other fields.

image
image

@CyanVoxel CyanVoxel added Type: Bug Something isn't working as intended Type: Enhancement New feature or request labels May 23, 2024
@michaelmegrath
Copy link
Contributor

I ran into a similar issue while trying to debug the last issue I fixed. I have a good idea of what the source of the issue of the dates having values of other fields. I'll take a jab at it tonight.

In terms of the date field, is your issue that you can't edit the field or that you would prefer the date field gets created with a default date instead of starting blank? (whether that be the current date or another default date)

@CyanVoxel
Copy link
Member

Right now date fields are implemented on the backend, but there's currently no frontend for the user to modify them with. The incorrect fields being shown on them might be related to #92

@michaelmegrath
Copy link
Contributor

When I fixed #115 I found that the Containers list in preview panel appears to get out of order with the backend when it is sorted with "Alt + S", there is a chance that there are other ways it gets out of order as well.

@bigjohn98pl
Copy link
Author

bigjohn98pl commented May 24, 2024

I ran into a similar issue while trying to debug the last issue I fixed. I have a good idea of what the source of the issue of the dates having values of other fields. I'll take a jab at it tonight.

In terms of the date field, is your issue that you can't edit the field or that you would prefer the date field gets created with a default date instead of starting blank? (whether that be the current date or another default date)

I think the the dates should be set using the meta data form the file. This information is already set, so why we don't use it?
We can use pymediainfo module to get information about the file_creation_date and file_last_modification_date.

from pymediainfo import MediaInfo

def get_full_metadata(file_path):
    media_info = MediaInfo.parse(file_path)
    for track in media_info.tracks:
        print(f"Track type: {track.track_type}")
        for key, value in track.to_data().items():
            print(f"{key}: {value}")

file_path = 'path_to_your_file.jpg'
get_full_metadata(file_path)

@bigjohn98pl bigjohn98pl changed the title The Date fields are not working. [BUG] The Date fields are not working. May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working as intended Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants