Git Product home page Git Product logo

datmusic-api's Introduction

datmusic-api

Endpoints

Search

  • Audio search - https://example.com/search?q={query}&page={page}
  • Artists search - https://example.com/search/artists?q={query}
  • Albums search - https://example.com/search/albums?q={query}
    • Querying artist name will return artist's all albums

Multisearch

Search multiple backends at once

  • Available types: audios, artists, albums (defaults to only audios)
  • https://example.com/multisearch?q={query}&page={page}&types[]=audios&types[]=artists

Artists

  • Get audios by artist - https://example.com/artists/{artist_id}
  • Get albums by artist - https://example.com/artists/{artist_id}/albums

Albums

This endpoint will require extra parameters returned by albums search, owner_id and access_key.

Get audios by album - https://example.com/albums/{album_id}

Downloads & Streams

  • Download (Artist - Title.mp3) - https://example.com/dl/{search_hash}/{audio_hash}
  • Stream - https://example.com/stream/{search_hash}/{audio_hash}

License

Copyright (C) 2022  Alashov Berkeli

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

datmusic-api's People

Contributors

alashow avatar kekenec avatar stylecibot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

datmusic-api's Issues

Page error

How do I make the installation on my server?

Hashing by user id instead hashing by search

Is it possible? Every audio on VK has song id and user id (user that has this audio in the playlist), so it is more comfortable to get audio, if you need to get specific audio or audio of specific user.

basic_auth

hello.

can you tel me how to get to work basic_auth functionality?

i've enabled it, wrote user:pass but when i'm sending request it doesn't ask for user:pass.

thanks.

NotFoundHttpException for dl and stream links

All links works fine except the only one song(I have found just one at this moment) -"download":"http://api.example.com/dl/ec9b56dc/d4064947","stream":"http://api.example.com/stream/ec9b56dc/d4064947". It gives NotFoundHttpException, why? And it's so wierd, because all other links are availible.

configuration

Could you please tell me what i have to configure in order to use datmusic-api?

API authentication.

Hi, I'm getting 403, how can I fix that?
and, where is api login and api password at VK.com developers website?

How to use it?

I have deplyed datmusic api, and there is no errors, but it still gives 404, what I have to do after deploying?
Btw, is it okay to use ip of server like domen url in deploying?

How does the converting of mp3 bitrate?

It is necessary to install some package or an application on my server so I can be successful with the conversion?

Thank you in advance! And congratulations for this brilliant work.

Amazon Cloud Drive upload

Hello, could you add the function to upload to Amazon Cloud Drive? I think it would be really interesting! Thank you.

No title and artist in json

Some songs give in json this artist":"\u0414\u0440\u044d","title":"\u0439\u043a" instead of song title and artist. All Russian symbols can't be decoded

Call to undefined method ErrorException::getStatusCode()

I'm not sure how to get past this error:
Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method ErrorException::getStatusCode()

