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

More descriptive /api/json response #577

Closed
im-trisha opened this issue Jun 17, 2024 · 5 comments · Fixed by #719
Closed

More descriptive /api/json response #577

im-trisha opened this issue Jun 17, 2024 · 5 comments · Fixed by #719
Labels
feature request New feature or request next major

Comments

@im-trisha
Copy link

im-trisha commented Jun 17, 2024

describe the feature you'd like to see

  1. I was thinkering with the api, and i had to do an ugly workaround to get the filename, while as far as I'm able to see it could simply be provided in the /api/json request?

  2. In the same way, while thinkering with the api, i found (somewhat) difficult to understand if the downloaded media is a video, or an audio file. Couldn't it be as easy as putting a boolean?

describe alternatives you've considered

  1. Obviously the alternative is to strip it from the content-disposition header got after the GET request to /api/stream
  2. I mean, the alternative i see is just getting the file extension and elaborate from that? I'm not sure though

I hope this is not a stupid request nor has it already been asked.
Many thanks!

@im-trisha im-trisha added the feature request New feature or request label Jun 17, 2024
@im-trisha im-trisha changed the title Get filename in /api/json More descriptive /api/json response Jun 17, 2024
@lostdusty
Copy link

I have asked cobalt devs, they told me to get the file name on the http request (you can http HEAD to get the file name without needing to download the media)

@lostdusty
Copy link

@wukko
Copy link
Member

wukko commented Jun 17, 2024

we could totally add the filename to stream response, i see how it can be useful

@im-trisha
Copy link
Author

@wukko and what about the api/json response? The endpoint are not as descriptive as they could get, so I'm not sure if its the correct endpoint, but I'd expect from this endpoint every info except the actual file.

And what about the file type?

@im-trisha
Copy link
Author

@lostdusty seems wonderful! I'll use exactly that for the time being :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request next major
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants