Thank you for your donation!


Official moOde 7.0.0 subthread [Plugins] (e.g. UPNP)
#30
Here is the code block in playerlib.php. Maybe some debug lines need to be added in order to verify that in fact the line $current['coverurl'] = getUpnpCoverUrl(); is being executed.

Code:
        // Song file, UPnP URL or Podcast
        else {
            $current['artist'] = isset($song['Artist']) ? $song['Artist'] : 'Unknown artist';
            $current['title'] = isset($song['Title']) ? $song['Title'] : pathinfo(basename($song['file']), PATHINFO_FILENAME);
            $current['album'] = isset($song['Album']) ? $song['Album'] : 'Unknown album';
            $current['disc'] = isset($song['Disc']) ? $song['Disc'] : 'Disc tag missing';
            if (substr($song['file'], 0, 4) == 'http') {
                // Podcast
                if (isset($_SESSION[$song['file']])) {
                    $current['coverurl'] = LOGO_ROOT_DIR . $_SESSION[$song['file']]['name'] . ".jpg";
                    $current['artist'] = 'Radio station';
                    $current['album'] = $_SESSION[$song['file']]['name'];
                }
                // UPnP file
                else {
                    $current['coverurl'] = getUpnpCoverUrl();
                }
            }
            // Song file
            else {
                $current['coverurl'] = '/coverart.php/' . rawurlencode($song['file']);
            }
            // In case 2 url's are returned, use the first
            $current['coverurl'] = explode(',', $current['coverurl'])[0];

            if (substr($song['file'], 0, 4) == 'http') {
                //workerLog('enhanceMetadata(): UPnP url');
            }
            else {
                //workerLog('enhanceMetadata(): Song file');
            }
        }
Enjoy the Music!
moodeaudio.org | Twitter Feed | Git Repo
Reply


Messages In This Thread
RE: Official moOde 7.0.0 subthread [Plugins] (e.g. UPNP) - by Tim Curtis - 01-11-2021, 08:54 PM

Forum Jump: