Different "Duration" Format Feature Request

Tell us about your wildest feature dreams. Or just harmless suggestions for improvement.

Different "Duration" Format Feature Request

Postby cramertsr » Sun May 09, 2010 11:03 pm

I know the movie covers only list the duration in minutes format but then you have to mentally convert that to hours and minutes to figure out when the movie would be finished or when to start the movie. It would be great if you had the choice to list the duration in hours and minutes format (ex.: 1:24 for one-hour, 24 minutes) so you would only have to perform this conversion once instead of every time you want to watch the movie.
cramertsr
Junior Member
Junior Member
 
Posts: 3
Joined: Sun May 09, 2010 10:49 pm

Re: Different "Duration" Format Feature Request

Postby kbarnes70 » Mon May 10, 2010 9:32 am

cramertsr wrote:I know the movie covers only list the duration in minutes format but then you have to mentally convert that to hours and minutes to figure out when the movie would be finished or when to start the movie. It would be great if you had the choice to list the duration in hours and minutes format (ex.: 1:24 for one-hour, 24 minutes) so you would only have to perform this conversion once instead of every time you want to watch the movie.


You can list the duration any way you like right now! The field accepts anything - not just digits. So you can edit the field to 1hr 24m if you like, or 1:24 or anything else you want. The easiest way to do this is to display the field in table view and then sort on the field. You can then edit all the movies that share a duration time in minutes in one go*. It will still take a while if you have a lot of movies but obviously less time than editing them all individually. Currently I just grab the duration in minutes from the IMDb database but I rather liked the idea of displaying the duration as 1hr 24m when I just tested it - it is more meaningful at a glance than 84 minutes.

Amazingly, it seems that you can still sort on duration (or at least I seem able to do using a format of 1hr 55m etc). What I can't do is to use my Smart Collection that lists movies of less than 105 minutes duration - for when I want a shorter movie, usually if it's late at night and I am tired! A workaround for that would be to leave the Duration field in minutes, uncheck it so it isn't displayed in info view, then create a custom field called 'How Long' or something and display that in my Table View and my Info View. Hmmm... you've given me some good ideas here.

*Select the movies that share a common time - eg 101 minutes. Then click Edit in the top left corner, then edit the duration field to 1hr 41m etc, then click OK.

Kind regards,

Keith
kbarnes70
Addicted to Bruji
Addicted to Bruji
 
Posts: 333
Joined: Tue Nov 11, 2008 3:15 pm
Location: United Kingdom

Re: Different "Duration" Format Feature Request

Postby cramertsr » Mon May 10, 2010 1:37 pm

Ok, thanks. You're right that I can list my movies as 1:24 and it works to sort the list of movie by duration. The only small remaining problem for me is that it doesn't show the total movie lengths at the bottom in hours and minutes because it reads 1:24 as 1 minute - 24 seconds. Just a minor quibble.
cramertsr
Junior Member
Junior Member
 
Posts: 3
Joined: Sun May 09, 2010 10:49 pm

Re: Different "Duration" Format Feature Request

Postby kbarnes70 » Mon May 10, 2010 3:35 pm

cramertsr wrote:Ok, thanks. You're right that I can list my movies as 1:24 and it works to sort the list of movie by duration. The only small remaining problem for me is that it doesn't show the total movie lengths at the bottom in hours and minutes because it reads 1:24 as 1 minute - 24 seconds. Just a minor quibble.


Yes, I hadn't spotted that as I have that item disabled on my status bar - TBH I've never found it to be of much use to know how long it would take to watch a group of movies!! :)

Since you mentioned this idea, I have created a custom field called "Length" and changed my entire database to the format 2h 29m etc. It didn't take more than 30 minutes to change almost 1000 movies using the method I outlined above.

