MediaBaseAdmin by MollieSoft - Frequently Asked Questions
	- Updated August  7, 2024 for Version 1.1.1.0.

What is MediaBaseAdmin?
	- MediaBaseAdmin is a free program from MollieSoft that helps you create a media model (a small database) that documents all your media (video, audio, books, etc.).  You can have any number of media models, but only one can be loaded at a time.
	- A media model contains various media sets; each media set is a grouping of similar media items.  For example, the media set "Audio" might contain a media item for each audio book you own; the media set "DVD" might contain a media item for each DVD you own.
	- Each media item can contain up to 4 images (.jpg files); some notes (.txt file) containing fields such as "Title", "Author", "Summary"; a URL (.URL file) with a link to some web page describing the item in detail (such as an amazon link); and optionally the disk files or folders containing any associated content for the media item (e.g. audio .mp3 or video .ISO/.mp4 files).
	- Note templates let you create uniform note fields for the items in a media set.
	- Search for media items by path or note contents using MollieSoft File Query Language (MFQL).  The path of a media item is a folder path within a media set, e.g. "CharlesDickens\DavidCopperfield" might be a media item within the "Audio" media set.
	- The auxiliary program MediaBaseBrowser provides a simple read-only interface used to browse/search the media items.

How do I install MediaBaseAdmin?
	- Go to www.molliesoft.com/MediaBase to download the install package for MediaBaseAdmin.  You will need administrator privileges on your machine to perform the install.

What operating systems will run MediaBaseAdmin?
	- MediaBaseAdmin runs on Windows 8.1, Windows 10 or Windows 11.
	- MediaBaseAdmin requires the Microsoft .NET Framework version 4.6.1 to run.  This should normally already be present; if the MediaBaseAdmin installation process detects it is not installed, go to
	https://www.microsoft.com/en-us/download/details.aspx?id=49981
and install it.

How do I run MediaBaseAdmin?
	- The install process places a shortcut to MediaBaseAdmin on your desktop.
	- Only one instance of MediaBaseAdmin can be running at any given time.  If it is already running, invoking the MediaBaseAdmin desktop shortcut will simply activate the running instance.

How can I learn more about how MediaBaseAdmin works?
	- This FAQ is the main source of information about MediaBaseAdmin.
	- Please email support@molliesoft.com with any questions that the documentation does not address.

Media Model

What is a media model?
	- A media model contains all the information about your media sets and media items.
	- MediaBaseAdmin shows a single media model at a time, but you can have many different media models on disk and load any one of them in MediaBaseAdmin (when you restart MediaBaseAdmin it will show the last model you loaded).  Press the "Model" button at the top left of the MediaBaseAdmin main window and select "Load" from the drop-down list.
	- You can create any number of media models (using "New" in the Model button drop-down list), or save (copy) the existing model to a different folder (using "Save as"), or move the current model to a new folder (using "Move to").

What are media sets and media items?

	- A media item can represent any type of media (physical or digital), such as:
•	a physical (printed) book
•	an e-book
•	a folder containing the files for an audio book
•	a DVD or Blu-ray disk
•	a video file stored locally or on an external drive
•	a music CD (or even a specific song), etc.

	- A media set consists of a group of logically related media items, such as:
