From cbca762338c9e9dbb37996f5cf6286bfb5a93934 Mon Sep 17 00:00:00 2001 From: Manfred Touron <94029+moul@users.noreply.github.com> Date: Tue, 10 Nov 2020 21:27:02 +0100 Subject: [PATCH] feat: support multiple tags Signed-off-by: Manfred Touron <94029+moul@users.noreply.github.com> --- api/sgtm.proto | 11 +- gen.sum | 2 +- pkg/sgtm/page_home.tmpl.html | 2 +- pkg/sgtm/page_new.go | 17 +- pkg/sgtm/page_post.tmpl.html | 2 +- pkg/sgtm/page_profile.tmpl.html | 2 +- pkg/sgtm/processing_worker.go | 22 ++- pkg/sgtmpb/helpers.go | 11 ++ pkg/sgtmpb/sgtm.pb.go | 335 +++++++++++++++++--------------- 9 files changed, 222 insertions(+), 182 deletions(-) diff --git a/api/sgtm.proto b/api/sgtm.proto index a073da8..9ce6a24 100644 --- a/api/sgtm.proto +++ b/api/sgtm.proto @@ -152,7 +152,7 @@ message Post { /// track - string genre = 40; + string genre = 40 [deprecated = true]; // replaced by 'tags' uint64 duration = 41; string artwork_url = 42 [(go.field) = {name: 'ArtworkURL'}]; double bpm = 43 [(go.field) = {name: 'BPM'}]; @@ -163,6 +163,7 @@ message Post { int64 provider_created_at = 48; int64 provider_updated_at = 49; string provider_metadata = 50; + string tags = 51; // comma separated list of tags // soundcloud post string soundcloud_secret_token = 80 [(go.field) = {name: 'SoundCloudSecretToken'}]; @@ -171,10 +172,10 @@ message Post { // ipfs post string ipfs_cid = 90 [(go.field) = {name: 'IPFSCID'}]; - string mime_type = 51 [(go.field) = {name: 'MIMEType'}]; - int64 size_bytes = 52; - string file_extension = 53; - string attachment_filename = 54; + string mime_type = 91 [(go.field) = {name: 'MIMEType'}]; + int64 size_bytes = 92; + string file_extension = 93; + string attachment_filename = 94; /// tracking activities int64 target_user_id = 101 [(go.field) = {name: 'TargetUserID'}]; diff --git a/gen.sum b/gen.sum index 948b0f7..dd855e5 100644 --- a/gen.sum +++ b/gen.sum @@ -1,2 +1,2 @@ -873204724335abf75ed3c3b0751767b0a99f9ac5 ./api/sgtm.proto +25048065676ed51ac4b42c4d8d56ab1d7e0d9205 ./api/sgtm.proto 034f32b1cbdac6ec6e02c1244eed70c90c127adf Makefile diff --git a/pkg/sgtm/page_home.tmpl.html b/pkg/sgtm/page_home.tmpl.html index 4885a9c..de15997 100644 --- a/pkg/sgtm/page_home.tmpl.html +++ b/pkg/sgtm/page_home.tmpl.html @@ -62,7 +62,7 @@
{{.}}
{{end}} - {{with .Genre}}