Jump to content

Is it possible to modify this part using a JavaScript change?


Recommended Posts

Posted

2024-08-16170547.thumb.png.cd40a4eba813067d084bb2d01ad7523b.png

 

In the attached screenshot, the movie's runtime is displayed as 1h51m. Is it possible to modify the JavaScript to display the runtime in minutes only (111m)? It seems to be related to the mediainfo.js file visible in the developer tools, but I'm not sure exactly where to make the changes. Could you help me with this?

 

Happy2Play
Posted

Not positive but believe it is in the datetime.js but have no idea how to change it.

  • Thanks 1
Posted

Is it possible to replace "h" or "m" with different words instead?

visproduction
Posted (edited)

Ana,  No I do not think there is an option anywhere to change h and m variables like there is inside Microsoft software.  The hours and minute values are created inside modules/common/datetime.js,  You would have to rewrite the var inside GetDisplayrunningTime both at the top and bottom {try{var... of this file.  Even if you get the settings correct, they would all change back on every update.  This is perhaps better posted as a feature request.  I think the number of people preferring minutes only might be 1 in 500 or so.  Is it worth, I am guessing 6 to 10 hours coding time and another 20 hours bug fixing over several years to make this feature?

There is also a possiblity that changing this can break several other issues on the site.

I didn't code any of this, so this is a just my guess based on a quick look at the file.  This is one of those features that sound simple, because you may have seen it elsewhere, but is much more complex to offer as an option, than you may think.

Hope that helps.

Edited by visproduction
Posted
On 8/18/2024 at 12:14 AM, visproduction said:

Ana,  No I do not think there is an option anywhere to change h and m variables like there is inside Microsoft software.  The hours and minute values are created inside modules/common/datetime.js,  You would have to rewrite the var inside GetDisplayrunningTime both at the top and bottom {try{var... of this file.  Even if you get the settings correct, they would all change back on every update.  This is perhaps better posted as a feature request.  I think the number of people preferring minutes only might be 1 in 500 or so.  Is it worth, I am guessing 6 to 10 hours coding time and another 20 hours bug fixing over several years to make this feature?

There is also a possiblity that changing this can break several other issues on the site.

I didn't code any of this, so this is a just my guess based on a quick look at the file.  This is one of those features that sound simple, because you may have seen it elsewhere, but is much more complex to offer as an option, than you may think.

Hope that helps.

You're right; I looked into it in several places, and it turns out to be more complex than I initially thought. Since I'm not very proficient in JavaScript, implementing that might take some time, and it doesn't seem worth the effort. Thanks for the good advice.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...