•	all my printed books
•	all my printed books that are fiction
•	all my eBooks
•	all my Blu-ray disks
•	all my video files (e.g. .mp4 or .ISO) stored in a specific folder of a specific external drive

	- A media item can have descriptions (details) of various types, such as images, notes, a URL describing the item (e.g. on amazon.com), and a list of any associated content files or folders.  MediaBaseAdmin will be more useful to you if you provide as many details as possible. Notes are especially useful since you can search for media items using the contents of note fields.
	- Each media item can have associated content files/folders, assuming the parent media set is allowed to have content (digital assets).  Edit the media set and check the box for "Has content files".  Specify the base content folder for the media set.  The media items of a media set can only be assigned content files/folders that lie within this base content folder.  The content files of a media item must have one of the file extensions specified in the media set content file types.  Content files can be easily transferred to the playable folders of a media player such as Kodi (https://kodi.tv/) using the "Transfer Content" button on the MediaBaseAdmin main window.

How do I create/remove a media set?
	- The "Media Sets" button on the main window shows the "Media Sets" dialog which allows you to create or remove a media set.  Note: If you remove a media set, you are also removing all the media item details files (images/notes/URL) for all items in the media set.
	- The Media Sets dialog also shows a useful overview of all your media sets, including the number of media items, the content drive/folder (if any), when the last media item was added to the media set, and how much space is left on the content drive.

What are the properties of a media set?
	- Edit the media set to see its properties.  You can double-click the media set name of a media item in the main list, or press the "Media Sets" button in the main window to see all your media sets, then press Edit to view/change the properties of a media set.  The "Edit Media Set" dialog appears:

	- You can change the name of the media set.  This will also rename its associated folder of media item details files within the media model folder.
	- You can select the default note template for a media set.  You can add/remove/change note templates using the "Note Templates" button.  The default note template of a media set controls which note fields will be added to an item when you press the “Add Template Notes” button  in the Notes area of a media item.
	- Check "Has content files" to allow adding content files/folders to media items in this media set.  The "Content" area of the media item details will only be visible if this is checked.  Specify the drive and base content folder for the media set.  All content for media items in this media set will reside under this base content folder.  The content for a media item will normally be in the relative path of the media item under this base content folder.
	- The content file types (extensions) allowed for media items in this media set are shown in the "Content file types" text area.  Start each extension with ".", and separate the extensions with a space.  You must provide at least one such content file type for the media set.
	- If you check the box "Assign media item creation times from content files" then press OK, the creation times for all content files of all media items in the media set will be used to set the creation times of the media items.

How do I create/remove a media item?
	- Use the Add or Remove buttons above the list of media items in the main window.
	- The Add button shows the "Add Media Item" dialog.  The dialog assumes the new media item will be in the current media set and current item folder, but you can change these.  Fill in the new item name, and press OK.
	- Removing a media item also removes all its details files (images/notes/URL).

How do I move a media item to a different folder, or rename it, or move it from one media set to another?
	- You can change the name, folder, or media set of a media item using the "Edit" button in the main window.  This will move all the associated media item details files (images, notes, URL) to a new location and will remember the new location in MediaBaseAdmin.

More generally, can I move an entire folder of media items to a different folder in the media set, or move a folder of media items to a different media set?
	- Use the Folders button in the main window to show the "Manage Media Set Folders" dialog.
	- This lets you move all media items in a folder of a media set to a new folder within the same media set, or to a different media set.  This will move all the associated media item details files (images, notes, URL) to a new location and will remember the new location in MediaBaseAdmin.
	- For example, you can move the folder "Fiction\CharlesDickens" in the "PrintedBooks" media set to the folder "Fiction\Classics\CharlesDickens".

Media Item Details

How do I add images for a media item?
	- Use the row of buttons above the Images area at the right of the main window:
		
	- Use the "Paste New" button  to paste the image from the Windows clipboard as a new image for the media item.  (The button will just play a beep sound if there is no image in the clipboard.)  Note there can be at most 4 images for a media item, so after you have added 4 images this button will be disabled.  .  You can also paste the current clipboard image using the "Paste Image" shortcut button at the top-right of the main window.
	- Use the "Paste Over" button  to paste the image from the Windows clipboard over the current image.  This will replace the existing image.  As above, the button will beep if there is no clipboard image.  If there are no images yet, this will just add this clipboard image as the first image for the media item.
	- Use the "Move Up/Down" buttons  to change the position of the current image in the list of images.
	- Use the "Remove Image" button  to remove the current image from the list.
	- Use the "Remove All Images" button  to remove all images for the media item.
	- Use the “Edit Image” button  to open the current image in the default image editor (e.g. Microsoft Paint).
	- Use the "Explore" button  to open a Windows Explorer with the current image file selected.

How do I add text notes for a media item?
	- Use the row of buttons above the Notes area at the right of the main window:
		
	- Use the “Add Note” button  to add a note for the current media item.  This will add an area for the note name (e. g. “Author”) and an area below it for the note contents (e.g. “Charles Dickens”).  Click in either area to edit the note name and contents.
	- Use the “Remove Note” button  to remove the current note.  This will remove both the note name and contents.
	- Use the “Move Up/Down” buttons  to move the current note up or down in the list of notes.
	- Use the “Add Template Notes” button  to add note names for the current note template.  (See the question below for an explanation of note templates.)
	- Use the “Remove All Notes” button  to remove all the notes for the media item.
	- Use the “Explore” button  to open a Windows Explorer with the current notes file selected.
	- Use the “Edit Notes File” button  to edit the notes using the default editor (e.g. Notepad).  Any changes you make in an external editor will be shown immediately in MediaBaseAdmin (after you save the changes to the notes file).  Similarly, if you remove the notes text file using Explorer, the Notes area will be cleared immediately.  You can also edit the notes file using the "Edit Notes" shortcut button at the top-right of the main window.
	- Use the tab key or the up/down arrow keys to move between notes fields.  Note this will only take you to the contents area of each note, not the title area.  To edit the title of a note, click directly in the title area.
	- Only 20 note fields per media item are allowed.

I want all the notes in a media set to have a standard format, like Author, Title, Genre, etc.  How can I do that?
	- You can create a “note template” listing these standard fields.  Press the main window "Media Sets" button to show the Media Sets dialog.  Press the Edit button in this dialog to edit the selected media set.  Now use the "Note Templates" button to add/remove/edit note templates and the fields they contain.  Select one of the note templates as the default template for this media set.
	- Let’s say you have a note template named “AudioBook” containing the fields “Author”, “Title”, “Genre”, “Length” and “Summary”.  If this is the default note template for the media set "AudioBooks", you can use the “Add Template Notes” button  in the Notes area to add notes for all these fields to the current media item at once.  This will only add notes for any template field you have not yet added - for example, if there is already an “Author” field, then adding template notes will not add another “Author” field to notes; only fields that do not yet exist will be added.  Of course, you must fill in the contents for all the fields added in this way.

Can I use the previously entered values for note fields like Author, Reader, Genre to fill these in for the notes of new media items?
	- You can designate a note template field as "autocomplete".  Now when editing this field for a media item, you will see a dropdown list of suggested values gathered from all media items in all media sets using the same template.  Open the Media Sets dialog from the main window, then use the "Note Templates" button on the upper right of this dialog to view or change the autocomplete settings for note template fields.
	- A note template field should be designated autocomplete only if its values recur across many media items, e.g. Author, Reader, Genre for an "AudioBook" template, or Rating for a "Video" template (with values R, PG-13, TV-MA, etc.).
	- An autocomplete notes field can only be a single line of text, since the dropdown list can consist only of single lines.  If you designate a field as autocomplete, its value will be forced into a single line when you display the media item.  Any line breaks will be displayed as "{\n}" for an autocomplete notes field.
	- As you add media items with new values in an autocomplete note template field, the new values will be added to the autocompletion suggestions for the field.  However, when you change the value of this field, or remove it from the media item notes, the old values will not automatically be removed from the autocomplete suggestions.  Occasionally, you may want to rebuild the autocomplete suggestions for one or more fields to accurately reflect the spread of actual values in your media items.  Use the "Media Sets" button in the main window to see the list of media sets, then use the "Note Templates" button at the top right of this dialog to see your note templates and their contained field names:

You can check the field "Rebuild autocomplete" for any or all of the note templates; once you exit the dialogs, the autocomplete suggestions lists will be rebuilt from the note fields of existing media items.  These lists are also maintained automatically when you add or remove a media set, or assign a different default note template to a media set.

How do I add a URL for a media item?
	- Use the row of buttons above the URL area at the right of the main window:
		
	- Use the “Visit URL” button  to display the URL in the default web browser. You can also visit the URL using the "Open URL" shortcut button at the top-right of the main window.
	- Note: If FireFox is your default browser instead of Edge, you may have to change a FireFox setting to allow MediaBase to open a media item URL in FireFox.  In a new FireFox tab, open "about:config" to see FireFox settings, then change "browser.link.open_newwindow.override.external" to 3 (divert new window to a new tab), which will open links from a .url file in the last active FireFox window.  See https://support.mozilla.org/en-US/questions/1258193.
	- Use the “Paste Simplified URL” button  to paste the URL in the clipboard into the URL text area, and simplify it.  For example, if the clipboard URL is this Amazon link for David Copperfield:
	https://www.amazon.com/David-Copperfield-Charles-Dickens-audiobook/dp/B074HHQT5W/ref=tmm_aud_swatch_0?_encoding=UTF8&qid=&sr=
then pasting it as a simplified URL will produce:
	https://www.amazon.com/dp/B074HHQT5W
which will take you to the exact same web page.  Note: simplifying a URL other than an Amazon URL will just remove the query string portion of the URL (after the ‘?’ if there is one).
	- You can also paste the (simplified) clipboard URL using the "Paste URL" shortcut button at the top-right of the main window.
	- Use the “Simplify URL” button  to simplify the URL already in the text area.
	- Use the “Remove URL” button  to remove the URL in the text area.
	- Use the “Explore” button  to open a Windows Explorer with the current URL file selected.
	- Of course, you can also add/edit a URL by typing directly (or pasting some text) in the URL text area.  Note: the URL buttons are only enabled if you provide a valid (well-formed) URL, starting with http:// or https://.

Where can I find images and notes for media items?
	- The websites amazon.com, imdb.com (for video), and wikipedia.com are all good sources.

Some of my media items have extensive notes with many note fields.  Can I make the notes area bigger so I can see all the notes at one time?
	- Press the "Maximize Notes" button  at the top-right of the media item details area to expand the notes area to fill the entire height of the main window.
	- Press the button again to restore the notes area to its normal position.
	- You can also use the keyboard shortcut Alt+E to expand/restore the notes area.
	- This works in both the main window and in Search view.

How do I specify the content files/folders of a media item (if any)?
	- Use the row of buttons above the Content area at the bottom right of the main window:
		
	- Note that the Content area will not be visible for a media item unless its media set has content files.  (Check the "Has Content Files" box in the media set edit dialog.)
	- All the buttons require the source content drive to be available (mounted).
	- Use the "Add Content Files" button  to select content files for the media item and add them to the media item content list.  You can select several files at a time using Control+Left+Click in the Select dialog.
	- Use the "Add Content Folder" button  to select any content folder within the media set base content folder and add it to the media item content list.
	- Use the "Remove Media Content" button  to exclude the selected media content file/folder from the media item.  Note this does NOT remove the content file/folder from disk.
	- Use the "Explore Content" button  to open a Windows Explorer in the content folder of the media item.  You can also just double-click the file/folder in the content list to explore the content.
	- Use the "Assign Creation Time" button  to check the creation times of content files of the media item, and update the creation time of the media item as shown in the media item list.
	- Use the "Transfer Media Content" button  to transfer some/all of the media content to Kodi.  This shows the "Content Transfer Options" dialog allowing you to specify the target folder for the transfer.  Once you start the content transfer, it will also appear as a running transfer job in the Transfer Content Files view (use the main window button "Transfer Content" to see this view).

I have two similar media items in different media sets. Can I just copy the images/notes/URL from one media item to another?
	- Yes.  Use the Copy/Paste buttons at the top-right of the media details area to do this.
	- For example, say you have images/notes/URL for the movie Titanic in your "DVD" media set, but you also have the Blu-ray for Titanic in the media set "Blu-ray".  Select the media item Titanic in the DVD media set. and press the Copy button.  Now select the media item Titanic in the Blu-ray media set and press the Paste button.
	- You can choose which media items to copy and which to paste using the copy/paste dialogs that appear.

The media item details used by MediaBaseAdmin seem very similar to those used for "book details" in the MollieSoft program AudioWeb.  Can I use media item details as my AudioWeb book details?
	- Yes.  Set up a single media set in MediaBaseAdmin (e.g. "AudioBooks") whose media items represent your audio books.  In AudioWeb (version 1.2.9.0 or greater is required), edit the user and set the "Book Details Base Folder" to be:
		<MediaBaseModel>\AuxFiles\\AudioBooks
where <MediaBaseModel> is the model folder used by MediaBaseAdmin.  For example, if the media model base path is C:\Documents\MediaBaseModel, set the AudioWeb "Book Details Base Folder" to be C:\Documents\MediaBaseModel\AuxFiles\AudioBooks.

Search View

I have thousands of media items.  How can I find all the items with a certain title, or items added recently, or with certain words in the item notes?
	- Open Search View using the Search button (above the media items list in the main window) to search for items in several different ways.
	- The simplest method is to type some search terms (separated by spaces), in the "Item path" text field, then press the Enter key or the green Search button at the top of the view.  (Click the "Simple search" checkbox to enable these fields.)  This will find all items whose path contains all of the search terms, and display the matches in the media items list at the bottom of the view.  If you wish to search for a term that contains spaces, just surround the search term by double-quotation marks.  If you already have some simple search fields filled in, you can press the Clear button to remove them and start over.
	- For example, type "green mansions" in the item path text field (without the quotation marks) to search for items whose path contains both "green" AND "mansions".  Press the Enter key or use the green Search button to display all such items in the media items list at the bottom of Search view.
	- To search for items whose name contains the terms "green" OR "mansions", click the "Match ANY word" checkbox, then press Search.  All items whose path contains EITHER "green" or "mansions" will be displayed; of course this will be many more than before, when you were searching for "green" AND "mansions".
	- Similarly, you can search for text within a notes field (from the text details file) of any media item.  Type "Author" in the "Notes field" area, and "dickens" in the "contains" text box at the right, then press Enter or Search.  This will find all items whose notes contain a field named "Author", with field value containing "dickens".  Equivalently, you can enter the field name as "<Author>"; this is useful since typing "<" in the notes field area shows a drop-down list of all note template field names (but you can also search for a notes field name that is not in any note template).
	- To search for the exact value "Charles Dickens" in the notes "Author" field, change the value "contains" to "equals" in the drop-down list to the right of the notes field text area.
	- Normally, case (capitalization) is not considered when determining if a term occurs in the item path or within notes.  To search in a case-sensitive manner instead, you can check the "Match case" checkbox at the top of the view.  Now items whose path contains "Green" will not match the term "green".
	- Use the "Media set" drop-down list to search for media items within a specific media set.
	- To find media items added within the last 7 days, click the checkbox in the "Item creation time from" date picker, and select a date 7 days in the past.  To find media items added before January 1, 2024 click the checkbox in the corresponding "to" date picker and select this date.
	- You can search for media items that have (or do not have) an URL, notes, or images using the "Search for" check boxes in the simple search area.  For example, to find all items that have NO media details, check each of the "Search for" boxes but do not check the "Has URL", "Has notes" or "Has images" boxes.
	- When you press the Search button with "Simple search" checked, the resulting search query is shown in the search query area.  See below for more information on the format of a search query.
	- The status area at the bottom of Search view tells you how many media items were found in the last search.

The columns I see in the search results list seem to depend on the search query in some way.  How does that work?
	- Each search results column show the value of a different search variable.  Since there are many such variables, for simplicity only certain variables are shown in the results of a particular query.
	- The variables $MediaSetName and $ItemPath are ALWAYS shown in the results so that you can identify the media item.
	- The other variables shown in the results are the variables that occur in the search query.  For example, if you search for items in the media set "DVD" with item creation time after 2024/02/01, the search query might be:
	"[$MediaSetName = "DVD"] 
		 and [$ItemCreationTime > $DateTime.20240201_000000]"
in which case the search results columns will be:
	$MediaSetName (always present)
	$ItemPath (always present), and
	$ItemCreationTime (present in the query).
	- A particular variable column can only occur once in the results list.  For example, even if the query uses $ItemCreationTime more than once:
		[$ItemCreationTime < $Now - $Days.1]
			 and [$ItemCreationTime > $Now - $Days.7] 
the results list will have only one column entitled "$ItemCreationTime".
	- You can use the "Extra Columns" dialog to force extra variables to appear in the search results as well, even if they do not occur in the query.  The extra columns you request will be present in every new search query results until you change them or close Search view.  See the question "What are Extra Search Columns?" below for more information.

What are Extra Search Columns?
	- When you perform a search, the search results list will normally only show columns for the set of variables that occur in the query.  However, you can force extra columns to appear by using the "Extra Columns" button above the results list.  This shows the "Extra Search Columns" dialog:

	- You can check any number of column (variable) names in this dialog.  After you close the dialog, these additional columns will be appended to the search results for the current search query, as well as for any new search query.
	- Extra columns in the results list are shown with a light brown color to distinguish them from columns whose variables occur natively in the search query.
	- If you have already selected extra search columns, they will already have a check mark in the dialog when you open it.  Just uncheck these column names to remove them from the search results.
	- Use the group checkboxes above the individual lists (General Variables, Content Variables, Url Variables, Image Variables, Notes Variables) to check/uncheck all the boxes in an individual list at once.
	- To add an individual notes field such as "$Notes.Reader" to the Notes Variables list, enter this text (including the prefix "$Notes.") in the small textbox at the bottom of the Notes Variables list, then press the button "Add Notes Field" at the left of this textbox.  The notes field will then be added to the Notes Variables list.  If you just type the character "$" in the textbox, you will see a list of all the notes fields from the note templates you have defined.  You can select one of these, or enter any other notes field name.
	- If a variable occurs in the query, and you also select it as an "extra" column in the dialog, it will still only occur once in the results list.
	- If you close Search view, the extra columns will be gone when you reopen the view.

What can I do with the search results in Search view?
	- Sort any column in the results list by clicking the column header.  Click again to sort the column in the opposite direction.
	- Double-click any of the small column dividers at the top of the results list to make the column at the left of the column divider expand to the maximum width of any entry in the column, or just left-click-drag the column divider to change the column width.
	- Use the "Export" button to export the results list to a comma-separated-values (.csv) file, which you can then view using Microsoft Excel.  For reference, you can also export the current search query to a line above the exported results list by checking "Export search query" in the MediaBaseAdmin Settings dialog.
	- Use the "Explore" button to open a Windows File Explorer positioned at the aux files of the current media item (same as double-clicking the $ItemPath entry).
	- Use the Maximize button to see the search results in a larger list occupying the entire view; then click the Restore button to revert to the smaller list.

What does the "Simple search" checkbox mean?
	- It means you are building a search query using the field controls, instead of building a query by typing directly in the "Search query" text box.
	- When you use the "Simple search" fields to search for items, you are actually building a "Search query" expression, which is shown in the text area above the results list when you press the green Search button.  Every media item is then evaluated against this search query, and items that satisfy the query appear in the results list.  You can use these simple search queries as a starting point, and modify them as you wish to get different results.
	- Building a query in this way (using the controls) is a Simple search.  However, you can enter any valid search query in the "Search query" text area, then press the green Search button (or use the shortcut key combination Control+Enter) to get the corresponding results.  When you search in this more complex way, the check mark is removed from the "Simple search" checkbox to indicate you are using a "raw" search expression instead of building it from the controls.  If you manually click the "Simple search" checkbox, the green Search button will again use the Simple search controls to build a query.

What is the language used by search queries?
	- Search queries are written in M/QL (MollieSoft Query Language).

	- A basic query (a "statement") just compares a search variable with a constant.  (The value of a constant is independent of the media item being considered.)

	- Here are some examples of basic queries:
•	[$ItemPath has "mansions"] looks for items whose relative path (excluding the media set base path) has the text "mansions" somewhere in it.
•	[$AuxModifiedTime > $now - $days.2] looks for items whose aux (URL/notes/images) files were modified less than 2 days ago.
•	[$ImageCount = 0] looks for items with no associated image files.

	- Basic queries are always surrounded by square brackets.

	- Basic queries can be combined using any combination of the logical operators 			AND, OR, NOT, and parentheses ( )
to form a complex query.  For example, the complex query
		[$ItemCreationTime < $DateTime.20240501]
			and not [$ItemPath has "History"]
looks for items added before May 1, 2024 but whose path does not contain the text "History".

	- Note that when you use "Simple search" (build a query using the field controls) the basic queries resulting from the individual controls are combined using the AND operator.  However, if "Match ANY word" is checked, separate terms (separated by spaces) within the text boxes "Item path" and "Notes field" will be combined using the OR operator instead.

	- Search variables are of two types: text variables (which evaluate to a string of characters) and arithmetic variables (which evaluate to a number).  Text variables can only be compared with text values, and arithmetic variables can only be compared with arithmetic values.

	- Text variables can be compared with text constants using the operators:
		= ,  != ,   "Has", "StartsWith", "EndsWith", "RegexMatch".
•	The equal and not-equal operators test for equality and inequality.
•	The "Has" operator tests whether the value of the second operand is present in the value of the first operand.
•	 "StartsWith" tests whether the first operand begins with the second operand.
•	"EndsWith" tests whether the first operand ends with the second operand.
•	"RegexMatch" matches the first operand variable with the regular expression in the second operand.
•	If "Match case" is checked, all of these tests are performed in a case-sensitive manner; if unchecked, the tests are case-insensitive.

	- For example, say a media item in the media set "DVD" has the path "Titanic".  Then all these statements are true:
		[$ItemPath= "Titanic"]
		[$ItemPath Has "anic"]
		[$ItemPath StartsWith "Titan"]
		[$ItemPath EndsWith "nic"]
		[$ItemPath RegexMatch "^[TB]itanic$"]
But these are false (note spaces within text constants are important):
		[$ItemPath Has "Titanic  "]
		[$ItemPath StartsWith " T"]
		[$ItemPath EndsWith "nic "]
Operator names are always case-insensitive: "has" is the same as "Has", "startsWith" is the same as "Startswith", "endswith" is the same as "EndsWith", etc.

	- Arithmetic variables can be compared with arithmetic expressions using the operators:	=,  !=,  <,   >.

	- Variable names are always case-insensitive.  Thus, the forms $NotesfilePath and $NotesFilePath are both valid and mean the same.

	- The text variable names (text properties of media items) used in M/QL are:
•	$ItemPath - Relative path of media item excluding the media set base folder.
•	$ItemName - Last segment of item path.
•	$ItemFolder - All but last segment of item path.
•	$MediaSetName - Name of the media set containing the item.
•	$Notes.<FieldName> - Individual field in the notes file, e.g. "$Notes.Author".  Normally, the name of a notes field can only contain letters/digits/underscores/dashes/parentheses (no spaces).  However, if you have a notes field with any other characters, e.g. "My Special Notes Field", you can specify this notes field name using quotes, e.g.
			 [$Notes.''My Special Notes Field" has "some word"]
•	$Notes - Entire contents of notes file.
•	$NotesFilePath - Relative path to notes file, excluding media set base folder.
•	$NotesFileName - File name of notes file.
•	$NoteTemplateMatch.<TemplateName> - "True" if notes have a non-blank value for each field in template, else "False".  For example, the variable $NoteTemplateMatch.AudioBook is "True" if all the fields in the AudioBook template ("Title", "Author", "Reader", "Genre", "Length", "Summary") occur in the notes file of the media item and are not blank.
•	$Url - Url string for media item.
•	$UrlFilePath - Relative path to URL file, excluding audio/doc base.
•	$UrlFileName - Name of URL file.
•	$Image<N>FilePath - Relative path of image file #N (1-4), e.g. $Image1FilePath.
•	$Image<N>FileName - Name of image file  #N (1-4), e.g. $Image4FileName.
•	$ContentFiles - List of relative content file paths excluding the content base path.
•	$ContentFolders - List of relative content folder paths excluding the content base path.
•	$Content - List of relative content file/folder paths.
•	$ContentFilesMissing - List of relative content file paths for missing files.
•	$ContentFoldersMissing - List of relative content folder paths for missing folders.
•	$ContentMissing - List of relative content file/folder paths for missing files, or missing/empty folders.

	- Note: You can query the string length (number of characters) of any text variable by adding the suffix "#Length" to the variable name.  For example, the query
		[$ItemName#Length > 25]
searches for items whose name has more than 25 characters.

The arithmetic variable names (arithmetic property of items) used in M/QL are:
•	$AuxModifiedTime - Last date/time aux files of the item were modified.
•	$ItemCreationTime - Earliest date/time when item added or aux/content file created.
•	$NotesFileSize - Size of notes file.
•	$NotesModifiedTime - Date/time notes file last written.
•	$NotesFieldCount - Number of notes fields in notes file.
•	$NoteTemplateMatchCount.<TemplateName> - Number of non-blank notes fields that match a field name in the template.  For example, the variable $NoteTemplateMatchCount.AudioBook is the number of non-blank notes fields with the name "Title", "Author", "Reader", "Genre", "Length", or "Summary".  The statement
			[$NoteTemplateMatchCount.AudioBook = 6]
	      is true for a media item with all the AudioBook template fields filled in.
•	$NoteTemplateCount.<TemplateName> - Not an item variable, but a constant representing the number of fields in the template.  So another way to write the statement above is:
			[$NoteTemplateMatchCount.AudioBook = 
				$NoteTemplateCount.AudioBook]
•	$UrlFileSize - Size of URL file.
•	$UrlModifiedTime - Date/time URL file last written.
•	$Image<N>FileSize - Size of image file #N (1-4).
•	$Image<N>ModifiedTime - Date/time image file #N was last written.
•	$ImageModifiedTime - Latest date/time any image file was last written (max of modified time for image files 1-4).
•	$ImageCount - Number of images (0-4) assigned to the item.

Conversion operators:  you can convert a variable value to a different form by adding a suffix (#) operator:
•	#ToText - Converts an arithmetic (double) variable to text (string) form, using the specific variable type.  For example, $UrlFileSize#ToText might evaluate to the text "$KB.4".   $ItemCreationTime#ToText might evaluate to the text "20100225 13:26:18", representing February 25, 2010 at 1:26 p.m. and 18 seconds.  To see how this operator works, include a statement involving it in the query, e.g.: [$ItemCreationTime#ToText  has "2024"].
•	#ParseNumber - Converts a text variable to a number.  Useful if you have defined a notes field that is actually a number.  For example, if you have a notes field named "Rating" that can be 1-5, the query [$Notes.Rating#ParseNumber > 3] will produce all items with rating 4 or 5.
•	#ParseDateTime - Converts a text variable to an arithmetic date/time.  For example, if an item has a notes field "DatePublished" with value "01/15/2020", $Notes.DatePublished#ParseDateTime will have same value as $DateTime.20200115.
•	#ParseTimeSpan - Converts a text variable to an arithmetic timespan.  For example, if an item has a notes field named "BookDuration" with value "20:25:05" (20 hours, 25 minutes, 5 seconds), $Notes.BookDuration#ParseTimeSpan will have the same value as $TimeSpan.202505. The query [$Notes.BookDuration#ParseTimeSpan > $Days.1] will find all items with a notes "BookDuration" field exceeding 1 day.
•	#ParseBytes - Converts a text variable of the form "<N> B/KB/MB/GB" to an arithmetic size in bytes.  For example, if a media item has a notes field named "BookSize" with value "20 MB", $Notes.BookSize#ParseBytes will have the   same value as $MB.20.  Similarly, the notes value "100 KB" will match $KB.100, etc.

	- The following arithmetic variables are used as convenient expressions to represent arithmetic constants:
•	$Now - the current date/time.
•	$DateTime.YYYYMMDD_hhmmss - where YYYY = year, MM = month, DD = day, hh = hours (00-23), mm = minutes (00-59), ss = seconds (00-59); leading zeros are required.  The reduced form $DateTime.YYYYMMDD is also valid and represents midnight (start of the day).
•	$Days.N - where N is the number of days (N >= 1); can be added to or subtracted from a date/time.
•	$Timespan - can be any of the forms:
		$Timespan.ss
		$Timespan.mmss
		$Timespan.hhmmss
		$Timespan.d.hhmmss
   where ss = seconds (00-59), mm = minutes (00-59), hh = hours (00-23), d = days; can be added to or subtracted from a date/time.  Leading zeros are required in each form.
•	$KB.N - where N is the number of kilobytes.
•	$MB.N - where N is the number of megabytes.
•	$GB.N - where N is the number of gigabytes.

	- For example:
•	$DateTime.20170823_193033 - represents August 23, 2017, 7:30:33 p.m.
•	$Days.23 - represents a time span of 23 days.  This can be added to or subtracted from a $DateTime value.
•	$KB.40000 - represents 40000 kilobytes.
•	$MB.50 - represents 50 megabytes.

It's hard to remember all these variable and constant names!  Isn't there an easy way to add the correct form of a variable or constant into the search query text area?
	- Yes.  Use the "Build Query" button above the search query text area to show the query helper menu.  Select a variable, operator, constant or suffix from the menu to add it into the search text box at the current position.  Use these to form statements, then connect your statements with the logical operators and/or/not to make complex queries.
	- You can also show the query helper menu by right-clicking in the search query text area.
	- You can also press the Help button at the top to show the Search Help window.  This provides a convenient summary of search query syntax that you can use while composing queries.  Note: press Ctrl-F in the Search Help window to show the Find Bar and find text within the help document.

How can I use regular expressions in the search?
	- Warning!  Regular expressions are rather complicated and are intended for the "power user".  If you don't feel comfortable with them, just ignore this capability and use the plain text search operators "=", "!=", "Has", "StartsWith", "EndsWith".
	- Example: to search for media items whose name starts with 2 numeric digits, use the query [$ItemName regexMatch "^\d\d"].
	- When building a search query, you can use the "RegexMatch" operator with any text variable, such as $ItemName or $ItemFolder.  This will perform the match using the Microsoft version of regular expressions, explained at https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference.  You may also like the "cheat sheet" available at https://download.microsoft.com/download/D/2/4/D240EBF6-A9BA-4E4F-A63F-AEB6DA0B921C/Regular%20expressions%20quick%20reference.docx 
for quick reference.
	- Here are some examples of regular expression syntax.  These snippets are also available using the "regex builder" button  above the Search query text box.
. 			- Match any single character
.* 			- Match any character zero or more times
.+ 			- Match any character one or more times
[abc]			- Match any character in the set 'abc'
[^abc] 		- Match any character NOT in the set 'abc'
[a-f] 			- Match any character in the range a to f
\d 			- Match any numeric character
? 			- Match preceding character zero or one times
* 			- Match preceding character zero or more times
+ 			- Match preceding character one or more times
\d{3} 			- Match three consecutive decimal digits
0[xX][0-9a-fA-F]+	- Match a hexadecimal number
[0-9]*\.*[0-9]+ 	- Match integers and decimals
^ 			- Match beginning of text
$ 			- Match end of text
You can select any of these entries from the regex builder drop-down menu, which will insert the selected expression into the search query text box at the cursor.  You can then modify the inserted expression as desired.

How can I save a query once I have built one I want to keep?  How do I reload it?
	- The "File Menu" button above the "Search query" text box shows a drop-down menu with a "Save as..." menu item, which brings up a "Save Search Query File" dialog.  This lets you save a query to disk as a small text file in the queries directory
%localappdata%\MediaBaseAdmin\Queries, with the extension ".qry".  Enter a valid file name for the query, then press OK.  (Note: "%localappdata%" is a Windows shortcut that resolves to the local application data directory for the current logged-on user, e.g.
		 "C:\Users\marvin\AppData\Local\MediaBaseAdmin\Queries".)
	- To reload a saved query, use the "File Menu" button again, and select the menu item "Load...".  This shows a "Load Search Query File" dialog allowing you to select any previously created .qry file from the queries directory.  Select a query from this dialog to paste into the "Search query" text box, then press the green Search button to actually run the query.
	- If you have saved a query to a file as above, you can rename it using the "Rename" menu item.  Enter a new name for the query in the "Rename Query" dialog that appears, then press OK.
	- When the cursor is in the "Search query" text area, you can use the keyboard shortcut Control+S to save a modified query.  This will either just save the query, or bring up the "Save as..." dialog as appropriate.
	- You can remove a query file using the "Remove" menu item.  Predefined queries (see below) cannot be removed.

Why are some query names surrounded by angle brackets, e.g. <Media items recently added> in the "Query name" drop-down list?
	- There are several useful predefined sample queries provided in the "Query name" drop-down list; these also serve to demonstrate query syntax. Angle brackets around the query name are used to distinguish predefined search queries from queries that you write.  These include (among others):
•	<Media items recently added> - search for media items created within the previous week.
•	<Media items recently modified> - search for media items whose aux file files were modified within the previous week.
•	<Media items with no image and no notes> - search for media items with no images and no note fields.
•	<Notes with unprintable characters> - search for media items whose notes contain unprintable characters, resulting from having saved a Unicode notes file as "ANSI" encoding instead of "UTF8" encoding.  Looks for the Unicode "replacement character" U+FFFD in the notes text.
	- You can use these as written, or modify them to make your own queries.
	- Modified predefined queries cannot be saved as such; if you change a predefined query, select "Save as..." in the File Menu to save it to disk with a new name.
	- If you do not want to see the predefined queries in the list, open the MediaBaseAdmin Settings dialog and turn off "Show sample queries".

Media Item Content
 What is the "content" of a media item?
	- The items of a media set can represent actual media files/folders on disk (content).
	- The content files/folders of a media item must reside within a single base content folder associated with the parent media set of the media item.  You can specify this base content folder using the "Edit Media Set" dialog:

	- The "Media Item Details" section above explains how to add content files/folders to a media item.  See the question "How do I specify the content files/folders of a media item (if any)?".
	- Content files/folders are used to help determine the creation time of a media item.
	- You can transfer any/all of the content files/folders of a media item to Kodi along with the appropriate image files. 
	- Press the "Transfer Content" button on the main window to show the "Transfer Content Files" view.    This allows you to start any number of content transfer jobs for media items.
	- Set the target base folder for content transfer jobs using the "Options..." button at the top of the Transfer Content Files view.  When you press the green "Transfer" button at the top-left of the view, the file/folders of the selected media item or items will be copied to the relative path of the media item under this target base folder.  You can use the "Selection mode" checkbox to select several files/folders, then press "Transfer" to start all these transfer jobs at once.
	- A list of all running content transfer jobs is displayed at the bottom of the view.  You can control how many jobs run at once (1 - 5) by setting the number of allowed simultaneous transfer jobs in the Options dialog.  Jobs not yet started will have a job status of "Pending", and you can cancel these using the "Cancel Pending Jobs" button above the jobs list.
	- Each running transfer job will show a progress dialog allowing you to cancel or pause the transfer.
	- You can also start a content transfer job for a single media item using the button  in the Content area at the bottom-right of the main window.

Drive/Disk Recognition

I have a media set whose content files reside on an external drive.  How does MediaBaseAdmin know if the content drive of a media set is currently mounted (available)?
	- The simplistic answer would be: just look for the right drive letter!  However, this is too simple in the case of removable drives since Windows can change the drive letter.
	- By default, Windows will just use the first available drive letter for removable USB drives when they are mounted.  Thus, a particular drive might be assigned to G: at one time, then H: the next time if the drive letter G: is already taken by another drive.  Windows Disk Manager does allow you to make the assigned drive letter permanent for a particular removable drive, but this may not be practical if you deal with a large number (> 26) of removable drives on a regular basis.
	- If you use a CDROM (optical disk) as the content drive of a media set, many different CD/DVDs may use the same optical drive (e.g. F:).  When a content transfer job is started, MediaBaseAdmin must ensure that the correct disk is inserted in the optical drive, or prompt the user to insert it if it is not present.
	- To ensure that the content disk is mounted, MediaBaseAdmin identifies all disks by their volume serial number, or by their volume label if there is no volume serial number.
	- If you map a network location or disk folder to a new drive letter (using net use or subst from a command prompt), MediaBaseAdmin will identify this disk solely by its underlying location.

OK, so if I can't just type a drive letter to tell MediaBaseAdmin the content drive of a media set, what do I do instead?
	- When adding or editing a media set, you can specify its content folder by using the Drives button to see a list of disks or network shares you have previously used.  Use the Add buttons on the Drives dialog (shown below) to add a currently mounted disk (fixed or removable), network share, or a mapped drive.  Click on a drive then press the Select button.  After selecting the content drive, select the content folder within the drive from the Add/Edit Media Set Dialog.

	- When adding/editing a disk, you can specify whether it is removable, and if so, whether MediaBaseAdmin should prompt to mount the disk if the disk is unavailable.  You can also specify a friendly name to use for the disk if desired (by default MediaBaseAdmin will use the volume label).
	- When adding/editing a network share, you can specify whether to use the appropriate network credentials to access the network share, whether MediaBaseAdmin should prompt to mount the network share, and a friendly share name if desired.
	- Add Mapped Drive allows you to add a network share that has been mapped to a drive letter via the net use command, or a folder that has been mapped to a drive letter via the subst command.
	- If no media set is using the drive, you can remove it from the list.  If any media set still refers to it, you cannot remove it; the resulting error message will tell you which media set is using the drive for its content files.
	- A drive that is not currently available (mounted) is shown with a red background.
	- Use the Refresh button to determine which drives are currently mounted.

Folder Credentials

What are folder credentials?
	- MediaBaseAdmin is able to access folders on a network share if the share is available.  Normally, Windows manages the credentials (user name and password) required to access a network share, and you will not need to enter these into MediaBaseAdmin.
	- However, for some network shares, Windows may not permanently retain the required credentials.  In this case, you can save the credentials for the share in MediaBaseAdmin (encrypted of course), and these will be used as required to gain access to folders on that share.  This will minimize any user interaction required when transferring content.

What happens if a network share is not available, or my credentials are just incorrect?
	- Windows may take a while to figure this out.  For each credential you enter in the "Manage Folder Credentials" dialog, you can specify a timeout between 1 and 60 seconds, controlling when MediaBaseAdmin will give up on this network share.  The default is 5 seconds; the longer the timeout for a share, the longer MediaBaseAdmin will "hang" waiting for the share credentials to validate, so be careful when modifying this timeout value.

How do I enter credentials?  How are they used?
	- Click the "Network Credentials" button on the Drives dialog to enter and test credentials for any network share.  You can add, remove, edit, or test any credentials you enter.
	- Enter a network path using leading "\\" just as in Windows.  Examples:
		\\192.168.1.10
		\\111.22.333.44\shared
		\\BobsComputer\Fileshare1
	- Enter the user name in the form <Domain or Machine>\<user>.  Examples:
		BobsComputer\RobertUser
		Desktop1\JohnDoe
		MarysComputer\Mary
	- Enter the password using the "Edit" dialog available from the "Manage Folder Credentials" dialog.  When you enter the password, the characters are replaced by masking characters for security.  The password is never visible in plain text on any screen of MediaBaseAdmin.
	- User passwords are stored using strong encryption in the MediaBaseAdmin config file, for security.
	- You can enter credentials for "overlapping" network paths.  For example, say you enter credentials for the network path "\\192.168.1.17" on your local network.  Say you also enter credentials for the network path "\\192.168.1.17\shared".  Then when credentials are required for a transfer operation, the credentials with the longest match will always be used in preference to any with a shorter match.  That is, if a media set has the content base folder "\\192.168.1.17\shared\MyFiles", the saved credentials for "\\192.168.1.17\shared" will be used instead of those for "\\192.168.1.17".

MediaBaseBrowser

What is MediaBaseBrowser?
	- MediaBaseBrowser displays a media model in a simplified "read-only" mode.  Users who are not responsible for creating or editing media models can use this program to display and search the model without the more complex user interface required in MediaBaseAdmin.
	- You can download MediaBaseBrowser from www.molliesoft.com/MediaBase.
	- See the separate FAQ for MediaBaseBrowser for more details.

Splash Screen

What does the splash screen show?
	- MediaBaseAdmin version information:
	- License validation step.
	- The elapsed time for initialization of the program.

The splash screen is annoying!  Can I turn it off?
	- Yes.  Just uncheck the "Splash Screen" check box in the "Settings" dialog.

Miscellaneous

I clicked the "Minimize" button (on the upper right of MediaBaseAdmin); where did it go?  
	- When minimized, the MediaBase icon will appear in the System Tray (normally at the bottom right of the desktop).  (If you do not see it there, click the small up-arrow in the tray marked "Show hidden icons".)  Just double-click the MediaBaseAdmin tray icon to show MediaBaseAdmin in a normal window again.  Note that Windows lets you customize the System Tray to make the MediaBaseAdmin icon stay in the visible portion of the tray if desired.  You can also use the MediaBaseAdmin desktop shortcut to make MediaBaseAdmin appear on the screen again.

How do I navigate between the different views (windows) in MediaBaseAdmin?
	- Each view has buttons allowing you to navigate to other views.  For example, the main window "Search" button shows search view; the search view button "Main Window" shows the main window.
	- You can also use keyboard shortcuts to navigate between views.  For example, in the main window you can use Alt+S to show search view; use Alt+H to show the history log; use Alt+T to show the transfer content view.
	- These shortcuts work even in a view that has no associated navigation button.  For example, in the history log use Alt+S to show search view; in search view use Alt+H to show the history log, etc.

How can I navigate back to a previously displayed media item?
	- Both the Main and Search windows have a small set of navigation stack controls above the media item details:
		
Use the back/forward arrow buttons to go to the previous/next media item you displayed.
You can right-click either arrow button to see the entire navigation stack and go directly to any item on it.
	- The navigation stacks for the main window and for Search View are independent of each other.
	- When scrolling rapidly through the list of media items (e.g. using the up/down arrow keys, or the page up/down keys) it would not be very interesting to put ALL visited items on the navigation stack.  Instead, there is a "rest delay" time below which an item being displayed is NOT placed on the navigation stack.  Use the navigation stack properties  "Max items" and "Threshold" in the Settings dialog to change the size of the navigation stack and the time in seconds you must "rest" on an item before it is actually placed on the stack.  By default, the stack size is 25 items and the threshold is 10 seconds.

What is the History Log?
	- Every time MediaBaseAdmin is started, a new History Log file is created in the directory 
		%localappdata%\MediaBaseAdmin\Logs.
Just type the preceding into a Windows Explorer address bar to display the contents of this directory, or press the "Explore Logs" button above the History Log text area.  The files are named using the format
		MediaBaseAdmin.YYYYMMDD_hhmmss.log,
e.g. MediaBaseAdmin.20240417_143932.log is the file created 2024/04/17 at 14:39:32.  These files contain diagnostic information relevant to the operation of MediaBaseAdmin, and can be opened with Notepad.
	- At startup, the History Log will display the current MediaBaseAdmin version and license information, the current media model folder and the number of items in each media set of the model.

Can I disable the little yellow tooltip pop-up windows that appear over controls?
	- Yes; just uncheck "Enable Tooltips" in the Settings dialog.

Can I disable the sounds played when some operation starts and stops?
	- Yes; just uncheck "Enable Sounds" in the Settings dialog.

Where do I send comments or suggestions about MediaBaseAdmin?
	- Email comments or suggestions to:
		support@molliesoft.com
	 or to
		molliesoft@comcast.net