$ php -S localhost:8000 -t public
PHP 7.1.2 Development Server started at Sat Mar 4 10:32:04 2017
Listening on http://localhost:8000
Document root is C:\Users\Paul\Desktop\datmusic-api-master\public
Press Ctrl-C to quit.
[Sat Mar 4 10:32:08 2017] PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method ErrorException::getStatusCod
e() in C:\Users\Paul\Desktop\datmusic-api-master\storage\framework\views\fde922e6cc3ccf07661bc930efe5322e7b6d3f8d.php:3
Stack trace:
#0 C:\Users\Paul\Desktop\datmusic-api-master\vendor\illuminate\view\Engines\PhpEngine.php(42): include()
#1 C:\Users\Paul\Desktop\datmusic-api-master\vendor\illuminate\view\Engines\CompilerEngine.php(59): Illuminate\View\Engines\PhpEngine->evaluatePath('C:\Users\Pa
ul\D...', Array)
#2 C:\Users\Paul\Desktop\datmusic-api-master\vendor\illuminate\view\View.php(137): Illuminate\View\Engines\CompilerEngine->get('C:\Users\Paul\D...', Array)
#3 C:\Users\Paul\Desktop\datmusic-api-master\vendor\illuminate\view\View.php(120): Illuminate\View\View->getContents()
#4 C:\Users\Paul\Desktop\datmusic-api-master\vendor\illuminate\view\View.php(85): Illuminate\View\View->renderContents()
#5 C:\Users\Paul\Desktop\datmusic-api-master\storage\framework\views\af84f4e88b546a33b44bc in C:\Users\Paul\Desktop\datmusic-api-master\storage\framework\views\fd
e922e6cc3ccf07661bc930efe5322e7b6d3f8d.php on line 3
[Sat Mar 4 10:32:08 2017] ::1:49946 [500]: / - Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method ErrorException::getStatus
Code() in C:\Users\Paul\Desktop\datmusic-api-master\storage\framework\views\fde922e6cc3ccf07661bc930efe5322e7b6d3f8d.php:3
Stack trace:
#0 C:\Users\Paul\Desktop\datmusic-api-master\vendor\illuminate\view\Engines\PhpEngine.php(42): include()
#1 C:\Users\Paul\Desktop\datmusic-api-master\vendor\illuminate\view\Engines\CompilerEngine.php(59): Illuminate\View\Engines\PhpEngine->evaluatePath('C:\Users\Pa
ul\D...', Array)
#2 C:\Users\Paul\Desktop\datmusic-api-master\vendor\illuminate\view\View.php(137): Illuminate\View\Engines\CompilerEngine->get('C:\Users\Paul\D...', Array)
#3 C:\Users\Paul\Desktop\datmusic-api-master\vendor\illuminate\view\View.php(120): Illuminate\View\View->getContents()
#4 C:\Users\Paul\Desktop\datmusic-api-master\vendor\illuminate\view\View.php(85): Illuminate\View\View->renderContents()
#5 C:\Users\Paul\Desktop\datmusic-api-master\storage\framework\views\af84f4e88b546a33b44bc in C:\Users\Paul\Desktop\datmusic-api-master\storage\framework\views\fd
e922e6cc3ccf07661bc930efe5322e7b6d3f8d.php on line 3
[Sat Mar 4 10:32:08 2017] PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Symfony\Component\Debug\Exce
ption\FatalErrorException::getStatusCode() in C:\Users\Paul\Desktop\datmusic-api-master\storage\framework\views\fde922e6cc3ccf07661bc930efe5322e7b6d3f8d.php:3
Stack trace:
#0 C:\Users\Paul\Desktop\datmusic-api-master\vendor\illuminate\view\Engines\PhpEngine.php(42): include()
#1 C:\Users\Paul\Desktop\datmusic-api-master\vendor\illuminate\view\Engines\CompilerEngine.php(59): Illuminate\View\Engines\PhpEngine->evaluatePath('C:\Users\Pa
ul\D...', Array)
#2 C:\Users\Paul\Desktop\datmusic-api-master\vendor\illuminate\view\View.php(137): Illuminate\View\Engines\CompilerEngine->get('C:\Users\Paul\D...', Array)
#3 C:\Users\Paul\Desktop\datmusic-api-master\vendor\illuminate\view\View.php(120): Illuminate\View\View->getContents()
#4 C:\Users\Paul\Desktop\datmusic-api-master\vendor\illuminate\view\View.php(85): Illuminate\View\View->renderContents()
#5 C:\Users\Paul\Desktop\datmusic-api-master\storag in C:\Users\Paul\Desktop\datmusic-api-master\storage\framework\views\fde922e6cc3ccf07661bc930efe5322e7b6d3f8d.
php on line 3

NotFoundHttpException

I was having errors where datmusic-api was only serving several kb files instead of the actual mp3s and so I decided to run the update script. After re-adjusting my CORS preferences (this should persist across updates or be in the .env btw) and trying the api again, I get redirected to the following page below when I try to download any songs that the api finds. Do you have any idea what the problem may be?

screen shot 2017-08-07 at 4 32 41 pm

Search results

After VK's redesign of their music section, searching music from VK returns weird results, especially when you search with artist name only. For ex: searching "Eminem".
It looks like VK is filtering out some songs for each page.

So, when users search by artist title only, they won't get many results (2 pages, by default). But when they look for the specific song, they will probably find it.

