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

[SOLVED] Duplicated entries in Search Results

Started by unpetru, August 06, 2018, 01:36:31 PM

RFU

Quote from: DJ Garybaldy on August 07, 2018, 09:07:00 AM
Which header?

The script has been tested with v1.8.2 & the recent 2.x.x versions,

I've not heard of other people having this issue.

/*
Request script with wait time between selects.
Made by: Jhonny
Date: 12-21-2016
Updated by: Monkey
Date:03/03/2018
*/
Гордий бути українцем, Ми - Радіо Вільної України.

DJ Garybaldy

We've updated DJ Jhonny's original script by adding more functionality to the script via CSS

it works with v2.0.0 as well as 1.8.2... AFAIK

The header needs to stay intact.

Where's the issue?
Worlds Biggest Fan of RadioDJ

Install MariaDB https://djgarybaldy.blogspot.com/2020/08/installing-maria-db.html

Install RadioDJ: https://djgarybaldy.blogspot.com/2020/08/how-to-install-radiodj-free-radio.html

Into Internet radio for 25 years 1999-2024

RadioDJ 2045 MariaDB 11.2 Windows 11

PROducer

Quote from: unpetru on August 06, 2018, 01:36:31 PM
Hi,

If I request a song from my db, the next time I search for it there will be 2 entries for it. Now I have 5 entries for the same song. Is this a bug?
Can't be a bug.  My version is working fine.

unpetru

I am telling you what is happening on my site with that plugin. After I request a song several times, in my search results I get duplicated results of that same song, as if I had multiple versions of it.
Lounge Avenue (Chillout Radio)
http://lounge-avenue.com

Dragos

I have that issue too with the old Wordpress Script.
BTW Gary... a thing that your script should do is that after a song is requested (added in the queue) it shouldn't be able to be added again.
For example: If I add Genesis - I can't dance and try to add it again before RDJ plays it, I am able to do it so the song will be played twice (or more) which is not OK. Some people will try to exploit that issue.
Radio is one of the best things that happened to the world.

unpetru

Lounge Avenue (Chillout Radio)
http://lounge-avenue.com

unpetru

I cant add the same track twice. There's something wrong with the script on your end Dragos.
Lounge Avenue (Chillout Radio)
http://lounge-avenue.com

Dragos

Quote from: unpetru on August 08, 2018, 12:13:55 AM
I cant add the same track twice. There's something wrong with the script on your end Dragos.
No. I checked again. The behavior is still the same. If a song is in the queue without being played, it's still available for request in the list. I checked with the old version and there is doing what it should.
And another weird thing... the search option doesn't return anything if I search by track title. It works only by artist.
Radio is one of the best things that happened to the world.

stevewa

@Dragos, do you have any subcategory id's excluded (web user not allowed to make requests in those subcategories) for the query?

in your config.php file, line 20
$reqsubcat = ''; // exclude subcats use id numbers like 1,2,3  Empty for show all


if you do, the search query statement that is used in index.php, line 58, appears to be missing the OR to search the title data field.

if (!empty($reqsubcat)) {
                $srch = mysqli_real_escape_string($conn, $_GET['searchterm']);
                $srchpath = "&searchterm=$srch";
                $srcquery = "AND (`artist` LIKE '%$srch%') $notin "; //Search artist and title not in selected subcats
            } else {
                $srch = mysqli_real_escape_string($conn, $_GET['searchterm']);
                $srchpath = "&searchterm=$srch";
                $srcquery = "AND (`artist` LIKE '%$srch%') OR (`title` LIKE '%$srch%')"; //Search artist and title
            }


copy and paste the segment OR (`title` LIKE '%$srch%') right before the word $notin, see if that allows you to search by title also

DJ Garybaldy

