feat(subsonic)!: don't return gonic version from responses

This commit is contained in:
sentriz
2021-05-08 18:13:04 +01:00
committed by Senan Kelly
parent e9743f0cb0
commit 58624f07dc
24 changed files with 141 additions and 167 deletions

View File

@@ -18,7 +18,6 @@ type Response struct {
Version string `xml:"version,attr" json:"version"` Version string `xml:"version,attr" json:"version"`
XMLNS string `xml:"xmlns,attr" json:"-"` XMLNS string `xml:"xmlns,attr" json:"-"`
Type string `xml:"type,attr" json:"type"` Type string `xml:"type,attr" json:"type"`
GonicVersion string `xml:"gonicVersion,attr" json:"gonicVersion"`
Error *Error `xml:"error" json:"error,omitempty"` Error *Error `xml:"error" json:"error,omitempty"`
Albums *Albums `xml:"albumList" json:"albumList,omitempty"` Albums *Albums `xml:"albumList" json:"albumList,omitempty"`
AlbumsTwo *Albums `xml:"albumList2" json:"albumList2,omitempty"` AlbumsTwo *Albums `xml:"albumList2" json:"albumList2,omitempty"`
@@ -54,7 +53,6 @@ func NewResponse() *Response {
XMLNS: xmlns, XMLNS: xmlns,
Version: apiVersion, Version: apiVersion,
Type: gonic.Name, Type: gonic.Name,
GonicVersion: gonic.Version,
} }
} }
@@ -83,7 +81,6 @@ func NewError(code int, message string, a ...interface{}) *Response {
Message: fmt.Sprintf(message, a...), Message: fmt.Sprintf(message, a...),
}, },
Type: gonic.Name, Type: gonic.Name,
GonicVersion: gonic.Version,
} }
} }

View File

