Auto-Import: Difference between revisions

From wiki.jriver.com
Jump to navigation Jump to search
No edit summary
No edit summary
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{See also|Import}}

[[File:MC19-AutoImport-Full_Configuration.png|thumb|right|500px|Showing MC's Auto-Import configuration with a number of watched folders added.]]
[[File:MC19-AutoImport-Full_Configuration.png|thumb|right|500px|Showing MC's Auto-Import configuration with a number of watched folders added.]]


Line 4: Line 6:
* Create a set of folders that contain media, each of which have separate options defined.
* Create a set of folders that contain media, each of which have separate options defined.
* Manually scan all of your pre-defined folders on demand.
* Manually scan all of your pre-defined folders on demand.
* Make use of the powerful [[Carnac]] (file name parsing) and [[TV_Shows_-_Series,_Seasons_%26_Episodes|Automatic Metadata Lookup]] features of Media Center
* Make use of the powerful [[Carnac]] (file name parsing) and [[Automatic Metadata Lookup]] features of Media Center
* Automatically apply tags to the files imported using powerful [[Tag on Import]] rules.
* Automatically apply tags to the files imported using powerful [[Tag on Import]] rules.
* Watch the folders for new and modified files, automatically in the background, without bogging down disk or network access.
* Watch the folders for new and modified files, automatically in the background, without bogging down disk or network access.


In most cases, using Auto-Import to automatically watch your media locations on disk is the preferred means of Importing new content. Media Center turns this feature on by default, and automatically sets itself to to watch the locations found when it completed the automatic [[Import#Fully_Automatic_First_Use_Scan|First-Use Scan]]. If you did not allow it to run this automated scan, then you will need to configure Auto-Import yourself.
'''In most cases, using Auto-Import to automatically watch your media locations on disk is the preferred means of Importing new content.''' Media Center turns this feature on by default, [[Import#Fully_Automatic_First_Use_Scan|automatically scans your computer for files]], and adds directories found to the Auto-Import Watched Folders list. You can modify the folders found in the First Use Scan, or if you prefer, configure it manually.

You can configure Media Center's Auto-Import functionality via either:
* In MC's Options dialog at <span style="color:#8B4513">Tools > Options > Libraries & Folders > Auto-Import</span>.
* The Media Import wizard at <span style="color:#8B4513">Tools > Import</span>.


== Configuring Auto-Import ==
== Configuring Auto-Import ==


You can configure Media Center's Auto-Import functionality via either:
You can configure Media Center's Auto-Import functionality via either:
* Automatically via the [[Import#Fully_Automatic_First_Use_Scan|First Use Scan]].
* In MC's Options dialog at <span style="color:#8B4513">Tools > Options > Libraries & Folders > Auto-Import</span>.
* In MC's Options dialog at <span style="color:#8B4513">Tools > Options > Libraries & Folders > Auto-Import</span>.
* The Media Import wizard at <span style="color:#8B4513">Tools > Import</span>.
* The Media Import wizard at <span style="color:#8B4513">Tools > Import</span>.
Line 32: Line 31:
In the watched Folders section of the Auto-Import dialog, you can define a set of folders on disk that will be watched for changes. You can add as many folders as you'd like to this list. When you add a directory to the watched Folders list, Media Center will automatically monitor this directory, and any of its subdirectories, for new files and modifications to existing files. You can also specify folders to be excluded from monitoring.
In the watched Folders section of the Auto-Import dialog, you can define a set of folders on disk that will be watched for changes. You can add as many folders as you'd like to this list. When you add a directory to the watched Folders list, Media Center will automatically monitor this directory, and any of its subdirectories, for new files and modifications to existing files. You can also specify folders to be excluded from monitoring.


[[File:MC19-Auto-Import-Folder Exclude.png|thumb|500px|none|We don't need ''that'' user's stuff in our Library!]]
[[File:MC19-AutoImport-Folder Exclude.png|thumb|500px|none|We don't need ''that'' user's stuff in our Library!]]


Media Center can watch ''any'' folder you can mount natively on the filesystem. For Windows, this includes full support for:
Media Center can watch ''any'' folder you can mount natively on the filesystem. For Windows, this includes full support for:
Line 58: Line 57:
* '''Import these file types:''' Use the file-type picker to choose what file types will be monitored in this particular directory. Separate watched folders can have their own lists of watched/ignored file types.
* '''Import these file types:''' Use the file-type picker to choose what file types will be monitored in this particular directory. Separate watched folders can have their own lists of watched/ignored file types.


* '''Apply these tags:''' this section of the dialog will let you apply Tags to your files automatically upon Import. For more information on this powerful feature, refer to the [[Tag on Import]] page of the Wiki.
* '''Apply these tags:''' this section of the dialog will let you apply Tags to your files automatically upon Import. For more information on this powerful feature, refer to the [[Tag on Import]] article.


* '''Ignore special files:''' if enabled, Media Center will ignore a variety of common "sidecar" format metadata files, such as folder.jpg.
* '''Ignore special files:''' if enabled, Media Center will ignore a variety of common "sidecar" format metadata files, such as folder.jpg.


[[File:MC19-Auto-Import-Folder Settings.png|thumb|500px|none]]
[[File:AutoImport-Folder Settings.png|thumb|500px|none]]


=== Auto-Import Tasks ===
=== Auto-Import Tasks ===
Line 74: Line 73:
* Ignore files previously removed from library: this prevents files from being automatically re-imported if you manually remove them from your Library.
* Ignore files previously removed from library: this prevents files from being automatically re-imported if you manually remove them from your Library.
* Update for external changes: if file characteristics, including embedded tags, change externally, Media Center will update the Library to match.
* Update for external changes: if file characteristics, including embedded tags, change externally, Media Center will update the Library to match.
* [[Fix Broken Links]]: automatically removes files that are missing from disk from the [[Library]].
* Fix broken links: activates one of Media Center's [[Fix Broken Links]] modes.
* Write file tags: when enabled (defaults '''OFF'''), Media Center will write out changes to the file tags when additional metadata is gathered during the Import. This includes metadata gathered by Carnac, Tag On Import rules, Automatic Metadata Lookup, audio analysis, and any other tag-generating functions of Auto-Import.
* Write file tags: when enabled (defaults '''OFF'''), Media Center will write out changes to the file tags when additional metadata is gathered during the Import. This includes metadata gathered by Carnac, Tag On Import rules, Automatic Metadata Lookup, audio analysis, and any other tag-generating functions of Auto-Import.


Line 100: Line 99:
== Running an Auto-Import Scan Manually ==
== Running an Auto-Import Scan Manually ==


Whether you have MC's Background Scanning feature enabled or disabled, you can run a full Auto-Import Scan at any time via the Media Import wizard at:
Even if you have MC's Background Scanning feature disabled, you can run a ''full'' Auto-Import Scan at any time via the Media Import wizard at:
<span style="color:#8B4513">Tools > Import</span>.
<span style="color:#8B4513">Tools > Import</span>.


Line 109: Line 108:
== Automation ==
== Automation ==


You can automate the Run Auto-Import Now process using the [[Media_Center_Core_Commands#Tools|MCC_IMPORT_AUTO_RUN_NOW (23020)]] MCC Command, which takes a ''bool bSilent'' parameter that allows you to have it run normally or silently (with no Action Window visible, and no status report when completed). For example, in Windows, you can use the [[Media_Center_Core_Commands#Issuing_a_command_from_the_command_line|MC Command Line launcher]] like so:

'''Run Normally:''' <tt>mc20.exe /mcc 23020,0</tt>

'''Run Silently:''' <tt>mc20.exe /mcc 23020,1</tt>

This could be useful if your NAS does not support [[Auto-Import#Background_Scanning|File System Events]], as described above, and you need the Auto-Import to run full scans more frequently than it does by default (every two hours). To solve this problem:

=== Windows Instructions ===

# Add a [http://windows.microsoft.com/en-US/windows/schedule-task#1TC=windows-7 Scheduled Task in Windows].
# Choose ''When I log on'' as the Trigger.
# For the Action, choose ''Start a program''.
# In the Program/script box, type: <tt>mc20.exe</tt> (Substitute the major version number for your version of MC as described in the [[Media_Center_Core_Commands#Issuing_a_command_from_the_command_line|Command Line launcher instructions]].)
# In the Add arguments box, type: <tt>/mcc 23020,1</tt>
# Leave Start in blank.
# Check the ''Open the properties dialog for this task'' box, and click ''Finish''.
# Under the Triggers tab, edit the Trigger you made:
## Enable ''Delay task for'' and choose an amount of time to delay. I'd recommend a decent amount of time, such as 15 minutes, to let your computer finish booting up. Note that you can pick from the preset options, or type in any value you want, such as <tt>38 minutes</tt>.
## Enable ''Repeat task every'' and choose a repeat frequency. As above, you can enter your own frequency, such as <tt>45 minutes</tt>, or use one of the preset options.
## Change the ''for a duration of'' option to '''Indefinitely'''.
# Click OK as required to save your changes. Next time you log on (you can also start it manually from within the Task Scheduler), your computer will automatically run the [[Media_Center_Core_Commands#Tools|MCC_IMPORT_AUTO_RUN_NOW (23020)]] command in silent mode, as frequently as you'd like.

[[File:Windows Task-Auto-Import Full Scan.png|thumb|550px|none]]


''Please Note'': One convenient side effect of using the MC Command Launcher's MCC mode is that it does not automatically load Media Center itself if it isn't already running. For this reason, you can use the instructions above without worrying about effects when MC is shut down (on purpose, for maintenance reasons perhaps). If MC is running, it will perform the Auto-Import scan. If not, this command is silently ignored.


[[Category: Import]]
[[Category: Import]]

Latest revision as of 15:44, 3 May 2015

Showing MC's Auto-Import configuration with a number of watched folders added.

Media Center has a full-featured Auto-Import system. With this system you can:

  • Create a set of folders that contain media, each of which have separate options defined.
  • Manually scan all of your pre-defined folders on demand.
  • Make use of the powerful Carnac (file name parsing) and Automatic Metadata Lookup features of Media Center
  • Automatically apply tags to the files imported using powerful Tag on Import rules.
  • Watch the folders for new and modified files, automatically in the background, without bogging down disk or network access.

In most cases, using Auto-Import to automatically watch your media locations on disk is the preferred means of Importing new content. Media Center turns this feature on by default, automatically scans your computer for files, and adds directories found to the Auto-Import Watched Folders list. You can modify the folders found in the First Use Scan, or if you prefer, configure it manually.

Configuring Auto-Import

You can configure Media Center's Auto-Import functionality via either:

  • Automatically via the First Use Scan.
  • In MC's Options dialog at Tools > Options > Libraries & Folders > Auto-Import.
  • The Media Import wizard at Tools > Import.

You can enable or disable Background Scanning at Tools > Options > Libraries & Folders > Auto-Import > Run auto-import in background.

MC19-AutoImport-Configuration.png

There are two major sections of the Auto-Import configuration dialog:

  • Folders - these are the folders that Auto-Import will watch for changes.
  • Tasks - these are post-processing tasks that can be applied to newly imported files

Watched Folders

In the watched Folders section of the Auto-Import dialog, you can define a set of folders on disk that will be watched for changes. You can add as many folders as you'd like to this list. When you add a directory to the watched Folders list, Media Center will automatically monitor this directory, and any of its subdirectories, for new files and modifications to existing files. You can also specify folders to be excluded from monitoring.

We don't need that user's stuff in our Library!

Media Center can watch any folder you can mount natively on the filesystem. For Windows, this includes full support for:

  • Local disks
  • Mounted Network Drives (with a drive letter)
  • UNC Paths (eg. \\server\share\path\to\folder\)

For OSX (and Linux), this includes any volume you can access from the Finder or Teminal (which includes all local and network volumes).

From the Folders section of the Auto-Import configuration dialog, you can:

  • Add new folders to watch (or exclude from watching)
  • Remove existing folder entries
  • Edit existing folder entries

Folder Settings

When you Add or Modify a folder, you are taken to the Folder Settings dialog.

This dialog has the following configuration items:

  • Folder: the path to the folder that you'd like to monitor (or exclude) on disk. You can click the Browse button to choose from a standard OS folder picker dialog box.
  • Mode: choose whether to include the specified directory (and all subdirectories) or exclude the specified directory and all subdirectories.
  • Import these file types: Use the file-type picker to choose what file types will be monitored in this particular directory. Separate watched folders can have their own lists of watched/ignored file types.
  • Apply these tags: this section of the dialog will let you apply Tags to your files automatically upon Import. For more information on this powerful feature, refer to the Tag on Import article.
  • Ignore special files: if enabled, Media Center will ignore a variety of common "sidecar" format metadata files, such as folder.jpg.
AutoImport-Folder Settings.png

Auto-Import Tasks

When Auto-Import has finished analyzing and importing new files, you can choose to have it perform a number of convenient post-processing steps to further automate your use of Media Center. From this section, you can choose to:

  • Analyze audio: automatically runs the files (both audio and video files) though MC's audio analysis engine.
  • Build thumbnails for the files: this speeds browsing of the media, particularly in Theater View and other image-heavy views.
  • Get cover art: tries to look up and download any missing cover art from the Internet.
  • Get movie & TV info: looks up metadata for video files automatically from a variety of Internet metadata sources.
  • Ignore files previously removed from library: this prevents files from being automatically re-imported if you manually remove them from your Library.
  • Update for external changes: if file characteristics, including embedded tags, change externally, Media Center will update the Library to match.
  • Fix Broken Links: automatically removes files that are missing from disk from the Library.
  • Write file tags: when enabled (defaults OFF), Media Center will write out changes to the file tags when additional metadata is gathered during the Import. This includes metadata gathered by Carnac, Tag On Import rules, Automatic Metadata Lookup, audio analysis, and any other tag-generating functions of Auto-Import.

Background Scanning

Media Center's Auto-Import system runs by default in the background, and will automatically pick up changes in any of your defined Auto-Import Directories (detailed below). If needed, this feature can be disabled here: Tools > Options > Libraries & Folders > Auto-Import

With the background scanning feature disabled, you can still manually initiate a scan of your defined Auto-Import Directories with the Import Media wizard: Tools > Import

Media Center's Background Auto-Import works by:

  • Monitoring File System Events for changes and responding instantly to only those files that changed in a watched directory.
  • Running a background full-scan of the defined watched directories, and checking for changes, once every two hours. This is run with a low thread priority to prevent it from impacting foreground tasks.

Unlike the folder watching systems provided by many other applications, Media Center's background Auto-Import system relies, in part, upon a system called File System Events that is provided by your Operating System to allow it to respond to any changes made in a watched directory. This allows Media Center to react instantaneously when any changes are committed to a watched directory (you don't have to wait for the next "pass" on a timer), and prevents performance bottlenecks associated with regularly scanning the directories for all changes. Instead, when a single file is added or modified in a watched directory, Media Center is notified immediately by the underlying OS, and can react to only that file.

This system requires support from the Operating System and filesystem. Currently, this feature requires:

  • Windows or OSX versions of Media Center
  • Watched folders on a watchable filesystem (NTFS or network drive for Windows, any supported filesystem on OSX)
  • If using a network volume, the server or NAS device must properly support File System Events.

This allows Media Center to instantly respond to changes in the file system without having to bog your disk (or, worse, network interface) down with constant checks for changes in your media storage locations, most of which will not have changed. Therefore, this allows Media Center to schedule its periodic full scans of your media locations far less often than would be needed otherwise. If your storage device does not support File System events, it will still pick up new files automatically once every two hours. You can schedule additional checks yourself using MC's Automation capabilities (see below for details).

Running an Auto-Import Scan Manually

Even if you have MC's Background Scanning feature disabled, you can run a full Auto-Import Scan at any time via the Media Import wizard at: Tools > Import.

Then choose Run Auto-Import Now from the dialog and hit Finish to start the scan. This will run in an Action Window and show progress as it goes:

MC19-AutoImport-Action Window.png

Automation

You can automate the Run Auto-Import Now process using the MCC_IMPORT_AUTO_RUN_NOW (23020) MCC Command, which takes a bool bSilent parameter that allows you to have it run normally or silently (with no Action Window visible, and no status report when completed). For example, in Windows, you can use the MC Command Line launcher like so:

Run Normally: mc20.exe /mcc 23020,0

Run Silently: mc20.exe /mcc 23020,1

This could be useful if your NAS does not support File System Events, as described above, and you need the Auto-Import to run full scans more frequently than it does by default (every two hours). To solve this problem:

Windows Instructions

  1. Add a Scheduled Task in Windows.
  2. Choose When I log on as the Trigger.
  3. For the Action, choose Start a program.
  4. In the Program/script box, type: mc20.exe (Substitute the major version number for your version of MC as described in the Command Line launcher instructions.)
  5. In the Add arguments box, type: /mcc 23020,1
  6. Leave Start in blank.
  7. Check the Open the properties dialog for this task box, and click Finish.
  8. Under the Triggers tab, edit the Trigger you made:
    1. Enable Delay task for and choose an amount of time to delay. I'd recommend a decent amount of time, such as 15 minutes, to let your computer finish booting up. Note that you can pick from the preset options, or type in any value you want, such as 38 minutes.
    2. Enable Repeat task every and choose a repeat frequency. As above, you can enter your own frequency, such as 45 minutes, or use one of the preset options.
    3. Change the for a duration of option to Indefinitely.
  9. Click OK as required to save your changes. Next time you log on (you can also start it manually from within the Task Scheduler), your computer will automatically run the MCC_IMPORT_AUTO_RUN_NOW (23020) command in silent mode, as frequently as you'd like.
Windows Task-Auto-Import Full Scan.png

Please Note: One convenient side effect of using the MC Command Launcher's MCC mode is that it does not automatically load Media Center itself if it isn't already running. For this reason, you can use the instructions above without worrying about effects when MC is shut down (on purpose, for maintenance reasons perhaps). If MC is running, it will perform the Auto-Import scan. If not, this command is silently ignored.