diff --git a/CHANGELOG.md b/CHANGELOG.md index 352617b5..138c7fe7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 11.1.0 / YYYY-MM-DD + +## NEW FEATURES + +- Add support for "category" property of tag indexes in tar archives. Actually the property data.tagname was used as the tag name with a fallback to "Tag N". An intermediate fallback has been added with the property "category" as the first fallback if data.tagname is not set. + # 11.0.3 / 2020-11-30 ## BUG FIXES diff --git a/app/server/packages/TarPackage.js b/app/server/packages/TarPackage.js index 89d6973f..d853959d 100644 --- a/app/server/packages/TarPackage.js +++ b/app/server/packages/TarPackage.js @@ -558,6 +558,7 @@ TarPackage.prototype.saveTimecodes = function() { // Format points of interest function(pointsOfInterest, spriteReferences, callback) { + var countTagsWithoutName = 0; var tags = []; var timecodes = []; @@ -602,8 +603,8 @@ TarPackage.prototype.saveTimecodes = function() { case 'tag': tags.push({ value: pointOfInterest.timecode, - name: pointOfInterest.data && pointOfInterest.data.tagname ? - pointOfInterest.data.tagname : 'Tag' + (tags.length + 1) + name: (pointOfInterest.data && (pointOfInterest.data.tagname || pointOfInterest.data.category)) || + 'Tag' + (++countTagsWithoutName) }); break; default: diff --git a/docs/watcher.md b/docs/watcher.md index 787733da..43a40e9a 100644 --- a/docs/watcher.md +++ b/docs/watcher.md @@ -57,7 +57,8 @@ It can contain some optional properties: "timecode": 9500, // timecode in ms "type": "tag", // timecode type (must be "image" or "tag") "data": { // Optional - related information for tag timecode - "tagname": "Very important moment" // tagname to display, if not defined, will be replaced by 'Tag N' where N is the number of the tag + "category": "Tag category", // Optional - The name of the category the tag belongs to used as a fallback when no tag name is specified + "tagname": "Very important moment" // Optional - Tag name, if not defined the category will be used as the tag name and if neither category nor tag name are defined it will be replaced by 'TagN' where N is an incremental number } }, ...