Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
J
jensen
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Skye Yu
jensen
Commits
afe92752
Commit
afe92752
authored
Sep 04, 2025
by
martin hou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 增加模式识别
parent
c9d57adf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
jensen.js
src/utils/jensen.js
+11
-3
No files found.
src/utils/jensen.js
View file @
afe92752
...
@@ -766,11 +766,18 @@ Jensen.prototype.listFiles = async function () {
...
@@ -766,11 +766,18 @@ Jensen.prototype.listFiles = async function () {
}
}
let
ftime
=
fname
.
join
(
''
);
let
ftime
=
fname
.
join
(
''
);
let
duration
=
0
;
let
duration
=
0
;
if
(
ftime
.
match
(
/^
\d{14}
REC
\d
+
\.
wav$/gi
))
{
let
mode
=
'room'
;
ftime
=
ftime
.
replace
(
/^
(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})
REC.*$/gi
,
'$1-$2-$3 $4:$5:$6'
);
if
(
ftime
.
match
(
/^
\d{14}(
REC|WHSP|ROOM|CALL|WIP
)\d
+
\.
wav$/gi
))
{
mode
=
ftime
.
replace
(
/^
(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(
REC|WHIP|ROOM|CALL|WIP
)
.*$/gi
,
'$7'
).
toLowerCase
();
if
(
mode
==
'REC'
)
mode
=
'room'
;
else
if
(
mode
==
'WHSP'
||
mode
==
'WIP'
)
mode
=
'whisper'
;
else
if
(
mode
==
'ROOM'
)
mode
=
'room'
;
else
if
(
mode
==
'CALL'
)
mode
=
'call'
;
ftime
=
ftime
.
replace
(
/^
(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(
REC|WHIP|ROOM|CALL|WIP
)
.*$/gi
,
'$1-$2-$3 $4:$5:$6'
);
ftime
=
new
Date
(
ftime
);
ftime
=
new
Date
(
ftime
);
duration
=
flen
/
32
;
duration
=
flen
/
32
;
}
else
if
(
ftime
.
match
(
/^
(\d{2})?(\d{2})(\w{3})(\d{2})
-
(\d{2})(\d{2})(\d{2})
-.*
\.(
hda|wav
)
$/gi
))
{
}
else
if
(
ftime
.
match
(
/^
(\d{2})?(\d{2})(\w{3})(\d{2})
-
(\d{2})(\d{2})(\d{2})
-.*
\.(
hda|wav
)
$/gi
))
{
// 2024Mar19-110932-Rec00.hda
// 2024Mar19-110932-Rec00.hda
ftime
=
ftime
.
replace
(
/^
(\d{2})?(\d{2})(\w{3})(\d{2})
-
(\d{2})(\d{2})(\d{2})
-.*
\.(
hda|wav
)
$/gi
,
'20$2 $3 $4 $5:$6:$7'
);
ftime
=
ftime
.
replace
(
/^
(\d{2})?(\d{2})(\w{3})(\d{2})
-
(\d{2})(\d{2})(\d{2})
-.*
\.(
hda|wav
)
$/gi
,
'20$2 $3 $4 $5:$6:$7'
);
ftime
=
new
Date
(
ftime
);
ftime
=
new
Date
(
ftime
);
...
@@ -814,6 +821,7 @@ Jensen.prototype.listFiles = async function () {
...
@@ -814,6 +821,7 @@ Jensen.prototype.listFiles = async function () {
duration
:
duration
,
duration
:
duration
,
version
:
ver
,
version
:
ver
,
length
:
flen
,
length
:
flen
,
mode
:
mode
,
signature
:
sign
.
join
(
''
)
signature
:
sign
.
join
(
''
)
});
});
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment