• Welcome to RadioDJ - Free Radio Automation Software Forum. Please log in or sign up.

Problem with the image file spaces

Started by pinorgm, January 03, 2018, 07:06:28 PM

pinorgm

Hi Marius,
First of all, thank you for everything you do.
I noticed that with the version 2.0 of radiodj the image files are saved with the spaces and named with artist and title, while in the previous versions the image files were saved without spaces and named with artist and album. The software 2.0 displays the covers perfectly but the spaces do not allow me to view the covers on page.php
Is there a solution that I can take on php page for the inconvenience?
Thanks in advance!!!

Jhonny

Where can i find the page.php file.

Or show the code from the file.
Currently on
RDJ V 2.0.4.8
MariaDB V 10.6.21
WIN 11 PRO

pinorgm


Jhonny

The song table is changed so the code must be adjusted.
Currently on
RDJ V 2.0.4.8
MariaDB V 10.6.21
WIN 11 PRO

pinorgm

covers imported with version 1.8.3 are displayed correctly.
I also changed from album_art to image, the problem remains on the spaces.
I'll paste the piece of code.

      while($row = mysql_fetch_assoc($result)) {
         echo " <tr>" . "\n";
         echo "  <td><img src=d:/Album-Art/" . $row['image'] . " height=50px></td>\n"; ///VISUALIZZAZIONE COPERTINA
         echo "  <td>" . $row['artist'] . "</td>\n";
         echo "  <td>" . $row['title'] . "</td>\n";
         //echo "  <td class=\"entry_no\">" . convertTime($row['duration']) . "</td>\n";

Jhonny

 Try this

     while($row = mysql_fetch_assoc($result)) {
         echo " <tr>" . "\n";
         echo "  <td><img src=\"d:/Album-Art/" . $row['image'] . "\" height=\"50px\"></td>\n"; ///VISUALIZZAZIONE COPERTINA
         echo "  <td>" . $row['artist'] . "</td>\n";
         echo "  <td>" . $row['title'] . "</td>\n";
         //echo "  <td class=\"entry_no\">" . convertTime($row['duration']) . "</td>\n";
Currently on
RDJ V 2.0.4.8
MariaDB V 10.6.21
WIN 11 PRO

pinorgm

nothing. does not work. I'm trying with str_replace and see what happens.

Jhonny

Note i was typing some errors the code has change, is this code  as it is working for you?
Currently on
RDJ V 2.0.4.8
MariaDB V 10.6.21
WIN 11 PRO

pinorgm

thanks jhonny, I solved. I entered this string and everything works now
$row['image'] = preg_replace('/\s+/', '%20', $row['image']);

Jhonny

Currently on
RDJ V 2.0.4.8
MariaDB V 10.6.21
WIN 11 PRO

Marius

DOWNLOADS PAGE

HOW TO FIX RADIODJ DATABASE
----------------
Please don't PM me for support requests. Use the forums instead.

pinorgm

Thanks Marius for the latest work you've done with new features and thanks to those who like jhonny are always ready to help out in the forum.
There are still some things concerning the sound cards and dsp_plugin. Do I open a new topic?

Marius

Separate subjects, to separate topics, please.
DOWNLOADS PAGE

HOW TO FIX RADIODJ DATABASE
----------------
Please don't PM me for support requests. Use the forums instead.