Quote from: Dragos on August 08, 2018, 12:10:26 AM
I have that issue too with the old Wordpress Script.
BTW Gary... a thing that your script should do is that after a song is requested (added in the queue) it shouldn't be able to be added again.
For example: If I add Genesis - I can't dance and try to add it again before RDJ plays it, I am able to do it so the song will be played twice (or more) which is not OK. Some people will try to exploit that issue.
I don't know how hard/easy it would be to add that functionality into the script, I'm a bit rusty with my coding and my code monkey only has so many hours he can devote to things.

Feel free to code it yourself if you know what needs doing. I'm not being awkward, Its just the amount of complaints we've attracted about our updated script is now making us wonder if we will bother with any future updates to it, It was the same a few years back when we released a song rating script for v1.6.0

Seriously some people are never happy and want to ruin things for others! What do people want BLOOD?
Worlds Biggest Fan of RadioDJ

Install MariaDB https://djgarybaldy.blogspot.com/2020/08/installing-maria-db.html

Install RadioDJ: https://djgarybaldy.blogspot.com/2020/08/how-to-install-radiodj-free-radio.html

Into Internet radio for 25 years 1999-2024

RadioDJ 2045 MariaDB 11.2 Windows 11

unpetru

DJ Garybaldy I hope you are joking. Nobody wants blood. The script si great work and it works beautifuly for me. Dragos encoutered some sort of a problem and he is now searching for a solution. Your work is greatly appreciated, trust me. Many online radios, and some FM ones, rely on Radio DJ and your script.

On behalf of everybody, I thank you and Marius for all your work.

PS: If you were joking, I made a fool out of myself... :))
Lounge Avenue (Chillout Radio)
http://lounge-avenue.com

DJ Garybaldy

The way things stand I've not got a lot of love left for the script we had hoped it would be received better than it has done.
There are some people in the world of Internet radio who are never happy unless their having a go at someone or something.
I've added the updated OR (`title` LIKE '%$srch%') to line 58 and updated the archive.
If anyone can suggest how to stop requests in the queue from being requested then please feel free to post it here and I'll try to update the script at my end.
Worlds Biggest Fan of RadioDJ

Install MariaDB https://djgarybaldy.blogspot.com/2020/08/installing-maria-db.html

Install RadioDJ: https://djgarybaldy.blogspot.com/2020/08/how-to-install-radiodj-free-radio.html

Into Internet radio for 25 years 1999-2024

RadioDJ 2045 MariaDB 11.2 Windows 11

unpetru

Garybaldy, I don't have the problem Dragos has. So, I don't understand why the script behaves differently. If I add a song from the script and then try to add it again, it says it cannot be added because it is already in the cue.
Lounge Avenue (Chillout Radio)
http://lounge-avenue.com

unpetru

DJ Garybaldy, I think I found a bug in the script :)

On my db I have the songs I am playing and some songs I disabled. If I search for a disabled song, I can find it and request it, but RDJ won't play it because it's disabled. If I search by the artist name, I see only the enabled songs.

It's just a feedback made with a lot of love :D
Lounge Avenue (Chillout Radio)
http://lounge-avenue.com

Dragos

Quote from: DJ Garybaldy on August 08, 2018, 09:32:46 AM
I don't know how hard/easy it would be to add that functionality into the script, I'm a bit rusty with my coding and my code monkey only has so many hours he can devote to things.

Feel free to code it yourself if you know what needs doing. I'm not being awkward, Its just the amount of complaints we've attracted about our updated script is now making us wonder if we will bother with any future updates to it, It was the same a few years back when we released a song rating script for v1.6.0

Seriously some people are never happy and want to ruin things for others! What do people want BLOOD?
I never intended to be rude or something. I just did some feedback to help improve the script like I did in the past with RadioDJ.
It's OK if you can't fix all the bugs. I won't judge. Thanks for the hard work you did to put together this script. It helps me a lot since I run two streams on the same system and I can't use the old WordPress plugin for both of them because they conflict.
I hope you will not be upset since we are trying to help you make a script as close to perfection as it can get.
Too bad I don't know any php coding  :(
Radio is one of the best things that happened to the world.