etiaro / LocalRadio

System for Audio managing in local envoirment
2 stars 0 forks source link

Playlist overwriting #4

Closed PangolinGiLA closed 3 years ago

PangolinGiLA commented 3 years ago

You can overwrite playlist by sending post reqest directly to api, not by frontend.

Example: run this code replacing ytid and date with some valid data

import requests
import json
a = "http://158.75.60.75/api/player/playlist/"
x = requests.post(a, headers = {'Content-Type': 'application/json'}, data=json.dumps({'entry': {'ytid':'valid_ytid', 'date':'valid_date_no_quotes'}}))
PangolinGiLA commented 3 years ago

Fixed by commit 7b5bc245afd9c072845447260b547ab1d15d2871