New summarized value (eg. mp3 duration sum) write in the bottom of the fle list for [WDX] after the sum dir/file length

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

User avatar
karist
Junior Member
Junior Member
Posts: 8
Joined: 2023-11-03, 09:48 UTC
Location: Hungary

New summarized value (eg. mp3 duration sum) write in the bottom of the fle list for [WDX] after the sum dir/file length

Post by *karist »

Dear ghisler!

I need a new function to this fantastic program! :roll:
I need a summarized value (eg. mp3 duration sum) to show in the bottom of the file/dir list for [WDX] plugins (MediaTime) after the sum dir/file length value.

The MediaInfoLib and the [WDX] MediaTime plugins can write the duration value in the mp3 file wdx calculated column, but the summarize value of the duration in one directory files, not possible to write, because the WDX plugin cant write value the bottom of the file list, where summarized the actual directory file/dir sizes.

At now the plugins can write the summarized mp3 duration only after the dir, but, when I go into the dir the WDX plugin can't write anywhere the sum value.

It will be very helpful for me, because now I need every time to run other program (mp3tag) to calculate the dir summarized mp3 duration value. If it will possible the value show in the bottom of the list, I will please the Mediatime plugins developer, to write there he summarized value.

printscr for the my problem:
https://drive.google.com/file/d/1DWUrNpzU3Za62Zt8Rzk6KTV8wHBDGihq/view?usp=sharing

Thank you very much!!! :roll:
User avatar
tuska
Power Member
Power Member
Posts: 3760
Joined: 2007-05-21, 12:17 UTC

Re: New summarized value (eg. mp3 duration sum) write in the bottom of the fle list for [WDX] after the sum dir/file le

Post by *tuska »

2karist

Hi,
take a look at the MediaTime 1.1 plugin - Author: milo1012 (image also available).

The display of the number of subdirectories could also be interesting in this context:
Plugin DirSizeCalc 2.22

Field

Code: Select all

Name: e.g. Subdirs
Code: [=dirsizecalc.Directory Count]
User avatar
karist
Junior Member
Junior Member
Posts: 8
Joined: 2023-11-03, 09:48 UTC
Location: Hungary

Re: New summarized value (eg. mp3 duration sum) write in the bottom of the fle list for [WDX] after the sum dir/file le

Post by *karist »

tuska wrote: 2023-12-10, 15:28 UTC 2karist

Hi,
take a look at the MediaTime 1.1 plugin - Author: milo1012 (image also available).

The display of the number of subdirectories could also be interesting in this context:
Plugin DirSizeCalc 2.22

Field

Code: Select all

Name: e.g. Subdirs
Code: [=dirsizecalc.Directory Count]
Unfortunately, you didn't read what I wrote carefully. :(
(Sorry for the bad English :) I prefer to use the translator. )

I tried the MediaTime plugin, but it only prints the sum of the mp3 files in the folder in one line. But if I go into the folder, it cannot display the total mp3 length anywhere. Therefore, I would like the plugin to be able to display this amount of time, if the developer of TC would include this option in the program. So at the bottom of the file list, after the displayed file size/number of pieces, in a line with them.

The number of files is not important to me, but the calculated length of the mp3s.

Thank you! :roll:
User avatar
Dalai
Power Member
Power Member
Posts: 9393
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: New summarized value (eg. mp3 duration sum) write in the bottom of the fle list for [WDX] after the sum dir/file le

Post by *Dalai »

It's not possible to do that what you want. It would also require changes to the WDX plugin interface.

Maybe we can work out a solution that works with what is currently possible if you tell us what you want to achieve. For example, it is possible to copy the custom columns (from the directory level) and paste them into some text file or file comments within the directories in question.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
tuska
Power Member
Power Member
Posts: 3760
Joined: 2007-05-21, 12:17 UTC

Re: New summarized value (eg. mp3 duration sum) write in the bottom of the fle list for [WDX] after the sum dir/file le

Post by *tuska »

