Wiki Navigation
- Loading...
MediaPortal uses SQLite databases to manage the information storage on the different types of media. With this type of storage, access to your media can be done quickly and easily. These databases sit in the background and typically do not require any direct access. If however there is major changes required, it may be better to modify the database directly.
WARNING - USE AT OWN RISK!!!!!!! DO NOT ACCESS THE DATABASE IF YOU DO NOT KNOW WHAT YOU ARE DOING. Changes in these databases could render MediaPortal completely useless and a full re-installation of MediaPortal will be required. It is '''strongly recommended''' that a copy of the database be made so it can be restored if mistakes are made.
Viewing the Database
You may use SQLite Database Browser - a freeware program - to browse and modify MediaPortal databases.
Once you install and open the program, select the database to open. (This can be done by Selecting "File/Open Database")
The databases can be found in the sub folder called "Databases" within the MediaPortal Installation directory - (Default location) C:\Program Files\Team MediaPortal\MediaPortal\Databases
Here a list and description of each database (note the XX at the end of the name replaces the database version number.
Database |
Data |
---|---|
FolderDatabaseXX |
Contains all the folders being used within all other databases of MediaPortal |
MusicDatabaseXX |
Contains all the information being used within Music section of MediaPortal |
PictureDatabaseXX |
Contains all the information being used within Pictures section of MediaPortal |
ProgramDatabaseXX |
Contains information about external applications MediaPortal is configured to use |
RadioDatabaseXX |
Contains the setup information for TV functionality. This database is not used if the TV-Server is implemented. Please read its documentation for database requirements |
TVDatabaseXX |
Contains the setup information for TV functionality. This database is not used if the TV-Server is implemented. Please read its documentation for database requirements |
VideoDatabaseXX |
Contains all the information being used within ?MyVideos section of MediaPortal |
Exporting the Database Contents
Ensure MediaPortal is not running and you have opened the required database. Now you have the ability to export the contents of a table to a CSV (Comma Separated Value) type file which can then be opened in programs like Microsoft Excel or Microsoft Access. This will assist in doing repetitive changes (example. changing share folder name for all music files). It is recommended that MediaPortal not be running after an export is done if it is to be modified and re-imported. Doing so will cause new data added by MediaPortal to be lost during your export-import function as the new data is not in your CSV file. To export the table
- select File/Export/Table to CSV from the menu bar at the top of the GUI.
- Select the table to be exported from the drop down box and then click Export
- Select the filename and location this file will be saved to. Ensure the filename ends with either .txt or .csv otherwise no extension will be applied to the file.
Importing data to the database
Ensure MediaPortal is not running and you have opened the required database. Now you have the ability to import the contents of a CSV (Comma Separated Value) type file to a new table. When an import is done, the program only allows you to import data into a new table. The following steps outline the import process
- To ensure no data is overwritten or duplicated it is recommended that you modify the existing table you wish to import to and rename the table. Select Edit/Modify Table and select the table. A new window will appear allowing you to rename the table.
- Select File/Import/Table From CSV File and select the file you wish to import. If it asks for a Save of the database, click "yes".
- In the window, type the name of the table to be created. It should be exactly the same case as the original table name was(example :- tblPath). Also select "Extract Field Names From first Line" if the first line shows field names which it should. Then select create.
- you should now see your new table created. It is recommended that you also go back and modify the new table by selecting Edit/Modify Table and select the table, to ensure all fields are the same as the original table. This can be viewed and compared via the Database Structure Tab.
- Recommendation is to keep the original renamed table there until after testing has been completed, so you can rename it back to the original name if all does not work. But if you feel confident all is OK, delete the renamed table.
- Don't Forget to save the database once all changes have been made. Select File/Save Database.
2012-04-08T13:19:41Z
2 Kommentare
Team-MediaPortal sagt:
says:
http://sourceforge.net/projects/sqlitebrowser/files/latest/download
Posted Apr, 08 2012 12:52
Team-MediaPortal sagt:
says:
Thx rsbrux - updated the page
Posted Nov, 03 2012 23:30