ArturSierzant / OMPD

O!MPD is free, opensource MPD client based on PHP and mySQL.
http://ompd.pl
GNU General Public License v3.0
40 stars 13 forks source link

Youtube don't work again #119

Closed marcbth closed 4 years ago

marcbth commented 4 years ago

Hello Artur,

unfortunately youtube is not working again.

get only one rotary wheel in the search.

we had unfortunately already once.

send you my GitHub connection by private mail

cliff

marcbth commented 4 years ago

when I try

test.php

<?php require_once('include/initialize.inc.php'); require_once('include/library.inc.php'); global $cfg, $db; @ini_set('display_errors', 'On'); echo getYoutubeStreamUrl('TvnYmWpD_T8',''); ?>

then

https://r4---sn-8xgn5uxa-i5he.googlevideo.com/videoplayback?expire=1581125692&ei=3Ls9XqrpDJam8gOZ5ITQDA&ip=89.245.204.170&id=o-APimq8dV41SXSdTm9-pqNGV3pMihOpmUUKCUDD9jDwz0&itag=140&source=youtube&requiressl=yes&mm=31%2C29&mn=sn-8xgn5uxa-i5he%2Csn-i5h7lner&ms=au%2Crdu&mv=m&mvi=3&pl=20&initcwndbps=1035000&vprv=1&mime=audio%2Fmp4&gir=yes&clen=7723968&dur=477.216&lmt=1580554677761232&mt=1581103970&fvip=4&keepalive=yes&fexp=23842630&c=WEB&txp=5431432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHylml4wRQIhAITKVLzgvtjqKD1YcfbDjVK7jHU1uC4KYA6Qz8Quvgo9AiAwmv0YgDgQ2LVzZtrgVXt-t_hTjHyQHCEd6dxpsWS5Pg%3D%3D&sig=ALgxI2wwRgIhAL3iL-1vpQ75wCT-E3no_CDWp80uSEPEXqcAzURZHOoYAiEArjZHDYysd3XXJTF874hwvkUzK94aeyMB2H84SFQzxlk=&ratebypass=yes

ArturSierzant commented 4 years ago

I tried it also on my Win system with PHP 7.4.1 and everything works OK. So let's try to find out, why it's not working for you.

  1. Since your test.php gives you right url, youtube-dl is up to date. But, to be 100% sure, please try to check what version you have (I use 2020.01.24 - it seems to be the latest version).

  2. In latest commit (a74190c) I changed a little bit error handling for YT - now, in case of error, cog should turn into exclamation sign - there still will be no info about where error comes from, but at least you will know that procedure is done and something went wrong.

  3. Function getYouTubeMPDUrl($url, $title = ''), that had made problems before, was changed again - maybe these changes are the source of your problems. Try to change it to previous version: replace

    preg_match_all('!\d+!', $f, $matches_f);
    $format = array_search($matches_f[0], array_column($js['formats'], 'format_id'));

    with

    $format = array_search($f, array_column($js['formats'], 'format'));

    PS Where exactly did you send your GitHub connection? I can't find it anywhere...

Regards, Artur

marcbth commented 4 years ago

I write now a private email :-)

marcbth commented 4 years ago

Hi Artur

its work again!!!

Perfect!!!

you want to take a look at my fork?

changed the skin and added this for me:

power off /reboot play cd /eject cd filemanager server settings

ArturSierzant commented 4 years ago

Glad to hear that :) Did you have to change anything to make it work? I cloned webinterface but don't know how to configure this. When I run [my_server_IP]/webinterface I get:

Execute ./git.bash --get-branch
Result of ./git.bash --get-branch

release

Execute ./git.bash --get-commit
Result of ./git.bash --get-commit

c0d84d4a3682b19f9f63939ec52197aa1b92f02e

Execute ./git.bash --get-tag
Result of ./git.bash --get-tag

v1.0.0

Execute ./git.bash --get-tag
Result of ./git.bash --get-tag

v1.0.0

Execute ./git.bash --get-remote-tags
Result of ./git.bash --get-remote-tags

v1.0.0;v1.0.1;v1.0.2;v1.0.3;v1.0.4;v1.0.5;v1.0.6;v1.0.7;v1.0.8;v1.0.9;v1.0.9.1

Soul -M
Einstellungen
Netzwerkeinstellungen
NAS Anbindung
CD-Ripping
Qobuz
Tidal
System
upmpd_highresaudio
Module cant display while config does not exists

What am I doing wrong?

marcbth commented 4 years ago

function getYouTubeStreamUrl($url, $title = ''){

is running