How are media files organized?

From LinuxMCE
Jump to: navigation, search

This page is for getting to know how LinuxMCE stores and generally handles your media. You can find out how where to locate your media on the network, and how it stored internally.

From The Network

For Windows users, you can access the files on the core in Windows explorer's network neighborhood, or by choosing 'Start' 'Run' and typing \\ plus the IP of your core. You will need to login with your user-name and password; it's the same one you use with LinuxMCE Admin. You will see 2 folders: 'public' and 'john', assuming your name is 'John'. Any files that you want everyone in the House to have access to go into the public folder. The folder with your name, John in this case, is your private folder where you can put files that only you will have access to. Often times when you choose to save media using the orbiter, it will ask you if you want the media to be public or private. If you choose public the media will be saved under the public folder, and if you choose private it will be saved under the private folder with your name. Within those folders you will find some folders called: 'music' (where all ripped CDs go), 'movies' (where all ripped DVDs go), 'videos' (where videos recorded from TV or camcorders go), 'pictures' (where your pictures go), and 'documents' (where your documents go). When you go to play some media in the orbiter by choosing the buttons music, movies, videos, pictures or documents, you will see combined together all the media from the family's public folder as well as the media from your own personal private folder.

So, for example, if you rip a CD 'Madonna' and make it public, and rip a CD 'Rolling Stones' and make it private, and your spouse rips a CD 'Fleetwood Mac' and makes it private, then when you touch music on the orbiter you will see 'Madonna' and 'Rolling Stones', and when your spouse touches music your spouse will see 'Fleetwood Mac' and 'Madonna'. Assuming your name is john and your spouse is susan, then if you browse the network share, you will find 'Madonna' in the folder public\music and you will find 'Rolling Stones' in the folder john\music. If, in LinuxMCE admin your user has 'can modify configuration' checked, then that means you are also able to browse everybody else's private folders too. So in addition to 'public' and 'john', you will also see a folder 'susan', which contains 'music' which contains 'Fleetwood Mac'. If that option is not checked for Susan, then she will only see the folder 'public' and 'susan' and will not see your private folder 'john'.

Note that even if you check that option giving yourself access to everyone's private folders, when you go to browse media on the orbiter you will still only see public files plus your own private files, just so you're not bothered with everyone else's.

To maintain the media files, including copying deleting and renaming, you can either use another PC and a network share, such as a Windows PC with Windows Explorer, or in the LinuxMCE admin web site you can choose Media & Files, Browse.

Note that LinuxMCE maintains an internal database of all your media, including various attributes such as the actors in a movie or the composer of a song. This makes searching very comfortable. For example if you touch the music button, then start typing, you will see all attributes. For example after you touch 'G', you may see 'Geffen Studios (studio)', 'Get You Back (song)', 'GNR Live (album)', and 'Guns N Roses (performer)'. You can continue typing to narrow your entries down further, and touch any entry then 'view' to see all the music that matches. The resulting screen even does cross matching and shows pictures for each attribute.

Ripping Media

When you rip media within LinuxMCE, the attributes are created automatically. You can view attributes or change them in the LinuxMCE admin site. LinuxMCE also monitors any media that you may add or change outside of LinuxMCE, such as using Windows Explorer. For example, if you copy files over in Windows Explorer, LinuxMCE will automatically scan the files and add the attributes to its internal database so you can still search. Also if you rename or delete files, LinuxMCE will automatically update your database accordingly.

If you add a plug-and-play network attached storage device, within each media folder you will see a subfolder for that device and you will be able to move files to and from it.

Technical Explination

Technical explanation for Linux users: The public directory maps to /home/public/data, and each user's private directory maps to /home/user_xxxx/data, where xxxx is the internal user ID. The name 'john' is a symlinc to user_xxxx for convenience. The program /usr/pluto/bin/UpdateMedia uses INotify to monitor all /home/public/data and /home/user_xxxx/data folders, so it can rescan whenever the directory is changed. All attributes are stored in the MySql database pluto_media. Each file is a record in the 'File' table. UpdateMedia creates an extended attribute called 'ID' for each file with the primary key of each file. That way, if you move or rename a file, pdateMedia will see the extended attribute and your attributes will not be lost--it just updates the database. When you add a plug-and-play network attached storage, LinuxMCE automatically adds a folder within every single directory, such as /home/public/data/music/new_nas, /home/public/data/movies/new_nas, /home/user_xxxx/data/videos/new_nas, and these are automatically mapped to corresponding folders on the NAS. This makes it very easy for a novice to just plug in a NAS and immediately use it without any technical knowledge.

Hiding Media

If you want to hide some media from LinuxMCE, put a folder lock on the directory containing said media. Learn about folder locks here.