package shakuhachi
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=bb7f91cc44c09f922d2a614e9e01fd0d2976840bacf839a8b99de63c6fc5b3b8
sha512=f02827db4228b017bb2ad7d64cb1c0667831ec2341e6f759266ec834e40627c2affeace143c6d5e769b3acce63f889b3cbd1a9ca4768091840e8fce1d4750f86
doc/shakuhachi.libs/Skhclibs/Collection/Music/index.html
Module Collection.MusicSource
Operations on musics
val add :
t ->
SkhcDb.Database.t ->
?music_old:SkhcDb.MusicFile.t ->
compilation:bool ->
string ->
SkhcMetadata.Metadata.t ->
(SkhcDb.MusicFile.t, Sqlite3.Rc.t * string) resultadd collection database ?music_old ~compilation path metadata adds the song located at path with metadata to db. add reads metadata to create or find artists and albums. compilation indicates whether the song is part of a compilation album.
if music_old, add updates music_old.
see SkhcDb.MusicFile.insert for more explainations on music_old.
raise Unix.Unix_error if Unix.stat fails with path.
val remove :
t ->
SkhcDb.Database.t ->
SkhcDb.MusicFile.t ->
(unit, Sqlite3.Rc.t * string) resultremove collection database musicfile removes musicfile from the database. The file in the filesystem is untouched.
path collection music returns the full path of music.
val scrobble :
t ->
SkhcDb.Database.t ->
SkhcDb.MusicFile.t ->
(SkhcDb.MusicFile.t, Sqlite3.Rc.t * string) resultscrobble collection database music_file increases play_count by one, set played_at to Unix.time () and call SkhcDb.MusicFile.update
val set_rating :
t ->
SkhcDb.Database.t ->
SkhcDb.MusicFile.t ->
int option ->
(SkhcDb.MusicFile.t, Sqlite3.Rc.t * string) resultset_rating collection database music rating sets music rating to rating. if SkhcDb.MusicFile.rating music = rating, returns music as is. Otherwise, call SkhcDb.MusicFile.update.
val set_flag :
t ->
SkhcDb.Database.t ->
SkhcDb.MusicFile.t ->
(SkhcDb.MusicFile.t, Sqlite3.Rc.t * string) resultset_flag collection database music_file sets flag to true. if music_file has already flag set to true, this functions returns music_file as is. Otherwise, it calls SkhcDb.MusicFile.update.
val unset_flag :
t ->
SkhcDb.Database.t ->
SkhcDb.MusicFile.t ->
(SkhcDb.MusicFile.t, Sqlite3.Rc.t * string) resultunset_flag collection database music_file sets flag to false. if music_file has already flag set to false, this functions returns music_file as is. Otherwise, it calls SkhcDb.MusicFile.update.
audio collection music_file returns the content of the file pointed by music_file.
raise Sys_error if one of the underlying system calls fails.