Dalai wrote: 2023-12-11, 11:49 UTC It's not possible to do that what you want. It would also require changes to the WDX plugin interface.
Maybe we can work out a solution that works with what is currently possible if you tell us what you want to achieve.
[WDX] MediaTime - sum up length of media files in dir
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: New summarized value (eg. mp3 duration sum) write in the bottom of the fle list for [WDX] after the sum dir/file le

Post by *Fla$her »

2karist
Try this .vbs:

Code: Select all

'—————————————————————————————— VBS —————————————————————————————
' Purpose: Calculating the total duration of selected media files
' Parameters: %WL <filter extensions via |> [/c]
'    /c — copy the result to the clipboard instead of displaying
'    Example: %WL 3gp|asf|avi|mkv|mov|mp3|mp4|mpg|wma|wmv|vob /c
'————————————————————————————————————————————————————————————————
Option Explicit: Dim A, oDesk, oFSO, oList, F, Dur
Const Title = " Total duration of selected media files"
Set A = WSH.Arguments: If A.Count = 0 Then WSH.Quit
Set oDesk = CreateObject("Shell.Application").NameSpace(0)
Set oFSO  = CreateObject("Scripting.FileSystemObject")
Set oList = oFSO.OpenTextFile(A(0),,,-1)
Do: F = oList.ReadLine
   If Right(F, 1) <> "\" Then _
   If InStr(1, "|" & A(1) & "|", "|" & oFSO.GetExtensionName(F) & "|", 1) Then _
   Dur = Dur + CDbl(oDesk.ParseName(F).ExtendedProperty("Duration"))
Loop Until oList.AtEndOfStream: oList.Close
Set oList = Nothing: Set oDesk = Nothing: Set oFSO = Nothing

If IsEmpty(Dur) Then
   MsgBox "There are no suitable media files!", 262192, Title
Else
   Dur = TimeSerial(0, 0, FormatNumber(CDbl(Dur/10000000), 0))
   If A.Named.Exists("c") Then
      With CreateObject("WScript.Shell")
         If .Run("%ComSpec% /q/c <nul set /p=""" & Dur & """|clip", 0, 1) Then _
         .Run "mshta ""javascript:close(clipboardData.setData('text','" & Dur & "'))""", 7
      End With
   Else MsgBox Space(14) & Dur, 262208, Title End If
End If
Drag the file to the toolbar, specify the parameters in the second button field.
Last edited by Fla$her on 2023-12-12, 23:20 UTC, edited 1 time in total.
Overquoting is evil! 👎
User avatar
tuska
Power Member
Power Member
Posts: 3760
Joined: 2007-05-21, 12:17 UTC

Re: New summarized value (eg. mp3 duration sum) write in the bottom of the fle list for [WDX] after the sum dir/file le

Post by *tuska »

2Fla$her
Out of interest, I tested your vb-script and it worked for me (also with parameter /c).
I used a button with the following command before executing the script: cm_ExchangeSelBoth
CalculatingTheTotalDurationOfSelectedMediaFiles.vbs

Code: Select all

TOTALCMD#BAR#DATA
"%COMMANDER_PATH%\Migration\_Forumsanfragen\New summarized value (eg. mp3 duration sum)\CalculatingTheTotalDurationOfSelectedMediaFiles.vbs"
%WL 3gp|asf|avi|mkv|mov|mp3|mp4|mpg|wma|wmv|vob
shell32.dll,116
CalculatingTheTotalDurationOfSelectedMediaFiles.vbs - Fla$her|Parameter: %WL 3gp||asf||avi||mkv<||mov||mp3||mp4||mpg||wma||wmv||vob|https://www.ghisler.ch/board/viewtopic.php?p=446565#p446565
%COMMANDER_PATH%\Migration\_Forumsanfragen\New summarized value (eg. mp3 duration sum)\

-1
The results correspond to the field "[=mediatime.Duration (1 level)]".

Thank you!
User avatar
karist
Junior Member
Junior Member
Posts: 8
Joined: 2023-11-03, 09:48 UTC
Location: Hungary

Re: New summarized value (eg. mp3 duration sum) write in the bottom of the fle list for [WDX] after the sum dir/file le

Post by *karist »

2Fla$her

Thank you for your solution! :)

