Tag on Import

From JRiverWiki
Revision as of 22:18, 10 April 2015 by Glynor (talk | contribs)

Jump to: navigation, search
The Tag on Import section of the Folder Settings dialog here has a number of useful rules added.

Media Center's Auto-Import system includes a powerful tool which can automatically apply tags for you to files as they are imported. This allows you to automate repetitive tagging tasks, and can "pre-tag" all files that enter your Library from particular folders. You set this up in the section of the Folder Settings dialog called Apply these tags.

Tag On Import rules can be set up for:

Files imported via other mechanisms (such as Drag-and-Drop or the Windows Explorer Shell Extensions) do not obey any Tag on Import rules you have defined.

Adding Tag On Import Rules

The simplest types of rules apply the same tag value to all files imported in from that folder. For example, the following simple rule forces all files imported in the selected folder to import with the value of [Media Sub Type] set to "Music".

TagOnImport-Simple-MediaSubType Music-Cropped.png

To add a new rule, open the Folder Settings dialog for the item for which you need the rule, and click the Add button in the Apply these rules section. This button shows a pop-out menu that allows you to choose from a few common default examples.

TagOnImport-Add Rule.png

If none of the suggestions match what you'd like to do, pick Custom. This opens up the custom Tag on Import dialog. Then:

  • Set the Field box to match the field where you'd like the tag to be applied.
  • Set the Value box to the value you'd to set for this field for each new file imported.
  • If you only want to apply this value for files that otherwise do not have a value already, check the Skip for files that already have a value box.
TagOnImport-Dialog-Simple.png

Using Expressions in Rules

The simplest Tag On Import rules apply the exact same tag value to every file imported from the selected folder. This is occasionally useful if the folder in question contains only certain types of files. However, it is often useful to apply a value to the field only conditionally based on some other characteristic of the file. For example, you might want to set the [Genre] to "Kids" only if the file imported is an episode of Dora the Explorer.

This is actually easy to do! The Value field in the Tag On Import rule dialog can be set to an Expression, using any of the features of the expression language. So, to accomplish the example given above, you check to see if [Series] tag already contains "Dora the Explorer", and then apply the tag if it does. Like this:

TagOnImport-Dialog-Expression.png

Value Expression: If(IsEqual([Series],Dora the Explorer,8),Kids,[Genre])

You can usually use simple expressions following this pattern to apply tags to only certain files in the import folder. Look at the value of some existing field (such as [Filename] or something else that you know will already have a good value) and then if it matches the result you want, apply the particular value. If not, just pass through the pre-existing value (so you don't overwrite anything already there).

When Tag On Import Is Applied

Tag On Import rules are run after all other parsing and analysis Media Center does as part of importing the file. This means that you can count on all normally filled tags to already be filled before these rules are applied, including filename parsing done by Carnac. The only major step of Importing that is not done before Tag On Import rules are run is the Automatic Metadata Lookup system which downloads metadata for TV Shows and Movies from online databases. This is useful because it allows you to pre-fill needed fields (such as [Series]) for files which otherwise wouldn't be looked up properly.

This rule changes any file already tagged "NCISLA" to "NCIS Los Angeles" instead, which allows it to be found automatically on theTVDB.

Also, as is noted above, Tag On Import rules are only applied when when files are imported via certain mechanisms:

Files which are imported via other mechanisms do not obey the Tag On Import settings set up elsewhere.

Rule Order

Tag On Import Rules are applied in order from top to bottom as they are shown in the Apply these tags list. To reorder rules you've already created, you can simply drag them up and down in the list.

This allows you to use simple expressions to set one value with a previous rule, and then apply other values later on depending on value of other fields. For example, you can make a bunch of rules that set the [Genre] of files to "Kids" if the Series matches particular values:

TagOnImport-Kids Genre Example-1.png

Then, further down in the list, you can apply a single common tag to all files where [Genre] is equal to "Kids":

TagOnImport-Kids Genre Example-2.png

The order also makes it easier to use the Skip for files that already have a value checkbox (described above) to conditionally apply tags to files. This allows you to use simple expressions (like those shown above) to set values for fields based on the file properties already known at import time, and still have a default (down at the bottom of the list) that "catches everything else" and sets a default value for those otherwise not set earlier.

More