bugzero
September 28, 2023, 7:09pm
1
Although I've seen similar but not same Topics:
Is there a way to set a variable in a source script so that when an include file is called the variable can either be evaluated (ie T/F) or written to a tag (ie itunes country searched = and language=)?
some psudeo code:
%country%="us"
%language%="gb_en"
...
call include file
output to "COUNTRY"
If %country tag% does not exist
say %country%
End If
output to "SUPPORTED LANGS"
append %language% to "SUPPORTED LANGS"
Thanks
and
Hey all, I was looking for some advice on how to do a thing.
I was trying to build a script for TMDB.org that would pull TV episode info and ran into a snag since all the info is down behind season and episode subdirectories. I know there should be a way to have the script grab the season and episode numbers from the existing tag, but I can't seem to find it in the documentation.
f someone could direct me to the right part of the documentation or has some advice that would be great.
I would like to ask for what I think is a new feature that may be useful for me and for others.
Sometimes we need to get some information from the source and use the value as we continue analysing the rest of the source.
Here is the partial example of a JSON:
{
...
"songid": 8526743,
...
"entities" : { # not an array
"7680981" : { ...},
"8526743" : { "some": "data", "to" : "read" },
"8526876" : { ... },
...
},
...
}
In the previous JSON we need to read the Song ID from the key 'songid', as a text, and use it to access an object named as the same id, inside 'entities' object.
The script could be something like this:
outputto "TEMP_SongId"
json_select "songid"
sayrest
... # Later in the same script
json_select_object "entities"
json_select_object $TEMP_SongId$ # maybe using a dollar sign to identify
# the contents of a tag value?
# Or It could be used also to check a value
json_select "songid"
If $TEMP_SongId$
# Correct value
EndIf
It is just an idea.
I've added the option to reference contents of output buffers via %output%
in string parameters of functions with Mp3tag v3.22e .
This is very experimental and needs testing. It would be great if you could try the new functionality and give feedback.
Thanks Florian.
I've just tested json_select_object %S%
and it works as expected.
I've published a new beta version of my script.
Great work.
1 Like