Skip to content

xunillen2/OSML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

OSML(Open sharp media library)
Osml (Open sharp media library) project

CodeFactor

C# and C based library made for easy media management.

Notes

  • 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.

Feature list

this is work in progress

Main

  • Media caching using XML and SQLite
  • Log support(OsmlLog)
  • Settings storage support

Audio

  • Main Audio support
  • D3V2 metadata support
  • ID3V1 metadata support
  • Albums support
  • Artist support
  • Playlist support
  • Extensible Metadata Platform (XMP)

Planned features

See Usage (Videos(movies) and images(pictures)) part see more info about audio and video support.

  • Audio formats
  • Video formats

Usage

Initialization

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.

Getting audio(music)

After cache is initialized you can get your music using:

OSML.Data.Music.OSMLAudioData.AllMusic;

Filters:

Filtered by artist name:
OSML.Data.Music.OSMLAudioData.GetFromArtist("artist_name");
Filtered by album:
OSML.Data.Music.OSMLAudioData.GetFromAlbum("album_name");
Filtered by year:
OSML.Data.Music.OSMLAudioData.GetFromYear("year");

Videos(movies) and images(pictures)

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);
        }
    }
}

How to contribute

Prerequisites

  • Minimum .NET Core SDK version 2.2 installed
  • Linux distribution that supports .NET Core(Windows is not supported at this moment)

Clone repository

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

Tests

Not available.

Pull request

Create pull request with description about changes


Generated by   doxygen 1.8.15

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published