Thank you zeremy. I have just tested your script on some test files. It works... but not as it should Maybe you don't know how the m-TAGS component for foobar works, so here it is :
1. All the .tags files generated by the m-TAGS component have the same exact name : "!.tags". Litterally, with an exclamation mark. Not "[nameofthevideo].tags".
2. Every "!.tags" file contains info for one or several video files. Like I said, here's an example when several video files are in the same folder (which is the case for the featurettes) :
[
{
"@" : "Creating Nerve.mkv",
"CREATION_TIME" : "2016-10-16T15:51:50.000000Z",
"DATE" : "2016",
"DURATION" : "1606.3550000",
"ENCODER" : "libebml v1.3.3 + libmatroska v1.4.4",
"GENRE" : "Featurettes",
"TITLE" : "Creating Nerve",
},
{
"@" : "Player Profiles.mkv",
"CREATION_TIME" : "2016-10-16T16:03:56.000000Z",
"DURATION" : "347.6030000",
"TITLE" : "Player Profiles"
},
{
"@" : "The Fat Jewish Gets Tattewish - Outtakes.mkv",
"CREATION_TIME" : "2016-10-16T16:11:23.000000Z",
"DURATION" : "168.1040000",
"TITLE" : "The Fat Jewish Gets Tattewish - Outtakes"
},
{
"@" : "The Governor's Ball Takeover.mkv",
"CREATION_TIME" : "2016-10-16T16:24:23.000000Z",
"DURATION" : "165.4590000",
"TITLE" : "The Governor's Ball Takeover"
}
]
What I need is for the WIDTH and HEIGHT info to be inserted into each "!.tags" file, but always at the right places in the file ! Appending them at the end of the file simply won't work.
Here's an example of how the previous "!.tags" file should be once the WIDTH and HEIGHT info are inserted at the right places :
[
{
"@" : "Creating Nerve.mkv",
"WIDTH" : "1920",
"HEIGHT" : "1080",
"CREATION_TIME" : "2016-10-16T15:51:50.000000Z",
"DATE" : "2016",
"DURATION" : "1606.3550000",
"ENCODER" : "libebml v1.3.3 + libmatroska v1.4.4",
"GENRE" : "Featurettes",
"TITLE" : "Creating Nerve",
},
{
"@" : "Player Profiles.mkv",
"WIDTH" : "1920",
"HEIGHT" : "1080",
"CREATION_TIME" : "2016-10-16T16:03:56.000000Z",
"DURATION" : "347.6030000",
"TITLE" : "Player Profiles"
},
{
"@" : "The Fat Jewish Gets Tattewish - Outtakes.mkv",
"WIDTH" : "1920",
"HEIGHT" : "1080",
"CREATION_TIME" : "2016-10-16T16:11:23.000000Z",
"DURATION" : "168.1040000",
"TITLE" : "The Fat Jewish Gets Tattewish - Outtakes"
},
{
"@" : "The Governor's Ball Takeover.mkv",
"WIDTH" : "1920",
"HEIGHT" : "1080",
"CREATION_TIME" : "2016-10-16T16:24:23.000000Z",
"DURATION" : "165.4590000",
"TITLE" : "The Governor's Ball Takeover"
}
]
Or this if you prefer, nevermind :
[
{
"@" : "Creating Nerve.mkv",
"CREATION_TIME" : "2016-10-16T15:51:50.000000Z",
"DATE" : "2016",
"DURATION" : "1606.3550000",
"ENCODER" : "libebml v1.3.3 + libmatroska v1.4.4",
"GENRE" : "Featurettes",
"TITLE" : "Creating Nerve",
"WIDTH" : "1920",
"HEIGHT" : "1080"
},
{
"@" : "Player Profiles.mkv",
"CREATION_TIME" : "2016-10-16T16:03:56.000000Z",
"DURATION" : "347.6030000",
"TITLE" : "Player Profiles",
"WIDTH" : "1920",
"HEIGHT" : "1080"
},
{
"@" : "The Fat Jewish Gets Tattewish - Outtakes.mkv",
"CREATION_TIME" : "2016-10-16T16:11:23.000000Z",
"DURATION" : "168.1040000",
"TITLE" : "The Fat Jewish Gets Tattewish - Outtakes",
"WIDTH" : "1920",
"HEIGHT" : "1080"
},
{
"@" : "The Governor's Ball Takeover.mkv",
"CREATION_TIME" : "2016-10-16T16:24:23.000000Z",
"DURATION" : "165.4590000",
"TITLE" : "The Governor's Ball Takeover",
"WIDTH" : "1920",
"HEIGHT" : "1080"
}
]
So, we're making progress, but we're not there yet Thanks !