JlSonic/JlSonic/JlSonic.jl

61 lines
1.5 KiB
Julia
Raw Normal View History

2019-05-17 20:22:01 +02:00
__precompile__()
module JlSonic
using Beets
using LightXML
import UUIDs
import HTTP
2019-05-19 22:24:18 +02:00
using JSON2
2020-01-22 18:42:29 +01:00
import Dates
2019-05-17 20:22:01 +02:00
2019-05-19 23:27:44 +02:00
# # 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
2019-05-17 20:22:01 +02:00
include("types.jl")
export Playlist, Album, Artist
2019-05-21 11:05:53 +02:00
const domain = "nixo.xyz"
const users = User[]
const user_playlists = Vector{Playlist}()
2020-01-22 18:42:29 +01:00
# 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}}()
2019-05-21 11:05:53 +02:00
2019-05-17 20:22:01 +02:00
include("api.jl")
export ping, getLicense,
# Browsing
2019-05-21 11:05:53 +02:00
getMusicFolders, # getIndexes,
2020-01-22 18:42:29 +01:00
getMusicDirectory, getShares, createShare, updateShare, deleteShare,
getGenres, getArtists, getArtist, getAlbum, getSong, getLyrics,
2019-05-17 20:22:01 +02:00
# Album/song list
getAlbumList, getAlbumList2, getRandomSongs,
getSongsByGenre, getNowPlaying, getStarred, getStarred2,
2020-01-22 18:42:29 +01:00
star, unstar, setRating,
2019-05-17 20:22:01 +02:00
# Searching
search3,
# Playlists
getPlaylists, getPlaylist, createPlaylist,
updatePlaylist, deletePlaylist,
2020-01-22 18:42:29 +01:00
savePlayQueue,
2019-05-17 20:22:01 +02:00
# Media retrieval
stream,
# download, hls, getCaptions,
getCoverArt, # getLyrics, getAvatar,
2020-01-22 18:42:29 +01:00
scrobble,
2019-05-17 20:22:01 +02:00
# User management
2020-01-22 18:42:29 +01:00
getUser, getUsers , createUser, updateUser, deleteUser, changePassword
2019-05-17 20:22:01 +02:00
include("errors.jl")
export auth_failed
include("beethelpers.jl")
include("beet2xml.jl")
2019-05-21 11:05:53 +02:00
include("login.jl")
2019-05-17 20:22:01 +02:00
end # module JlSonic