Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend gettagindex api #190

Closed
henryk86 opened this issue Jun 23, 2024 · 5 comments
Closed

Extend gettagindex api #190

henryk86 opened this issue Jun 23, 2024 · 5 comments

Comments

@henryk86
Copy link
Collaborator

As necessary adaptions of current implementation to support the feature request:

toniebox-reverse-engineering/teddycloud_web#80


This also needs some backend modifications. Currently only one of them is attached to the uid, this must be extended to a second one (like adding a child tag with the src one and same structure). To be checked how this will work with Original ones, but I assume both will be equal.

or overwork it a little that there are multiple images available (model one for cover and a second image for src). All other stuff like tonieinfo should be fetched from source if available (and filled from model if not set on src level)

@henryk86
Copy link
Collaborator Author

henryk86 commented Jun 23, 2024

it could be like this:

{
  "ruid": [tag.ruid (unchanged)],
  "uid": [tag.uid (unchanged)],
  "type": [tag.tag (unchanged)],
  "valid": true,
  "exists": true,
  "live": false,
  "nocloud": false,
  "hasCloudAuth": true,
  "hide": false,
  "claimed": true,
  "source": "lib://by/audioID/1655213844.taf",
  "audioUrl": "/content/download/XXXXXXX/500304E0?overlay=XXXXXXXX&skip_header=true",
  "tagPicture": [new! pic from model assignment]
  "tonieInfo": {
    "tracks": [ 
         [tracks from src or if nothing in src then from model]
    ],
    "model": [from model assignement],
    "series": [series from src or if nothing in src then from model],
    "episode":  [episode from src or if nothing in src then from model],
    "picture":  [pic from src or if nothing in src then from model],
    "language":  [language from src or if nothing in src then from model]
  }
}

so actually only 1 new element (tagPicture), all other information unchanged or changed to be fetched primarily from the src.

@henryk86
Copy link
Collaborator Author

henryk86 commented Jun 27, 2024

or to have both, add a new section sourceInfo with the same element as the tonieinfo. maybe thats the most easiest approach, so in frontend can be decided what should be shown:

{
  "ruid": [tag.ruid (unchanged)],
  "uid": [tag.uid (unchanged)],
  "type": [tag.tag (unchanged)],
  "valid": true,
  "exists": true,
  "live": false,
  "nocloud": false,
  "hasCloudAuth": true,
  "hide": false,
  "claimed": true,
  "source": "lib://by/audioID/1655213844.taf",
  "audioUrl": "/content/download/XXXXXXX/500304E0?overlay=XXXXXXXXX&skip_header=true",
  "tonieInfo": {
    "tracks": [ 
         [tracks from model, no change to now]
    ],
    "model": [from model assignement, no change to now],
    "series": [series from model, no change to now],
    "episode":  [episode from model, no change to now],
    "picture":  [pic from model, no change to now],
    "language":  [language from mode, no change to nowl]
  },
 "sourceInfo": {
    "tracks": [ 
         [tracks from src ]
    ],
    "model": [empty or remove this tag],
    "series": [series from src],
    "episode":  [episode from src],
    "picture":  [pic from src],
    "language":  [language from src]
  }
}

this approach is currently used in toniebox-reverse-engineering/teddycloud_web#80

@henryk86
Copy link
Collaborator Author

The getTagInfo API should be adapted in the same way.

@henryk86
Copy link
Collaborator Author

#188

This should be considered here also.

@henryk86
Copy link
Collaborator Author

henryk86 commented Oct 6, 2024

All requested features implemented now already

@henryk86 henryk86 closed this as completed Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant