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

JSON API does not share EXIF data for pictures in slideshow (GetInfoLabels) #23360

Closed
1 of 7 tasks
wutschel opened this issue Jun 4, 2023 · 5 comments · Fixed by #24344 · May be fixed by #24109
Closed
1 of 7 tasks

JSON API does not share EXIF data for pictures in slideshow (GetInfoLabels) #23360

wutschel opened this issue Jun 4, 2023 · 5 comments · Fixed by #24344 · May be fixed by #24109
Assignees
Labels
Resolution: Fixed issue was resolved by a code change Triage: Confirmed issue has been reproduced by a team member v20 Nexus v21 Omega

Comments

@wutschel
Copy link

wutschel commented Jun 4, 2023

Bug report

Describe the bug

Here is a clear and concise description of what the problem is:

The JSON API of Kodi 21.0 ALPHA does not provide the expected response for picture EXIF data when requesting it via the following command:

{
    "jsonrpc": "2.0",
    "method": "XBMC.GetInfoLabels",
    "params": {"labels": ["Slideshow.Resolution",
                          "Slideshow.Process",
                          "Slideshow.Filename",
                          "Slideshow.CameraModel",
                          "Slideshow.CameraMake",
                          "Slideshow.EXIFTime",
                          "Slideshow.Aperture",
                          "Slideshow.ISOEquivalence",
                          "Slideshow.ExposureTime",
                          "Slideshow.Exposure",
                          "Slideshow.ExposureBias",
                          "Slideshow.MeteringMode",
                          "Slideshow.FocalLength"]
    },
    "id": 1
}

With 19.5 it works with the same image files.

Also, as per iOS Remote App use it does not work with Kodi 20.1, but with Kodi 17.6 (see https://forum.kodi.tv/showthread.php?tid=359717&pid=3155095#pid3155095).

Expected Behavior

Here is a clear and concise description of what was expected to happen:

The response provides results for all requested items, if present.

Actual Behavior

The response has empty strings as results for most of the fields. Only for camera make, camera model, filename, resolution and time there is a proper response.

Possible Fix

I cannot tell.

To Reproduce

Steps to reproduce the behavior:

  1. Add images with EXIF data to playlist and start playing them.
  2. Send JSON command as described above.
  3. Review response.

Debuglog

The debuglog can be found here:

Screenshots

Here are some links or screenshots to help explain the problem:

Additional context or screenshots (if appropriate)

Here is some additional context or explanation that might help:

Your Environment

Used Operating system:

  • Android

  • iOS

  • tvOS

  • Linux

  • macOS

  • Windows

  • Windows UWP

  • Operating system version/name: Linux Mint 21.1

  • Kodi version: 21.0 ALPHA

note: Once the issue is made we require you to update it with new information or Kodi versions should that be required.
Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

@xbmc-gh-bot xbmc-gh-bot bot added the Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it label Jun 4, 2023
@rockrider69
Copy link

Hello,

+1 for solving this issue!

I can add that EXIF tag "UserComment" is not being reported correctly anymore, although it worked perfectly ok in Matrix or Leia when used in Slideshow labels for example.

$INFO[Slideshow.EXIFComment] : gives now an empty string despite it is not empty at all
$INFO[Slideshow.SlideComment] : supposed to be same as previous one, according to documentation, but now gives something weird about lavc software version. Not empty though if the documentation should be right...

Seems that mean more deeply broken stuff in EXIF tags management with Nexus ...

Note : This can be easily repoduced with the JSON API call as described in this issue, field name being Slideshow.EXIFComment.

@enen92 enen92 added Triage: Confirmed issue has been reproduced by a team member v20 Nexus v21 Omega and removed Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it labels Jul 26, 2023
@enen92 enen92 self-assigned this Nov 10, 2023
@wutschel
Copy link
Author

wutschel commented Dec 23, 2023

@enen92, I was looking at the code changes which added the out-of-boundary fixes from aosp. While doing this I stumbled across the use of sizeof(short) instead of using 2. Isn't sizeof(short) different for different compilers/platforms? Could this probably be related to the issues we're seeing (e.g. due to a compiler change)?

Code snippets from ExifParse.cpp:

const char* pos = (const char*)(ExifSection + sizeof(short));   // position data pointer after length field
...
pos += sizeof(short);

The Google code just uses 2 in these situations.

@wutschel
Copy link
Author

Update: I could setup a Kodi build for Linux and look into the code changes related to the security / out-of-boundary checks which were made in 7e5f9fb and 00fec1d. None of them is causing the failing exif. Also changing sizeof(short) to 2 does not make a difference. The root cause is some other change.

@wutschel
Copy link
Author

Thanks! Just compiled it and confirmed the EXIF data is readable again via JSON API.

@rockrider69
Copy link

@enen92 Thx a lot for proposing a fix on V19/V20 before the main rewriting, much appreciated !

@thexai thexai added the Resolution: Fixed issue was resolved by a code change label Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Fixed issue was resolved by a code change Triage: Confirmed issue has been reproduced by a team member v20 Nexus v21 Omega
Projects
None yet
4 participants