add cookies to youtube-dl
minor fixes
This commit is contained in:
parent
4a356e86da
commit
ef62242f42
4 changed files with 8 additions and 2 deletions
|
@ -66,7 +66,7 @@ videoClaimAddress2=$(mysql -u lbry -plbry -ss -D chainquery -h "127.0.0.1" -P 15
|
||||||
./supporty/supporty @BeamerTest "${videoClaimID1}" "${videoClaimAddress1}" lbrycrd_regtest 3.0
|
./supporty/supporty @BeamerTest "${videoClaimID1}" "${videoClaimAddress1}" lbrycrd_regtest 3.0
|
||||||
./supporty/supporty @BeamerTest "${videoClaimID2}" "${videoClaimAddress2}" lbrycrd_regtest 3.0
|
./supporty/supporty @BeamerTest "${videoClaimID2}" "${videoClaimAddress2}" lbrycrd_regtest 3.0
|
||||||
curl --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"generate","params":[1]}' -H 'content-type:text/plain;' --user lbry:lbry http://localhost:15200
|
curl --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"generate","params":[1]}' -H 'content-type:text/plain;' --user lbry:lbry http://localhost:15200
|
||||||
# Reset status for tranfer test
|
# Reset status for transfer test
|
||||||
mysql -u lbry -plbry -ss -D lbry -h "127.0.0.1" -P 15500 -e "UPDATE youtube_data SET status = 'queued' WHERE id = 1"
|
mysql -u lbry -plbry -ss -D lbry -h "127.0.0.1" -P 15500 -e "UPDATE youtube_data SET status = 'queued' WHERE id = 1"
|
||||||
# Trigger transfer api
|
# Trigger transfer api
|
||||||
curl -i -H 'Accept: application/json' -H 'Content-Type: application/json' 'http://localhost:15400/yt/transfer?auth_token=youtubertoken&address=n4eYeXAYmHo4YRUDEfsEhucy8y5LKRMcHg&public_key=tpubDA9GDAntyJu4hD3wU7175p7CuV6DWbYXfyb2HedBA3yuBp9HZ4n3QE4Ex6RHCSiEuVp2nKAL1Lzf2ZLo9ApaFgNaJjG6Xo1wB3iEeVbrDZp'
|
curl -i -H 'Accept: application/json' -H 'Content-Type: application/json' 'http://localhost:15400/yt/transfer?auth_token=youtubertoken&address=n4eYeXAYmHo4YRUDEfsEhucy8y5LKRMcHg&public_key=tpubDA9GDAntyJu4hD3wU7175p7CuV6DWbYXfyb2HedBA3yuBp9HZ4n3QE4Ex6RHCSiEuVp2nKAL1Lzf2ZLo9ApaFgNaJjG6Xo1wB3iEeVbrDZp'
|
||||||
|
|
|
@ -125,6 +125,9 @@ func (i *IPPool) ReleaseAll() {
|
||||||
i.lock.Lock()
|
i.lock.Lock()
|
||||||
defer i.lock.Unlock()
|
defer i.lock.Unlock()
|
||||||
for j, _ := range i.ips {
|
for j, _ := range i.ips {
|
||||||
|
if i.ips[j].Throttled {
|
||||||
|
continue
|
||||||
|
}
|
||||||
localIP := &i.ips[j]
|
localIP := &i.ips[j]
|
||||||
localIP.InUse = false
|
localIP.InUse = false
|
||||||
localIP.LastUse = time.Now()
|
localIP.LastUse = time.Now()
|
||||||
|
|
|
@ -149,7 +149,6 @@ func (s *SyncManager) Start() error {
|
||||||
shouldInterruptLoop = true
|
shouldInterruptLoop = true
|
||||||
} else {
|
} else {
|
||||||
var queuesToSync []string
|
var queuesToSync []string
|
||||||
//TODO: implement scrambling to avoid starvation of queues
|
|
||||||
if s.syncStatus != "" {
|
if s.syncStatus != "" {
|
||||||
queuesToSync = append(queuesToSync, s.syncStatus)
|
queuesToSync = append(queuesToSync, s.syncStatus)
|
||||||
} else if s.SyncFlags.SyncUpdate {
|
} else if s.SyncFlags.SyncUpdate {
|
||||||
|
|
|
@ -209,6 +209,10 @@ func (v *YoutubeVideo) download() error {
|
||||||
"--abort-on-unavailable-fragment",
|
"--abort-on-unavailable-fragment",
|
||||||
"--fragment-retries",
|
"--fragment-retries",
|
||||||
"0",
|
"0",
|
||||||
|
"--user-agent",
|
||||||
|
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36",
|
||||||
|
"--cookies",
|
||||||
|
"cookies.txt",
|
||||||
}
|
}
|
||||||
if v.maxVideoSize > 0 {
|
if v.maxVideoSize > 0 {
|
||||||
ytdlArgs = append(ytdlArgs,
|
ytdlArgs = append(ytdlArgs,
|
||||||
|
|
Loading…
Reference in a new issue