early database work
Signed-off-by: ari melody <ari@arimelody.me>
This commit is contained in:
parent
6efd47c6c6
commit
5eecef1d78
8 changed files with 512 additions and 96 deletions
|
@ -1,19 +1,47 @@
|
|||
package music
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
var ari = Artist{
|
||||
Name: "ari melody",
|
||||
Website: "https://arimelody.me",
|
||||
}
|
||||
var zaire = Artist{
|
||||
Name: "zaire",
|
||||
Website: "https://supitszaire.com",
|
||||
}
|
||||
var mae = Artist{
|
||||
Name: "mae taylor",
|
||||
Website: "https://mae.wtf",
|
||||
}
|
||||
var loudar = Artist{
|
||||
Name: "Loudar",
|
||||
Website: "https://alex.targoninc.com",
|
||||
}
|
||||
var red = Artist{
|
||||
Name: "smoljorb",
|
||||
}
|
||||
|
||||
func make_date_work(date string) time.Time {
|
||||
res, err := time.Parse("2-Jan-2006", date)
|
||||
if err != nil {
|
||||
fmt.Printf("somehow we failed to parse %s! falling back to epoch :]\n", date)
|
||||
return time.Unix(0, 0)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
var placeholders = []Album{
|
||||
{
|
||||
Id: "test",
|
||||
Title: "test album",
|
||||
Type: "album",
|
||||
Year: 2024,
|
||||
ReleaseDate: make_date_work("18-Mar-2024"),
|
||||
Buyname: "go get it!!",
|
||||
Buylink: "https://arimelody.me/",
|
||||
Artists: []string{
|
||||
"ari melody",
|
||||
"zaire",
|
||||
"mae taylor",
|
||||
"Loudar",
|
||||
},
|
||||
Links: []AlbumLink{
|
||||
AlbumLink{
|
||||
Name: "youtube",
|
||||
|
@ -23,23 +51,19 @@ var placeholders = []Album{
|
|||
Description: "she sample on my text 'til i 🚫🚫🚫",
|
||||
Credits: []AlbumCredit{
|
||||
AlbumCredit{
|
||||
Name: "ari melody",
|
||||
Url: "https://arimelody.me",
|
||||
Artist: &ari,
|
||||
Role: "having the swag",
|
||||
},
|
||||
AlbumCredit{
|
||||
Name: "zaire",
|
||||
Url: "https://supitszaire.com",
|
||||
Artist: &zaire,
|
||||
Role: "having the swag",
|
||||
},
|
||||
AlbumCredit{
|
||||
Name: "mae taylor",
|
||||
Url: "https://mae.wtf",
|
||||
Artist: &mae,
|
||||
Role: "having the swag",
|
||||
},
|
||||
AlbumCredit{
|
||||
Name: "Loudar",
|
||||
Url: "https://alex.targoninc.com",
|
||||
Artist: &loudar,
|
||||
Role: "having the swag",
|
||||
},
|
||||
},
|
||||
|
@ -122,21 +146,32 @@ var placeholders = []Album{
|
|||
Id: "free2play",
|
||||
Title: "free2play",
|
||||
Type: "upcoming",
|
||||
Year: 2024,
|
||||
ReleaseDate: make_date_work("17-Mar-2024"),
|
||||
Buyname: "pre-order",
|
||||
Buylink: "https://arimelody.me/",
|
||||
Artists: []string{ "ari melody" },
|
||||
Description: "hello from your local SPACEGIRL! 💫",
|
||||
Credits: []AlbumCredit{
|
||||
AlbumCredit{
|
||||
Artist: &ari,
|
||||
Role: "vocals",
|
||||
},
|
||||
AlbumCredit{
|
||||
Artist: &ari,
|
||||
Role: "production",
|
||||
},
|
||||
AlbumCredit{
|
||||
Artist: &ari,
|
||||
Role: "artwork",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Id: "dream",
|
||||
Title: "Dream",
|
||||
Type: "single",
|
||||
Year: 2022,
|
||||
Artists: []string{ "mellodoot" },
|
||||
ReleaseDate: make_date_work("11-Nov-2024"),
|
||||
Artwork: "https://mellodoot.com/img/music_artwork/mellodoot_-_Dream.webp",
|
||||
Buylink: "https://arimelody.bandcamp.com/track/dream",
|
||||
Free: false,
|
||||
Links: []AlbumLink{
|
||||
AlbumLink{
|
||||
Name: "spotify",
|
||||
|
@ -158,18 +193,15 @@ var placeholders = []Album{
|
|||
Description: "living the dream 🌌 ✨",
|
||||
Credits: []AlbumCredit{
|
||||
AlbumCredit{
|
||||
Name: "ari melody",
|
||||
Url: "https://arimelody.me",
|
||||
Artist: &ari,
|
||||
Role: "vocals",
|
||||
},
|
||||
AlbumCredit{
|
||||
Name: "ari melody",
|
||||
Url: "https://arimelody.me",
|
||||
Artist: &ari,
|
||||
Role: "production",
|
||||
},
|
||||
AlbumCredit{
|
||||
Name: "ari melody",
|
||||
Url: "https://arimelody.me",
|
||||
Artist: &ari,
|
||||
Role: "artwork",
|
||||
},
|
||||
},
|
||||
|
@ -205,8 +237,7 @@ var placeholders = []Album{
|
|||
Id: "gomyway",
|
||||
Title: "Go My Way",
|
||||
Type: "single",
|
||||
Year: 2021,
|
||||
Artists: []string{ "mellodoot" },
|
||||
ReleaseDate: make_date_work("24-Jan-2021"),
|
||||
Artwork: "https://mellodoot.com/img/music_artwork/mellodoot_-_Go_My_Way.webp",
|
||||
Buylink: "https://arimelody.bandcamp.com/track/go-my-way",
|
||||
Links: []AlbumLink{
|
||||
|
@ -228,13 +259,26 @@ var placeholders = []Album{
|
|||
},
|
||||
},
|
||||
Description: "hey! go my way! 💥 ✨",
|
||||
Credits: []AlbumCredit{
|
||||
AlbumCredit{
|
||||
Artist: &ari,
|
||||
Role: "vocals",
|
||||
},
|
||||
AlbumCredit{
|
||||
Artist: &ari,
|
||||
Role: "production",
|
||||
},
|
||||
AlbumCredit{
|
||||
Artist: &ari,
|
||||
Role: "artwork",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Id: "rowboat",
|
||||
Title: "Rowboat",
|
||||
Type: "single",
|
||||
Year: 2020,
|
||||
Artists: []string{ "mellodoot" },
|
||||
ReleaseDate: make_date_work("12-Mar-2020"),
|
||||
Artwork: "https://mellodoot.com/img/music_artwork/mellodoot_-_Rowboat.webp",
|
||||
Buylink: "https://arimelody.bandcamp.com/track/rowboat",
|
||||
Links: []AlbumLink{
|
||||
|
@ -256,13 +300,26 @@ var placeholders = []Album{
|
|||
},
|
||||
},
|
||||
Description: "let's take a trip. i've got a goddamn boat ⛵️",
|
||||
Credits: []AlbumCredit{
|
||||
AlbumCredit{
|
||||
Artist: &ari,
|
||||
Role: "vocals",
|
||||
},
|
||||
AlbumCredit{
|
||||
Artist: &ari,
|
||||
Role: "production",
|
||||
},
|
||||
AlbumCredit{
|
||||
Artist: &ari,
|
||||
Role: "artwork",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Id: "helloworld",
|
||||
Title: "Hello World",
|
||||
Type: "single",
|
||||
Year: 2019,
|
||||
Artists: []string{ "mellodoot" },
|
||||
ReleaseDate: make_date_work("25-Dec-2019"),
|
||||
Artwork: "https://mellodoot.com/img/music_artwork/mellodoot_-_Hello_World.webp",
|
||||
Buylink: "https://arimelody.bandcamp.com/track/hello-world",
|
||||
Links: []AlbumLink{
|
||||
|
@ -284,13 +341,26 @@ var placeholders = []Album{
|
|||
},
|
||||
},
|
||||
Description: "we'll dawn a new frontier! 👾",
|
||||
Credits: []AlbumCredit{
|
||||
AlbumCredit{
|
||||
Artist: &ari,
|
||||
Role: "vocals",
|
||||
},
|
||||
AlbumCredit{
|
||||
Artist: &ari,
|
||||
Role: "production",
|
||||
},
|
||||
AlbumCredit{
|
||||
Artist: &ari,
|
||||
Role: "artwork",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Id: "sine",
|
||||
Title: "Sine",
|
||||
Type: "single",
|
||||
Artists: []string{ "zaire", "mellodoot" },
|
||||
Year: 2019,
|
||||
ReleaseDate: make_date_work("07-Dec-2019"),
|
||||
Artwork: "https://mellodoot.com/img/music_artwork/zaire_-_Sine_ft._mellodoot.webp",
|
||||
Links: []AlbumLink{
|
||||
{
|
||||
|
@ -306,13 +376,22 @@ var placeholders = []Album{
|
|||
Url: "https://www.youtube.com/watch?v=z1H1s6VRnyY",
|
||||
},
|
||||
},
|
||||
Credits: []AlbumCredit{
|
||||
AlbumCredit{
|
||||
Artist: &zaire,
|
||||
Role: "production",
|
||||
},
|
||||
AlbumCredit{
|
||||
Artist: &ari,
|
||||
Role: "production",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Id: "10",
|
||||
Title: "10",
|
||||
Type: "single",
|
||||
Year: 2019,
|
||||
Artists: []string{ "mellodoot" },
|
||||
ReleaseDate: make_date_work("29-Sep-2019"),
|
||||
Artwork: "https://mellodoot.com/img/music_artwork/mellodoot_-_10.webp",
|
||||
Buylink: "https://arimelody.bandcamp.com/track/10",
|
||||
Links: []AlbumLink{
|
||||
|
@ -333,13 +412,22 @@ var placeholders = []Album{
|
|||
Url: "https://www.youtube.com/watch?v=C7WP5L2BK4U",
|
||||
},
|
||||
},
|
||||
Credits: []AlbumCredit{
|
||||
AlbumCredit{
|
||||
Artist: &ari,
|
||||
Role: "production",
|
||||
},
|
||||
AlbumCredit{
|
||||
Artist: &ari,
|
||||
Role: "artwork",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Id: "mad",
|
||||
Title: "MAD",
|
||||
Type: "single",
|
||||
Year: 2018,
|
||||
Artists: []string{ "mellodoot" },
|
||||
ReleaseDate: make_date_work("03-Nov-2018"),
|
||||
Artwork: "https://mellodoot.com/img/music_artwork/mellodoot_-_MAD.webp",
|
||||
Buylink: "https://arimelody.bandcamp.com/track/mad",
|
||||
Links: []AlbumLink{
|
||||
|
@ -360,13 +448,26 @@ var placeholders = []Album{
|
|||
Url: "https://www.youtube.com/watch?v=OB-Pk6p6mfQ",
|
||||
},
|
||||
},
|
||||
Credits: []AlbumCredit{
|
||||
AlbumCredit{
|
||||
Artist: &ari,
|
||||
Role: "vocals",
|
||||
},
|
||||
AlbumCredit{
|
||||
Artist: &ari,
|
||||
Role: "production",
|
||||
},
|
||||
AlbumCredit{
|
||||
Artist: &ari,
|
||||
Role: "artwork",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Id: "welcomingparty",
|
||||
Title: "Welcoming Party",
|
||||
Type: "album",
|
||||
Year: 2018,
|
||||
Artists: []string{ "mellodoot" },
|
||||
ReleaseDate: make_date_work("01-Nov-2018"),
|
||||
Artwork: "https://mellodoot.com/img/music_artwork/mellodoot_-_Welcoming_Party.webp",
|
||||
Buylink: "https://arimelody.bandcamp.com/album/welcoming-party",
|
||||
Links: []AlbumLink{
|
||||
|
@ -387,6 +488,16 @@ var placeholders = []Album{
|
|||
Url: "https://www.youtube.com/playlist?list=PLBG_QJeOHrB5EeniiXBIlHpoQbD6CUJca",
|
||||
},
|
||||
},
|
||||
Credits: []AlbumCredit{
|
||||
AlbumCredit{
|
||||
Artist: &ari,
|
||||
Role: "production",
|
||||
},
|
||||
AlbumCredit{
|
||||
Artist: &ari,
|
||||
Role: "artwork",
|
||||
},
|
||||
},
|
||||
// "tracks": [
|
||||
// {
|
||||
// "title": "Paradigm"
|
||||
|
@ -409,11 +520,10 @@ var placeholders = []Album{
|
|||
Id: "howtheyknow2018",
|
||||
Title: "How They Know (2018)",
|
||||
Type: "single",
|
||||
Year: 2018,
|
||||
Artists: []string{ "mellodoot" },
|
||||
ReleaseDate: make_date_work("27-Feb-2018"),
|
||||
Artwork: "https://mellodoot.com/img/music_artwork/mellodoot_-_How_They_Know_2018.webp",
|
||||
Buyname: "free download",
|
||||
Buylink: "https://arimelody.bandcamp.com/track/how-they-know-2018-remastered",
|
||||
Free: true,
|
||||
Links: []AlbumLink{
|
||||
{
|
||||
Name: "soundcloud",
|
||||
|
@ -424,16 +534,25 @@ var placeholders = []Album{
|
|||
Url: "https://www.youtube.com/watch?v=mbAgSwCzyMw",
|
||||
},
|
||||
},
|
||||
Credits: []AlbumCredit{
|
||||
AlbumCredit{
|
||||
Artist: &ari,
|
||||
Role: "production",
|
||||
},
|
||||
AlbumCredit{
|
||||
Artist: &red,
|
||||
Role: "artwork",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Id: "howtheyknow",
|
||||
Title: "How They Know",
|
||||
Type: "single",
|
||||
Year: 2017,
|
||||
Artists: []string{ "mellodoot" },
|
||||
ReleaseDate: make_date_work("29-Nov-2017"),
|
||||
Artwork: "https://mellodoot.com/img/music_artwork/mellodoot_-_How_They_Know.webp",
|
||||
Buyname: "free download",
|
||||
Buylink: "https://arimelody.bandcamp.com/track/how-they-know",
|
||||
Free: true,
|
||||
Links: []AlbumLink{
|
||||
{
|
||||
Name: "soundcloud",
|
||||
|
@ -444,16 +563,25 @@ var placeholders = []Album{
|
|||
Url: "https://www.youtube.com/watch?v=q6lzKuG1Emo",
|
||||
},
|
||||
},
|
||||
Credits: []AlbumCredit{
|
||||
AlbumCredit{
|
||||
Artist: &ari,
|
||||
Role: "production",
|
||||
},
|
||||
AlbumCredit{
|
||||
Artist: &red,
|
||||
Role: "artwork",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Id: "traveller",
|
||||
Title: "Traveller",
|
||||
Type: "single",
|
||||
Year: 2017,
|
||||
Artists: []string{ "mellodoot" },
|
||||
ReleaseDate: make_date_work("24-Sep-2017"),
|
||||
Artwork: "https://mellodoot.com/img/music_artwork/mellodoot_-_Traveller.webp",
|
||||
Buyname: "free download",
|
||||
Buylink: "https://arimelody.bandcamp.com/track/traveller",
|
||||
Free: true,
|
||||
Links: []AlbumLink{
|
||||
{
|
||||
Name: "soundcloud",
|
||||
|
@ -465,6 +593,16 @@ var placeholders = []Album{
|
|||
},
|
||||
},
|
||||
Description: "an 8-bit expedition! ⚔️🛡️",
|
||||
Credits: []AlbumCredit{
|
||||
AlbumCredit{
|
||||
Artist: &ari,
|
||||
Role: "production",
|
||||
},
|
||||
AlbumCredit{
|
||||
Artist: &ari,
|
||||
Role: "artwork",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -477,7 +615,11 @@ func GetAlbum(id string) (Album, bool) {
|
|||
return Album{}, false
|
||||
}
|
||||
|
||||
func QueryAll() ([]Album) {
|
||||
func QueryAllAlbums() ([]Album) {
|
||||
return placeholders
|
||||
}
|
||||
|
||||
func QueryAllArtists() ([]Artist) {
|
||||
return []Artist{ ari, zaire, mae, loudar, red }
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue