durationinseconds in Kodi nfo missing for ISOs

🐞 Bug Report

🐛 Summary

TMM doesn't set the durationinseconds-Tag in the streamdetails, if the video file is an ISO.

📈 What is the expected behavior?

TMM should set the durationinseconds-Tag.

🧐 Actual Behavior

streamdetails are set, but the video-tag is missing the durationinseconds-Tag, e.g.:

  <fileinfo>
    <streamdetails>
      <video>
        <codec>vc-1</codec>
        <aspect>1.78</aspect>
        <width>1920</width>
        <height>1080</height>
        <resolution>1080</resolution>
      </video>
      ...

image

It doesn't matter whether I supply my own mediainfo or let TMM generate the mediainfo. With a mkv videofile durationinseconds will be correctly set.

♻️ Steps to reproduce:

  1. Add an ISO to your movie directory
  2. scan your sources
  3. Wait for the mediainfo generation
  4. scrape the movie
  5. Look at the generated nfo: durationinseconds is missing

🔖 Environment

  • TMM version: 5.2.12, portable and free version for testing, same issue in older versions and Pro
  • OS: Arch Linux
  • Language: de

💡 Additional Context

I only noticed that because of the new Kodi Versions Feature (V21, heavily improved in V22). If you have the movie in multiple versions but durationinseconds is not set in the streamdetails, all versions of the movie will have the same runtime (runtime of one of the movies). I also checked the Kodi database: In the streamdetails table iVideoDuration is 0 for every ISO.

TMM shows the correct runtime.

I guess it went unnoticed for so long because Kodi also stores the runtime in the movie table and uses that as fallback. If you have the movie two times, you'll have the same movie two times in the movie table, each with its own runtime. If you now add one of the movies as version of the other movie the second movie will get deleted and now both movies use the same fallback.

The tmm logs should contain everything from scan of the source to generation of the nfo. I also added the generated nfo and mediainfo and a mediainfo I created on my own.


Checklist before submitting:

  • I have checked existing issues to avoid duplicates
  • I have provided clear steps to reproduce the bug
  • I have attached logs/screenshots
  • I am willing to help test a fix if available