User Tools

Site Tools


reference:mairlistdb_library_csv_import_export

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
reference:mairlistdb_library_csv_import_export [2016/01/17 10:49] – [Columns] twreference:mairlistdb_library_csv_import_export [2020/02/13 16:43] (current) – [Columns] Amplification/Levels tw
Line 7: Line 7:
 ==== File Format ==== ==== File Format ====
  
-  * Plain text format, comma-separated values (CSV) +  * Plain text format, comma-separated values (CSV). 
-  * Separator is comma, strings can be quoted with double-quotes+  * Separator is comma or tab (ASCII 9). 
 +  * Strings can be quoted with double-quotes.
   * Text encoding can be ANSI or UTF-8; for UTF-8, the file must have a valid BOM.   * Text encoding can be ANSI or UTF-8; for UTF-8, the file must have a valid BOM.
  
 ==== Columns ==== ==== Columns ====
  
-=== Column names in first line ===+The CSV file contains one or more columns of values. The set of columns is not fixed, instead **the first line in the CSV file must contain the names of the columns** used in this file.
  
-=== Fixed colums ===+Some "fixed" column names will be recognized and mapped to mAirList's internal fields. The other column names will be treated as additional columns for Attributes. 
 + 
 +=== Fixed column names ===
  
 ^ Column Name ^ Remark ^ ^ Column Name ^ Remark ^
-| ID | |+| ID | With or without leading 0s |
 | ExternalID | | | ExternalID | |
 | Filename | | | Filename | |
Line 26: Line 29:
 | EndType | | | EndType | |
 | Duration | seconds.milliseconds | | Duration | seconds.milliseconds |
 +| EffectiveDuration | seconds.milliseconds (export only) |
 | CueIn | seconds.milliseconds | | CueIn | seconds.milliseconds |
 | FadeIn | seconds.milliseconds | | FadeIn | seconds.milliseconds |
Line 42: Line 46:
 | CueOut | seconds.milliseconds | | CueOut | seconds.milliseconds |
 | Anchor | seconds.milliseconds | | Anchor | seconds.milliseconds |
 +| Amplification | dB (from v6.3) |
 +| LevelPeak | dBFS (from v6.3) |
 +| LevelTruePeak | dBTP (from v6.3) |
 +| LevelLoudness | LUFS (from v6.3) |
  
 === Attribute columns === === Attribute columns ===
  
 +Additional columns found in the CSV file will be treated and imported as attributes. 
 ==== Restrictions ==== ==== Restrictions ====
  
 +Only the fixed columns and attributes columns can be used for import/export. You can **not** use CSV import/export to handle any of the following information:
 +
 +  * Folder assignment
 +  * Playback options
 +  * Additional cue data
 +  * ...
 ===== Exporting Items ===== ===== Exporting Items =====
  
 +When exporting items as CSV from the mAirListDB Library, you have two file formats to choose from:
 +
 +  * //CSV file//: Will export all columns, including ID and all attributes found in any of the items
 +  * //CSV file (without IDs)//: Will omit the ID column
 +
 +The latter can be used to import the items into another mAirListDB, where the items have a different ID.
 ===== Importing Items ===== ===== Importing Items =====
 +
 +CSV files can be used to update existing items in the Library, as well as adding new items.
 +
 +In either case, you can have as many or few columns in the CSV file as you like. Columns not found in the file will be ignored. For example, you can use a CSV file with only the //ID// and //Comment// columns to update only the comment of a particular set of items (identified by their ID), and leave all other fields untouched.
  
 ==== Updating Existing Items ==== ==== Updating Existing Items ====
  
 +To update existing items in the Library, mAirListDB will try to identify the item by one of the following columns:
 +
 +  - ID
 +  - ExternalID
 +  - Filename
 +
 +So if the ''ID'' column is present and contains a value, the ID will be used to identify the item; otherwise, if the ''ExternalID'' is present and contains a value, mAirList will try to identify the item by its External ID; otherwise the filename will be used. If that fails as well, it will look for an item that matches both artist and title.
 +
 +If mAirListDB is unable to identify the item in any of these ways, the item will be treated as new (see below).
 +
 +The item will be updated using the data found in the remaining columns of the file. All other fields will remain untouched. If a column contains the special value ''-'', the field will remain untouched as well.
 ==== Adding New Items ==== ==== Adding New Items ====
  
 +CSV files can also be used to add new items to the Library. In this case, **the ''ID'' column must be empty**, and in case a value for ''ExternalID'' or ''Filename'' is given, there must be no other item in the Library with that External ID or filename already (otherwise mAirListDB would treat that line as an item update, not new item).
 +
 +When adding new **files**, the filename must be located inside any of the registered Storages.
 +
 +When no filename is given, or the ''Filename'' column is not present at all, the items will be treated as //Dummy// items.
 +===== TL;DR - An Example =====
 +
 +
 +<code>
 +ID,ExternalID,Filename,Title,Artist,Comment,EndType,Duration,CueIn,FadeIn,Ramp1,Ramp2,Ramp3,HookIn,HookFade,HookOut,LoopIn,LoopOut,Outro,StartNext,FadeOut,FadeEnd,CueOut,Anchor,Album,Top40,Track,Jahr,Genre
 +00005217,,"M:\Music\Yann Tiersen\Skyline\01 Another Shore.m4a","Another Shore","Yann Tiersen",,,293.907,,,,,,,,,,,,,293.906,,293.907,,Skyline,,1,,
 +00005206,,"M:\Music\Yann Tiersen\Good Bye Lenin\13 Birthday Preparations.mp3","Birthday Preparations","Yann Tiersen",,,151.000,,,,,,,,,,,,,147.905,,151.293,,"Good Bye Lenin",,13,2003,Soundtrack
 +00005196,,"M:\Music\Yann Tiersen\Good Bye Lenin\03 Childhood (1).mp3","Childhood (1)","Yann Tiersen",,,97.000,,,,,,,,,,,,,91.606,,97.533,,"Good Bye Lenin",,03,2003,Soundtrack
 +00005208,,"M:\Music\Yann Tiersen\Good Bye Lenin\15 Childhood (2).mp3","Childhood (2)","Yann Tiersen",,,104.000,,,,,,,,,,,,,97.762,,104.893,,"Good Bye Lenin",,15,2003,Soundtrack
 +00005195,,"M:\Music\Yann Tiersen\Good Bye Lenin\02 Coma.mp3",Coma,"Yann Tiersen",,,78.000,,,,,,,,,,,,,76.751,,78.400,,"Good Bye Lenin",,02,2003,Soundtrack
 +00005177,,"M:\Music\Yann Tiersen\Die fabelhafte Welt der Amelie\04 Comptine d'un Autre ete - L'apres-midi.mp3","Comptine d'un Autre ete - L'apres-midi","Yann Tiersen",,,138.000,0.249,,,,,,,,,,,,131.805,,138.710,,"Die fabelhafte Welt der Amelie",,04,2001,Soundtrack
 +</code>
reference/mairlistdb_library_csv_import_export.1453027799.txt.gz · Last modified: 2019/07/09 16:19 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki