06-16-2013, 02:55 AM | #1 |
FFR Veteran
Join Date: Jul 2012
Posts: 358
|
Sort songs list by length
For a while it's been bothering me that the song list can't be sorted by difficulty, both for consistency and because sometimes I want to find the longest or shortest songs. Now that I know JavaScript, I would be very happy to write the code for it if I could see where the rest of the sorting is. Couldn't find it with the Chrome dev tools.
|
06-22-2013, 01:25 AM | #3 |
shots FIRED
Global Moderator, User Support, Judge
Join Date: Oct 2003
Location: Edmonton, AB
Age: 35
Posts: 8,448
|
Re: Sort songs list by length
Because time has to be represented by a colon (:), songs cannot be sorted by length. On a similar note, sorting it through a numerical value of seconds would be equally meaningless.
Last edited by bmah; 06-22-2013 at 02:58 AM.. |
06-22-2013, 01:35 AM | #4 |
The Doctor
Join Date: Apr 2006
Age: 35
Posts: 6,145
|
Re: Sort songs list by length
I thought there was a thread awhile back that had all that info, as well as listings for highest max NPS, note totals, most time without a step in a song, and stuff like that too.
|
06-22-2013, 01:43 AM | #5 |
FFR Veteran
Join Date: Jul 2012
Posts: 358
|
Re: Sort songs list by length
"Cannot" is a strong word. It should be fairly simple to do even without jQuery, by, as you said, converting it to a value of seconds (though I'm pretty sure sorting it as a string would work similarly except for songs longer than ten minutes, which is what, two songs?). How would that be meaningless? Yes, there is a thread for that information, but being able to sort the song list, which is always up to date and more convenient, would be better. Plus, as I said, I don't like it being the only unsortable column for no reason.
|
06-22-2013, 02:49 AM | #6 |
Falcon Paaaauuuunch!!!!!!
|
Re: Sort songs list by length
But it's a problem for songs more than 1 minute. In most languages it would be simple but I assume flash isn't good at handling such things. There is such a thread for it, but it's from when there were only about 500 songs. If only it were something like Java you could just tostring all the times and then split the strings back up to get the information from them. Or you could just change all the times of the songs to just be in seconds and have the stuff with the colon be a calculated field, but I assume it's probably too late to realistically make that kind of change. I don't think there's any easy way it can be done.
__________________
|
06-22-2013, 03:00 AM | #7 | |
shots FIRED
Global Moderator, User Support, Judge
Join Date: Oct 2003
Location: Edmonton, AB
Age: 35
Posts: 8,448
|
Re: Sort songs list by length
Quote:
I wonder if there's a way to sort by seconds, and then convert that value into the more conventional time as shown with a colon. |
|
06-22-2013, 05:55 AM | #8 |
FFR Veteran
Join Date: Jul 2012
Posts: 358
|
Re: Sort songs list by length
I linked to the page I was talking about in my first post; it's nothing about in-game information. And I meant that in the JavaScript code that does the sorting, it would internally convert to a seconds value and use that for sorting. I'll just go write the code, though it'll use jQuery and would need adjustment to work without it, which I can do if you'd like to implement this on the page (though I assume incorporating it into existing code would be more efficient). Though it probably wouldn't be terrible to import jQuery for this one page.
Well, I'm not done yet, but here's a preview. Go to Chrome's JS console (Ctrl+Shift+J) and paste this code, then click the Length header. Last edited by Viisbyxa; 06-22-2013 at 07:44 AM.. |
06-22-2013, 02:01 PM | #9 |
the Mathemagician~
|
Re: Sort songs list by length
The sorting by length should be working now.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|