in

andy vt's tools & blog

automating lazy

Context/Variable Question

Last post 10-27-2009 11:21 AM by pointlisse. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 10-17-2009 7:23 AM

    Context/Variable Question

    I'm constructing my own output file name to pass off to RunExternal events. Basically it looks like "%Title - %APDate% - %WM/Subtitle%.mp4" (or something very similar -- APDate is a context I created) that is provided to the application in the auguments field.

    I want to use this format in some of the canned actions. What's the prioper way to save this off as a new context variable for use in subsequent actions?

    Thanks!

  • 10-24-2009 6:42 AM In reply to

    Re: Context/Variable Question

    Bump -- keep playing with this but have not gotten it to work -- do I need to use an external .bat to caputure the manufactured file name?

  • 10-26-2009 11:13 AM In reply to

    Re: Context/Variable Question

    You should be able to do this with ChangeContextValue, you can use existing contexts in the ReplaceRegex w/ %ContextName% notation.
  • 10-26-2009 11:30 AM In reply to

    Re: Context/Variable Question

    Super. Sounds like what I needed. Thanks.

    Is the regex notation used here specifically documented, or would I just need to know it?

  • 10-26-2009 11:41 AM In reply to

    Re: Context/Variable Question

    It should be in the release notes.  If memory serves it was added in either 1.2.1.6 or 1.2.1.7.
  • 10-26-2009 11:49 AM In reply to

    Re: Context/Variable Question

    Oh, so read the documentation ;)
    Sorry -- should have gone there first. My caveman instinct tells me to tinker first.

  • 10-26-2009 3:22 PM In reply to

    Re: Context/Variable Question

    OK, so I'm nearly there.

    I now have a context called "iPodOutput" which has a value of "E:\iPodVideo\%Title% - %BoradcastDate% - %SubTitle%.mp4". I think I have  a problem in that dTB may think that this is a string and not a file reference (is there a difference?) because even though the file is there (and the values are replaced), the AP command complains that it was not found.

    Do I need to tell dTB that this a file  path/name?

    EDIT/UPDATE: Nevermind -- I had an extra space throwing off the filename. This is now working..

    One last question -- the Atomic Parsley command cascades correctly with "standard" metadate variables (like %Title%) but when I tried to use my own Context (%APDate%) it defaulted to  'N/A'. Any thoughts why this would not pass in? I checked that it's being created properly.... see abbreviated log below:

    -----------------------------

    Get the value of "%WM/MediaOriginalBroadcastDateTime%" and set the value of Context["APDate"]
    Extracted Value: 2009-10-22
    Regex Value: 2009-10-22
    Context["APDate"] Value: 2009-10-22
    Duration = 00:00:00.0039056
    Get the value of "E:\iPodVideo\%Title% - %WM/MediaOriginalBroadcastDateTime% - %WM/SubTitle%.mp4" and set the value of Context["iPodOutput"]
    Extracted Value: E:\iPodVideo\Attack of the Show! - 2009-10-22 - .mp4
    Regex Value: E:\iPodVideo\Attack of the Show! - 2009-10-22 - .mp4
    Context["iPodOutput"] Value: E:\iPodVideo\Attack of the Show! - 2009-10-22 - .mp4
    Duration = 00:00:00.0009764
    Write Metadata using AtomicParsley
    Run C:\Program Files\DVRMSToolbox\Applications\AtomicParsley\AtomicParsley.exe "E:\iPodVideo\Attack of the Show! - 2009-10-22 - .mp4" --overWrite --stik "TV Show" --TVShowName "Attack of the Show!" --genre "Other,Series" --category "Other,Series" --TVNetwork "G4-video game television" --TVEpisode "N/A" --title "N/A" --description "``The Vampire's Assistant'' press junket; actor Shawn Hatosy; around the Internet."

    Duration = 00:00:05.0152786
    Total Duration = 00:00:06.0336638

     

  • 10-27-2009 10:24 AM In reply to

    Re: Context/Variable Question

    I was re-reading the above and I think it may be confusing, so trying to simplify here:

    I have a context called 'APDate' that contains a formatted broadcastDate in the form of "yyyy-mm-dd" (eg 2009-10-22).

    I was thinking of using the cascading properties of the AtomicParsley command so that when a subtitle for a show does not exist, it will supply the broadcast date instead. This will make the date order of TV shows on the iPod very obvious.

    For example:

    <map arg="--TVEpisode" value="WM/SubTitle;APDate" defaultvalue="N/A"/>

    Unfortunately, 'N/A' appears in the metadata as if dTB can't see the value of APDate.
    When I use "standard" metadata, such as 'Title' it works correctly:

    <map arg="--TVEpisode" value="WM/SubTitle;Title" defaultvalue="N/A"/>

    I'm trying to figure out how to get this action to see the value of APDate, or find out if that is even possible.

  • 10-27-2009 11:07 AM In reply to

    Re: Context/Variable Question

     that action doesn't support context values (although that is a good idea), only metadata.

  • 10-27-2009 11:21 AM In reply to

    Re: Context/Variable Question

    OK, good to know. I'll stick with Title for now (especially since that's what I orginally asked for :).

    If you could consider that for a future release, that would be great. Otherwise, this is really solid. Thank you.

Page 1 of 1 (10 items)
@2008 andy vt
Powered by Community Server (Non-Commercial Edition), by Telligent Systems