JlSonic/JlSonic/JlSonic.jl

61 lines
1.5 KiB
Julia

__precompile__()
module JlSonic
using Beets
using LightXML
import UUIDs
import HTTP
using JSON2
import Dates
# # Playlist cover art support
# The idea is to sum all the album arts in some way. But it's easier to get one random
# using FileIO, Images
include("types.jl")
export Playlist, Album, Artist
const domain = "nixo.xyz"
const users = User[]
const user_playlists = Vector{Playlist}()
# user => share
const shared = Vector{Share}()
# map username => (starred element, starred date)
user_stars = Dict{String,Vector{Star}}()
user_ratings = Dict{String, Vector{Rating}}()
user_playqueue = Dict{String, Vector{String}}()
include("api.jl")
export ping, getLicense,
# Browsing
getMusicFolders, # getIndexes,
getMusicDirectory, getShares, createShare, updateShare, deleteShare,
getGenres, getArtists, getArtist, getAlbum, getSong, getLyrics,
# Album/song list
getAlbumList, getAlbumList2, getRandomSongs,
getSongsByGenre, getNowPlaying, getStarred, getStarred2,
star, unstar, setRating,
# Searching
search3,
# Playlists
getPlaylists, getPlaylist, createPlaylist,
updatePlaylist, deletePlaylist,
savePlayQueue,
# Media retrieval
stream,
# download, hls, getCaptions,
getCoverArt, # getLyrics, getAvatar,
scrobble,
# User management
getUser, getUsers , createUser, updateUser, deleteUser, changePassword
include("errors.jl")
export auth_failed
include("beethelpers.jl")
include("beet2xml.jl")
include("login.jl")
end # module JlSonic