As a "solution", you could increase pageMultiplier to higher value, like 5 or 6. So it will return more results.
Or you could increase pageMultiplier only when the query is one or two words (or whatever makes you think it's an artist name).

Ordering Search Results

Good night, how long... lol
I am with a doubt, does it have as I order to show the official songs first and then show these "Karaoke Pro"?
captura de tela 2017-10-18 as 00 29 53

How long link is available?

Do you know if I have send a search request and revised a json, so how long the links like /dl/a7a4d053/fcc77122 is it relevant? around one day?

Because I'm thinking is it is possible to make playlist?

mp3 url from cache to json

hello.

is it posible to get decodedmp3 url from cache to the json result? or i should movedecoderto parsr?

thanks.

Script execution

Hi, my name is Vlad. My problem execution time script. There is a problem in executing the script, it takes a lot of time to execute, here's an example.
12358

Download.Fail

My log:
August 25, 2017, 4:58 pm, Wisin 0,
Download.Fail, August 25, 2017, 4:58 pm, 6,
Why?

Cache clear.

Hello, is there way to clear cached mp3s, for example for X days. It would be a great option.

Meta tags

Is it possible to write or rewrite meta tags of mp3?

ErrorException in VkMp3Decoder.php

Searching for certain tracks produces this error:
screen shot 2017-05-18 at 10 34 27 am
In this case the song was: "Rasmus Faber feat Clara Mendes - Demanda (Miguel Migs Remix)"

unavailable.mp3

Error in show bytes resuts

Hello, I am having a problem with the page of "bytes". The page you're returning the error "404", as shown in the screenshot.
screenshot_2017-05-12-23-21-37

ITunes API

Hi, here I am again (lol).
Could you explain to me how do I integrate the iTunes API in research?
Because I would like to get the data that was returned by iTunes (https://itunes.apple.com/search?term=) and add in myapi.com/search ...

I tried adding changing the file "HttpClient.php", but not got success, only an error (400 = Bad Request). Thank you, I love your work you are to be congratulated!
captura de tela 2017-02-16 as 03 35 25

Please, help me

API installed on my server, but it's not working ... What can be? Everything is set up correctly.

Thank you!

captura de tela 2017-02-02 as 20 52 40

different search results

Hi, how it's possible when I try to search audios I get a completely different result in response?
Foe example, when i do something like this: http://mysite.xyz/search?q=linkin , i get result:

{"status":"ok","data":[{"artist":"Linkin Park and Kiiara","title":"Heavy (feat. Kiiara)","duration":169,"download":"http://mysite.xyz/dl/8600f8de/88c7a71d","stream":"http://mysite.xyz/stream/8600f8de/88c7a71d"},{"artist":"Charly Beck","title":"Burn It Down (feat. Linkin Park)","duration":193,"download":"http://mysite.xyz/dl/8600f8de/539820a8","stream":"http://mysite.xyz/stream/8600f8de/539820a8"},{"artist":"Instrumental All Stars","title":"Breaking the Habit (Originally Perfomed By Linkin Park)","duration":195,"download":"http://mysite.xyz/dl/8600f8de/ac0066a3","stream":"http://mysite.xyz/stream/8600f8de/ac0066a3"},{"artist":"Anne-Caroline Joy","title":"Heavy (Linkin Park Tribute)","duration":165,"download":"http://mysite.xyz/dl/8600f8de/54807b36","stream":"http://mysite.xyz/stream/8600f8de/54807b36"},{"artist":"Karaoke Jam Band","title":"Papercut (Karaoke Version) [Originally Performed by Linkin Park]","duration":186,"download":"http://mysite.xyz/dl/8600f8de/d912f2aa","stream":"http://mysite.xyz/stream/8600f8de/d912f2aa"}]}

But if i use https://datmusic.xyz/?q=linkin the result much better.

What do you think ?
Thanks!

How to change /etc/nginx/sites-available/default

How to change /etc/nginx/sites-available/default if I already have there SSL Settings and I can't remove all inside the default.
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name api.example.com api.example.com;
return 301 https://$server_name$request_uri;
}

server {

# SSL configuration

listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
include snippets/ssl-api.example.com.conf;
include snippets/ssl-params.conf;

OS and configuration

What OS on server should be? And which one server technology (KVM XEN OpenVZ)? Or it doesn't matter?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.