@@ -3,7 +3,6 @@
"status": "ok", "status": "ok",
"version": "1.15.0", "version": "1.15.0",
"type": "gonic", "type": "gonic",
"gonicVersion": "v0.12.3",
"albumList": { "albumList": {
"album": [ "album": [
{ {

View File

@@ -3,7 +3,6 @@
"status": "ok", "status": "ok",
"version": "1.15.0", "version": "1.15.0",
"type": "gonic", "type": "gonic",
"gonicVersion": "v0.12.3",
"albumList": { "albumList": {
"album": [ "album": [
{ {

View File

@@ -3,7 +3,6 @@
"status": "ok", "status": "ok",
"version": "1.15.0", "version": "1.15.0",
"type": "gonic", "type": "gonic",
"gonicVersion": "v0.12.3",
"albumList": { "albumList": {
"album": [ "album": [
{ {

View File

@@ -3,20 +3,32 @@
"status": "ok", "status": "ok",
"version": "1.15.0", "version": "1.15.0",
"type": "gonic", "type": "gonic",
"gonicVersion": "v0.12.3",
"albumList": { "albumList": {
"album": [ "album": [
{ {
"id": "al-8", "id": "al-16",
"coverArt": "al-8", "coverArt": "al-16",
"artist": "13th Floor Lowervators", "artist": "Swell Maps",
"title": "(1967) Easter Nowhere", "title": "(1980) Jane From Occupied Europe",
"album": "", "album": "",
"parent": "al-7", "parent": "al-15",
"isDir": true, "isDir": true,
"name": "", "name": "",
"songCount": 10, "songCount": 16,
"duration": 2609, "duration": 3040,
"created": "0001-01-01T00:00:00Z"
},
{
"id": "al-19",
"coverArt": "al-19",
"artist": "Ten Years After",
"title": "(1967) Ten Years After",
"album": "",
"parent": "al-18",
"isDir": true,
"name": "",
"songCount": 15,
"duration": 3812,
"created": "0001-01-01T00:00:00Z" "created": "0001-01-01T00:00:00Z"
}, },
{ {
@@ -33,16 +45,29 @@
"created": "0001-01-01T00:00:00Z" "created": "0001-01-01T00:00:00Z"
}, },
{ {
"id": "al-16", "id": "al-3",
"coverArt": "al-16", "coverArt": "al-3",
"artist": "Swell Maps", "artist": "Jah Wobble, The Edge, Holger Czukay",
"title": "(1980) Jane From Occupied Europe", "title": "(1983) Snake Charmer",
"album": "", "album": "",
"parent": "al-15", "parent": "al-2",
"isDir": true, "isDir": true,
"name": "", "name": "",
"songCount": 16, "songCount": 5,
"duration": 3040, "duration": 1871,
"created": "0001-01-01T00:00:00Z"
},
{
"id": "al-21",
"coverArt": "al-21",
"artist": "Captain Beefheart",
"title": "(1970) Lick My Decals Off, Bitch",
"album": "",
"parent": "al-20",
"isDir": true,
"name": "",
"songCount": 15,
"duration": 2324,
"created": "0001-01-01T00:00:00Z" "created": "0001-01-01T00:00:00Z"
}, },
{ {
@@ -58,6 +83,32 @@
"duration": 2738, "duration": 2738,
"created": "0001-01-01T00:00:00Z" "created": "0001-01-01T00:00:00Z"
}, },
{
"id": "al-8",
"coverArt": "al-8",
"artist": "13th Floor Lowervators",
"title": "(1967) Easter Nowhere",
"album": "",
"parent": "al-7",
"isDir": true,
"name": "",
"songCount": 10,
"duration": 2609,
"created": "0001-01-01T00:00:00Z"
},
{
"id": "al-9",
"coverArt": "al-9",
"artist": "13th Floor Lowervators",
"title": "(1966) The Psychedelic Sounds of the 13th Floor Elevators",
"album": "",
"parent": "al-7",
"isDir": true,
"name": "",
"songCount": 21,
"duration": 4222,
"created": "0001-01-01T00:00:00Z"
},
{ {
"id": "al-6", "id": "al-6",
"artist": "A Certain Ratio", "artist": "A Certain Ratio",
@@ -82,58 +133,6 @@
"songCount": 9, "songCount": 9,
"duration": 2169, "duration": 2169,
"created": "0001-01-01T00:00:00Z" "created": "0001-01-01T00:00:00Z"
},
{
"id": "al-9",
"coverArt": "al-9",
"artist": "13th Floor Lowervators",
"title": "(1966) The Psychedelic Sounds of the 13th Floor Elevators",
"album": "",
"parent": "al-7",
"isDir": true,
"name": "",
"songCount": 21,
"duration": 4222,
"created": "0001-01-01T00:00:00Z"
},
{
"id": "al-21",
"coverArt": "al-21",
"artist": "Captain Beefheart",
"title": "(1970) Lick My Decals Off, Bitch",
"album": "",
"parent": "al-20",
"isDir": true,
"name": "",
"songCount": 15,
"duration": 2324,
"created": "0001-01-01T00:00:00Z"
},
{
"id": "al-3",
"coverArt": "al-3",
"artist": "Jah Wobble, The Edge, Holger Czukay",
"title": "(1983) Snake Charmer",
"album": "",
"parent": "al-2",
"isDir": true,
"name": "",
"songCount": 5,
"duration": 1871,
"created": "0001-01-01T00:00:00Z"
},
{
"id": "al-19",
"coverArt": "al-19",
"artist": "Ten Years After",
"title": "(1967) Ten Years After",
"album": "",
"parent": "al-18",
"isDir": true,
"name": "",
"songCount": 15,
"duration": 3812,
"created": "0001-01-01T00:00:00Z"
} }
] ]
} }

View File

@@ -3,7 +3,6 @@
"status": "ok", "status": "ok",
"version": "1.15.0", "version": "1.15.0",
"type": "gonic", "type": "gonic",
"gonicVersion": "v0.12.3",
"albumList2": { "albumList2": {
"album": [ "album": [
{ {

View File

@@ -3,7 +3,6 @@
"status": "ok", "status": "ok",
"version": "1.15.0", "version": "1.15.0",
"type": "gonic", "type": "gonic",
"gonicVersion": "v0.12.3",
"albumList2": { "albumList2": {
"album": [ "album": [
{ {

View File

@@ -3,7 +3,6 @@
"status": "ok", "status": "ok",
"version": "1.15.0", "version": "1.15.0",
"type": "gonic", "type": "gonic",
"gonicVersion": "v0.12.3",
"albumList2": { "albumList2": {
"album": [ "album": [
{ {

View File

@@ -3,59 +3,33 @@
"status": "ok", "status": "ok",
"version": "1.15.0", "version": "1.15.0",
"type": "gonic", "type": "gonic",
"gonicVersion": "v0.12.3",
"albumList2": { "albumList2": {
"album": [ "album": [
{ {
"id": "al-19", "id": "al-17",
"coverArt": "al-19", "coverArt": "al-17",
"artistId": "ar-6", "artistId": "ar-5",
"artist": "Ten Years After", "artist": "Swell Maps",
"title": "", "title": "",
"album": "", "album": "",
"name": "Ten Years After", "name": "A Trip to Marineville",
"songCount": 15, "songCount": 18,
"duration": 3812, "duration": 3266,
"created": "2019-04-30T16:48:30+01:00", "created": "2019-04-30T16:48:48+01:00",
"year": 1967 "year": 1979
}, },
{ {
"id": "al-6", "id": "al-16",
"artistId": "ar-2", "coverArt": "al-16",
"artist": "A Certain Ratio", "artistId": "ar-5",
"artist": "Swell Maps",
"title": "", "title": "",
"album": "", "album": "",
"name": "To Each...", "name": "Jane From Occupied Europe",
"songCount": 9, "songCount": 16,
"duration": 2801, "duration": 3040,
"created": "2019-05-23T15:12:02.921473302+01:00", "created": "2019-04-30T16:48:48+01:00",
"year": 1981 "year": 1980
},
{
"id": "al-5",
"coverArt": "al-5",
"artistId": "ar-2",
"artist": "A Certain Ratio",
"title": "",
"album": "",
"name": "The Graveyard and the Ballroom",
"songCount": 14,
"duration": 2738,
"created": "2019-06-05T17:46:37.675917974+01:00",
"year": 1994
},
{
"id": "al-9",
"coverArt": "al-9",
"artistId": "ar-3",
"artist": "13th Floor Elevators",
"title": "",
"album": "",
"name": "The Psychedelic Sounds of the 13th Floor Elevators",
"songCount": 21,
"duration": 4222,
"created": "2019-06-13T12:57:24.306717554+01:00",
"year": 1966
}, },
{ {
"id": "al-21", "id": "al-21",
@@ -84,30 +58,55 @@
"year": 1967 "year": 1967
}, },
{ {
"id": "al-17", "id": "al-19",
"coverArt": "al-17", "coverArt": "al-19",
"artistId": "ar-5", "artistId": "ar-6",
"artist": "Swell Maps", "artist": "Ten Years After",
"title": "", "title": "",
"album": "", "album": "",
"name": "A Trip to Marineville", "name": "Ten Years After",
"songCount": 18, "songCount": 15,
"duration": 3266, "duration": 3812,
"created": "2019-04-30T16:48:48+01:00", "created": "2019-04-30T16:48:30+01:00",
"year": 1979 "year": 1967
}, },
{ {
"id": "al-16", "id": "al-6",
"coverArt": "al-16", "artistId": "ar-2",
"artistId": "ar-5", "artist": "A Certain Ratio",
"artist": "Swell Maps",
"title": "", "title": "",
"album": "", "album": "",
"name": "Jane From Occupied Europe", "name": "To Each...",
"songCount": 16, "songCount": 9,
"duration": 3040, "duration": 2801,
"created": "2019-04-30T16:48:48+01:00", "created": "2019-05-23T15:12:02.921473302+01:00",
"year": 1980 "year": 1981
},
{
"id": "al-9",
"coverArt": "al-9",
"artistId": "ar-3",
"artist": "13th Floor Elevators",
"title": "",
"album": "",
"name": "The Psychedelic Sounds of the 13th Floor Elevators",
"songCount": 21,
"duration": 4222,
"created": "2019-06-13T12:57:24.306717554+01:00",
"year": 1966
},
{
"id": "al-13",
"coverArt": "al-13",
"artistId": "ar-4",
"artist": "Anikas",
"title": "",
"album": "",
"name": "Anika",
"songCount": 9,
"duration": 2169,
"created": "2019-05-23T15:12:02.921473302+01:00",
"year": 2010
}, },
{ {
"id": "al-3", "id": "al-3",
@@ -123,17 +122,17 @@
"year": 1983 "year": 1983
}, },
{ {
"id": "al-13", "id": "al-5",
"coverArt": "al-13", "coverArt": "al-5",
"artistId": "ar-4", "artistId": "ar-2",
"artist": "Anikas", "artist": "A Certain Ratio",
"title": "", "title": "",
"album": "", "album": "",
"name": "Anika", "name": "The Graveyard and the Ballroom",
"songCount": 9, "songCount": 14,
"duration": 2169, "duration": 2738,
"created": "2019-05-23T15:12:02.921473302+01:00", "created": "2019-06-05T17:46:37.675917974+01:00",
"year": 2010 "year": 1994
} }
] ]
} }

View File

@@ -3,7 +3,6 @@
"status": "ok", "status": "ok",
"version": "1.15.0", "version": "1.15.0",
"type": "gonic", "type": "gonic",
"gonicVersion": "v0.12.3",
"album": { "album": {
"id": "al-3", "id": "al-3",
"coverArt": "al-3", "coverArt": "al-3",

View File

@@ -3,7 +3,6 @@
"status": "ok", "status": "ok",
"version": "1.15.0", "version": "1.15.0",
"type": "gonic", "type": "gonic",
"gonicVersion": "v0.12.3",
"album": { "album": {
"id": "al-2", "id": "al-2",
"title": "", "title": "",

View File

@@ -3,7 +3,6 @@
"status": "ok", "status": "ok",
"version": "1.15.0", "version": "1.15.0",
"type": "gonic", "type": "gonic",
"gonicVersion": "v0.12.3",
"artist": { "artist": {
"id": "ar-1", "id": "ar-1",
"name": "Jah Wobble, The Edge & Holger Czukay", "name": "Jah Wobble, The Edge & Holger Czukay",

View File

@@ -3,7 +3,6 @@
"status": "ok", "status": "ok",
"version": "1.15.0", "version": "1.15.0",
"type": "gonic", "type": "gonic",
"gonicVersion": "v0.12.3",
"artist": { "artist": {
"id": "ar-3", "id": "ar-3",
"name": "13th Floor Elevators", "name": "13th Floor Elevators",

View File

@@ -3,7 +3,6 @@
"status": "ok", "status": "ok",
"version": "1.15.0", "version": "1.15.0",
"type": "gonic", "type": "gonic",
"gonicVersion": "v0.12.3",
"artist": { "artist": {
"id": "ar-2", "id": "ar-2",
"name": "A Certain Ratio", "name": "A Certain Ratio",

View File

@@ -3,7 +3,6 @@
"status": "ok", "status": "ok",
"version": "1.15.0", "version": "1.15.0",
"type": "gonic", "type": "gonic",
"gonicVersion": "v0.12.3",
"artists": { "artists": {
"ignoredArticles": "", "ignoredArticles": "",
"index": [ "index": [

View File

@@ -3,7 +3,6 @@
"status": "ok", "status": "ok",
"version": "1.15.0", "version": "1.15.0",
"type": "gonic", "type": "gonic",
"gonicVersion": "v0.12.3",
"indexes": { "indexes": {
"lastModified": 0, "lastModified": 0,
"ignoredArticles": "", "ignoredArticles": "",

View File

@@ -3,7 +3,6 @@
"status": "ok", "status": "ok",
"version": "1.15.0", "version": "1.15.0",
"type": "gonic", "type": "gonic",
"gonicVersion": "v0.12.3",
"directory": { "directory": {
"id": "al-3", "id": "al-3",
"parent": "al-2", "parent": "al-2",

View File

@@ -3,7 +3,6 @@
"status": "ok", "status": "ok",
"version": "1.15.0", "version": "1.15.0",
"type": "gonic", "type": "gonic",
"gonicVersion": "v0.12.3",
"directory": { "directory": {
"id": "al-2", "id": "al-2",
"name": "Jah Wobble, The Edge, Holger Czukay", "name": "Jah Wobble, The Edge, Holger Czukay",

View File

@@ -3,7 +3,6 @@
"status": "ok", "status": "ok",
"version": "1.15.0", "version": "1.15.0",
"type": "gonic", "type": "gonic",
"gonicVersion": "v0.12.3",
"searchResult3": { "searchResult3": {
"artist": [ "artist": [
{ {

View File

@@ -3,7 +3,6 @@
"status": "ok", "status": "ok",
"version": "1.15.0", "version": "1.15.0",
"type": "gonic", "type": "gonic",
"gonicVersion": "v0.12.3",
"searchResult3": { "searchResult3": {
"artist": [ "artist": [
{ {

View File

@@ -3,7 +3,6 @@
"status": "ok", "status": "ok",
"version": "1.15.0", "version": "1.15.0",
"type": "gonic", "type": "gonic",
"gonicVersion": "v0.12.3",
"searchResult3": { "searchResult3": {
"artist": [ "artist": [
{ {

View File

@@ -3,7 +3,6 @@
"status": "ok", "status": "ok",
"version": "1.15.0", "version": "1.15.0",
"type": "gonic", "type": "gonic",
"gonicVersion": "v0.12.3",
"searchResult2": { "searchResult2": {
"artist": [ "artist": [
{ {

View File

@@ -3,7 +3,6 @@
"status": "ok", "status": "ok",
"version": "1.15.0", "version": "1.15.0",
"type": "gonic", "type": "gonic",
"gonicVersion": "v0.12.3",
"searchResult2": { "searchResult2": {
"artist": [ "artist": [
{ {

View File

@@ -3,7 +3,6 @@
"status": "ok", "status": "ok",
"version": "1.15.0", "version": "1.15.0",
"type": "gonic", "type": "gonic",
"gonicVersion": "v0.12.3",
"searchResult2": { "searchResult2": {
"artist": [ "artist": [
{ {