I tried it and it works, but unfortunately it doesn't make our work easier, because we already use a similar solution, i.e. we start an "mp3tag" program with one button, which also lists the sum of the durations. :(

It was written here on the forum earlier that this problem cannot be solved. It's really not possible with such a forced solution, but if the program creator were to read my writing directly, he would quickly find a solution, because almost "only" a <Caption> would have to be placed at the bottom of the list after the file/dir lengths and this label should be provided to the [WDX] plugins the value...

In which part of the forum can requests be made directly to the TotalCommander developer (ghisler)?
(Maybe I'm in the wrong place?)

Thank you!
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: New summarized value (eg. mp3 duration sum) write in the bottom of the fle list for [WDX] after the sum dir/file le

Post by *petermad »

In which part of the forum can requests be made directly to the TotalCommander developer
You can make requests here: TC suggestions (English) - All requests are read by the author.

Moderator message from: petermad » 2023-12-14, 08:55 UTC

Moved to "TC suggestions (English)" from "Total Commander (English)"
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Hacker
Moderator
Moderator
Posts: 13067
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: New summarized value (eg. mp3 duration sum) write in the bottom of the fle list for [WDX] after the sum dir/file le

Post by *Hacker »

A Customizable status panel would make this possible.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: New summarized value (eg. mp3 duration sum) write in the bottom of the fle list for [WDX] after the sum dir/file le

Post by *Fla$her »

2karist
You're welcome. I don't understand why you compare mp3tag stuffed with GUI options with a simple script that outputs (including to the clipboard) only what is necessary for selected files? And how can mp3tag interact with the selected files?

Technically, it is possible to replace the text in the status bar, but this will not be a dynamic selection solution.
I can easily support the request, but I have great doubts that the author will want to change something, given the width restriction and the speed of calculating such an amount, especially since this is not the only thing that could be added up.
Overquoting is evil! 👎
User avatar
karist
Junior Member
Junior Member
Posts: 8
Joined: 2023-11-03, 09:48 UTC
Location: Hungary

Re: New summarized value (eg. mp3 duration sum) write in the bottom of the fle list for [WDX] after the sum dir/file le

Post by *karist »

2Fla$her

1. luckily, mp3tag can be parameterized, so I can give it the current directory, which it then loads... :)

2.
a.) performance problem: the [WDX] MediaTime plugin already "knows" the mp3 durante for each file, which you just have to add up, you don't have to calculate each one over and over again
b.) currently, in the box below the list, the summarizing text file/dir length/pcs does not even fill 1/3 of the available space, so there would be plenty of space to sum up the length

Thanks! :)
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: New summarized value (eg. mp3 duration sum) write in the bottom of the fle list for [WDX] after the sum dir/file le

Post by *Fla$her »

2karist
Hold on. Based on the logic of how the information output to the status bar works, it can only affect the selected objects, and not all the content in the current folder, unless it is completely selected, of course. Therefore, specifying a folder in the parameters (I am aware of this possibility) does not agree with your request. The same applies to the MediaTime plugin, which takes into account the entire list of media files in the folder.
Overquoting is evil! 👎
User avatar
karist
Junior Member
Junior Member
Posts: 8
Joined: 2023-11-03, 09:48 UTC
Location: Hungary

Re: New summarized value (eg. mp3 duration sum) write in the bottom of the fle list for [WDX] after the sum dir/file le

Post by *karist »

2Fla$her

The status line does not only contain static information, but also the total length of the containing folder and the number of folders and files:
"0 k/673368 k - 0 / 9 files, 0/ 520 dir"

So we're still talking about the same thing and the real Total Commander developer is not responding to anything, not developing my sensible and easy to implement request into the program. All I read is bafflement and bickering in this forum. I did not think it was such a big deal. What is there not to understand!?

I read the first comments with optimism, but I was no closer to a solution with such a simple request. sorry

by
Post Reply