Populate variable from XML file

Questions and answers on how to get the most out of FFAStrans
Post Reply
scharette
Posts: 8
Joined: Sun Nov 29, 2015 8:21 pm

Populate variable from XML file

Post by scharette »

Hi Steipal,

First of all, thank you for your hard work on your software, it's very helpful for me everyday !

I'm trying to populate a variable from a XML file that come with the video file and I can't figure this out. Here's is the string I've used :
$stripws($between("%s_original_name%.evs.xml", "<XT_IN_TC_str>", "</XT_IN_TC_str>"))
When I use a external file, I can't seem to get it working.

If I put the content of the XML file in the string like this :
$stripws($between("<XT_IN_TC_str>01:00:00;00 </XT_IN_TC_str>", "<XT_IN_TC_str>", "</XT_IN_TC_str>"))
It work great.

I've also tried to put the path directly in the string, but I can't seem to make it work.
When you have a chance, if you could help me on this one,

Thanks again !
admin
Site Admin
Posts: 1680
Joined: Sat Feb 08, 2014 10:39 pm

Re: Populate variable from XML file

Post by admin »

Hi scharette,

The $between() function takes a string, it does not read a file just because the string might also be a file name. Please take a look at the $read() function which will read the file into a user variable. F.ex: $read("%s_original_path%\s_original_name%.evs.xml")

-steinar
scharette
Posts: 8
Joined: Sun Nov 29, 2015 8:21 pm

Re: Populate variable from XML file

Post by scharette »

Awesome, got it working, thanks for your help !

Now, the only thing I was wondering about, is there a way for the folder monitor to ignore his history ? What I'm trying to do is, when a file is transcoded, I want to delete the original file, but, It might happen that another file with the exact same name show up again and now it's being ignored because I thing it's in the folder history,

Thanks !
momocampo
Posts: 594
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: Populate variable from XML file

Post by momocampo »

Hi,
Yes, I'm agree it will be very useful to avoid this cache. The good thing would be to choose in monitor folder to to not use cache. Maybe on next version :)
Cheers
admin
Site Admin
Posts: 1680
Joined: Sat Feb 08, 2014 10:39 pm

Re: Populate variable from XML file

Post by admin »

Yes, this will be possible in the next version. It was supposed to go into the 0.9.0 release but the implementation was bad and it's now rewritten.

-steinar
Post Reply