OSML(Open sharp media library)
|
C# and C based library made for easy media management.
- This library is in experimental phase, and many things may break.
- OSML was not tested on windows, so Linux is only supported platform(for now).
- C code needs to be rewritten.
this is work in progress
- Media caching using XML and SQLite
- Log support(OsmlLog)
- Settings storage support
- Main Audio support
- D3V2 metadata support
- ID3V1 metadata support
- Albums support
- Artist support
- Playlist support
- Extensible Metadata Platform (XMP)
See Usage (Videos(movies) and images(pictures)) part see more info about audio and video support.
- Audio formats
- Video formats
Reference osml library to your app, and execute Initialization with following line:
await OSML.Initialization.Run()
This will create main OSML folder(used for caching and other stuff) and initialize cache(databases, etc...).
Osml does not contain default searching(caching) folders, but you can add some with following line of code:
OSML.Cache.CacheManager.AddAsync("folder_path_here").Wait();
Media database will be automatically updated.
After cache is initialized you can get your music using:
OSML.Data.Music.OSMLAudioData.AllMusic;
OSML.Data.Music.OSMLAudioData.GetFromArtist("artist_name");
OSML.Data.Music.OSMLAudioData.GetFromAlbum("album_name");
OSML.Data.Music.OSMLAudioData.GetFromYear("year");
Video and image formats are not supported(yet). While those formats are unsupported, osml still caches files and only loads them as MediaObj(so no sql(slow)), which means only bare bones data is available. Here is how to get video files:
foreach(Cache.CacheObj c_obj in Cache.CurrentCData.FolderList) { foreach(Media.MediaObj m_obj in c_obj.Media) { if(m_obj.Type == Media.MediaType.Video_Movies) { System.Console.WriteLine(m_obj.Path); } } }
And here is how to get image files(Just change Media.MediaType.Video_Movies to Media.MediaType.Images_Pictures)
foreach(Cache.CacheObj c_obj in Cache.CurrentCData.FolderList) { foreach(Media.MediaObj m_obj in c_obj.Media) { if(m_obj.Type == Media.MediaType.Images_Pictures) { System.Console.WriteLine(m_obj.Path); } } }
- Minimum .NET Core SDK version 2.2 installed
- Linux distribution that supports .NET Core(Windows is not supported at this moment)
Open terminal and type:
git clone https://github.com/NULLCharmander/osml
This will clone osml to home directory, or to any other currently opened folder in terminal
Not available.
Create pull request with description about changes
Generated by 1.8.15