On the Info View pane this is much better IMO as I can see at a glance exactly how long the movie is. I have disabled the "Duration" field in Info View. On my Table View I have "Length" showing instead of "Duration". I have retained the "Duration" field with the minutes (but it isn't displayed anywhere now) so that I can keep my Smart Collection that shows the shorter movies in my collection, which I do find very useful sometimes. So all in all, the best of all worlds.

Thanks for the idea!

Kind regards,

Keith
kbarnes70
Addicted to Bruji
Addicted to Bruji
 
Posts: 333
Joined: Tue Nov 11, 2008 3:15 pm
Location: United Kingdom

Re: Different "Duration" Format Feature Request

Postby Jonas » Tue May 11, 2010 11:03 am

If you have the duration in DVDPedia in minutes, and you just want to change the way that the duration is presented in the InfoView, then you can change this by editing the html-file. So instead of for example 101 you will see 1:41 in the InfoView.

Please note that this script ONLY works if the value in the duration field is entered in numbers ONLY, like "101". It does NOT work if you have the word "min" or something like that after the value, like "101 min".

In your InfoView HTML-file, find the line:
Code: Select all
!--IFduration<div class="field"><div class="title">[translate:duration]:</div><div class="text"> [key:duration]</div></div>ENDduration-->


Replace that line with the following:
Code: Select all
<!--IFduration<div class="field"><div class="title">[translate:duration]:</div><div class="text">
<script type="text/javascript">
var Hours = Math.floor("[key:duration]"/60);
var Minutes = "[key:duration]"%60;
var Time = Hours + ":" + Minutes;
document.write(Time);
</script>
</div></div>ENDduration-->



And in the above code the line
Code: Select all
var Time = Hours + ":" + Minutes;

can of course be changed to
Code: Select all
var Time = Hours + "h " + Minutes + "m";

to display the duration in the InfoView as "1h 41m" insted of "1:41".
Jonas
Addicted to Bruji
Addicted to Bruji
 
Posts: 28
Joined: Fri Jan 04, 2008 11:58 am
Location: Sweden

Re: Different "Duration" Format Feature Request

Postby Conor » Tue May 11, 2010 12:37 pm

Those are all really amazing tricks. For the JavaScript you can add the parseInt function to avoid any problems with the "min" suffix or any other characters. The final script would be:
Code: Select all
<!--IFduration<div class="field"><div class="title">[translate:duration]:</div><div class="text">
<script type="text/javascript">
var Duration = parseInt("[key:duration]");
var Hours = Math.floor(Duration/60);
var Minutes = Duration % 60;
var Time = Hours + ":" + Minutes;
document.write(Time);
</script>
</div></div>ENDduration-->
User avatar
Conor
Top Dog
 
Posts: 5281
Joined: Sat Jul 03, 2004 12:58 pm

Re: Different "Duration" Format Feature Request

Postby kbarnes70 » Tue May 11, 2010 2:27 pm

Conor wrote:Those are all really amazing tricks. For the JavaScript you can add the parseInt function to avoid any problems with the "min" suffix or any other characters. The final script would be:
Code: Select all
<!--IFduration<div class="field"><div class="title">[translate:duration]:</div><div class="text">
<script type="text/javascript">
var Duration = parseInt("[key:duration]");
var Hours = Math.floor(Duration/60);
var Minutes = Duration % 60;
var Time = Hours + ":" + Minutes;
document.write(Time);
</script>
</div></div>ENDduration-->


That works perfectly in the main Info View pane but in Table View it still displays as 000 etc. My solution, although requiring tedious manual changes to each DVD as it is added, shows the time as 0h 00m in both. It's not as elegant as course because it requires manual intervention but I find that I have to do a fair bit of manual changes anyway to get all the details right. In fact I have edited the layout of the Edit Pane so that all the fields I need to fiddle with are on the Main pane and all the others are on the Extras pane - this makes it easier to locate them and to change them.

Kind regards,

Keith
kbarnes70
Addicted to Bruji
Addicted to Bruji
 
Posts: 333
Joined: Tue Nov 11, 2008 3:15 pm
Location: United Kingdom


Return to Feature Requests

cron