Skip to content

Commit

Permalink
fix time in File > Export > Markers as Chapters
Browse files Browse the repository at this point in the history
This is only a partial quick fix because it still does not work for Time
Format > Frames.

https://forum.shotcut.org/t/txt-file-created-from-markers-how-to-change-
time-format/45578
  • Loading branch information
ddennedy committed Aug 27, 2024
1 parent 08d3148 commit 8c15ae5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/qml/export-chapters/export-chapters.js
Original file line number Diff line number Diff line change
Expand Up @@ -7540,7 +7540,7 @@ MltXmlParser.prototype.get = function(dict, name, defaultValue) {
MltXmlParser.prototype.timecode = function(value) {
if (typeof value === 'string') {
// Determine if this is a MLT "clock" time string.
if (value.length === 12 && (value[8] === '.' || value[8] === ',')) {
if (value[8] === '.' || value[8] === ',' || value[8] === ':' || value[8] === ';') {
if (value.substring(0,3) === '00:') {
return value.substring(3, 8);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/qml/export-chapters/mlt2chapters.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ MltXmlParser.prototype.get = function(dict, name, defaultValue) {
MltXmlParser.prototype.timecode = function(value) {
if (typeof value === 'string') {
// Determine if this is a MLT "clock" time string.
if (value.length === 12 && (value[8] === '.' || value[8] === ',')) {
if (value[8] === '.' || value[8] === ',' || value[8] === ':' || value[8] === ';') {
if (value.substring(0,3) === '00:') {
return value.substring(3, 8);
} else {
Expand Down

0 comments on commit 8c15ae5

Please sign in to comment.