YAMJ / yamj-v2

Yet Another Movie Jukebox (YAMJ) v2
GNU General Public License v3.0
28 stars 11 forks source link

Short-film duration truncated by mediaInfoScanner #2738

Closed Omertron closed 9 years ago

Omertron commented 9 years ago

Original issue 2741 created by Omertron on 2014-08-22T19:35:59.000Z:

What steps will reproduce the problem?

  1. Scan a short film (i.e. < 15 minutes)
  2. YAMJ will show a truncated duration

What is the expected output? What do you see instead? If MediaInfo tell a duration of 596480, YAMJ will translate it by 165h 40 min instead of 9min 56s.

Please use labels and text to provide additional information. This bug appears with release r3877. Does the following test has some foundation? 552 if (duration > 0) { 553 if (duration > 900000) { 554 // 15 minutes in milliseconds 555 duration = duration / 1000; 556 } else if (duration > 900) { 557 // 15 minutes in seconds 558 // No change required 559 } else { 560 // probably in minutes 561 duration = duration * 60; 562 } 563 // Duration is returned in minutes, convert it to seconds 564 movie.setRuntime(DateTimeTools.formatDuration(duration), MEDIAINFO_PLUGIN_ID);

The duration returned by mediaInfo should ever be in milliseconds, isn't it?

Omertron commented 9 years ago

Comment #1 originally posted by Omertron on 2014-09-04T16:29:55.000Z:

Here is a fix. MediaInfo gives every duration in milliseconds, so we don't need these tests.

Omertron commented 9 years ago

Comment #2 originally posted by Omertron on 2014-09-05T08:24:50.000Z:

This issue was closed by revision r3906.