42 lines
908 B
Julia
42 lines
908 B
Julia
|
mutable struct Playlist
|
||
|
uuid::String
|
||
|
name::String
|
||
|
comment::String
|
||
|
owner::String
|
||
|
public::Bool
|
||
|
songs::Vector{Song}
|
||
|
cover::String
|
||
|
end
|
||
|
|
||
|
mutable struct User
|
||
|
name::String
|
||
|
email::String
|
||
|
# scrobbling::Bool
|
||
|
admin::Bool
|
||
|
settings::Bool
|
||
|
download::Bool
|
||
|
upload::Bool
|
||
|
cover::Bool
|
||
|
playlist::Bool
|
||
|
comment::Bool
|
||
|
# podcast::Bool
|
||
|
stream::Bool
|
||
|
# jukebox::Bool
|
||
|
share::Bool
|
||
|
end
|
||
|
|
||
|
function Playlist(owner::String
|
||
|
; uuid = string(UUIDs.uuid4()),
|
||
|
name = "New Playlist",
|
||
|
comment = "",
|
||
|
public = false,
|
||
|
songs = Song[],
|
||
|
cover = "",)
|
||
|
Playlist(uuid, name, comment, owner, public, songs, cover)
|
||
|
end
|
||
|
|
||
|
function User(name::String)
|
||
|
User(name, string(name, "@", domain),
|
||
|
false, false, false, false, false, false, false, false, false)
|
||
|
end
|