sfuhrm / radiobrowser4j

RadioBrowser Java API library
Other
50 stars 8 forks source link

AdvancedSearchBuilder tag or tagList not work #124

Closed ChildProdigy closed 2 months ago

ChildProdigy commented 3 months ago

AdvancedSearch.AdvancedSearchBuilder builder = AdvancedSearch.builder(); builder.tagExact(true); builder.tag("news");

response =============================1======================================== icon=, name=.977 80s, url=http://playerservices.streamtheworld.com/pls/977_80.pls, type=MP3, tagList=[80s], size=0 =============================2======================================== icon=https://www.0nradio.com/logos/0n-70s_600x600.jpg, name=- 0 N-70s on Radio, url=https://0n-70s.radionetz.de/0n-70s.mp3, type=MP3, tagList=[70er, 70s, oldies, pop], size=0 ...

response data tag not correct.

sfuhrm commented 2 months ago

Can you please provide a full example unit test?

This test works for me, so I am not sure whether your call is right or I am doing something different than you:

    @Test
    public void listStationsWithAdvancedSearchWithTag() {
        List<Station> stationsList = radioBrowser
                .listStationsWithAdvancedSearch(
                        AdvancedSearch.builder()
                                .tag("news")
                                .tagExact(true)
                                .build())
                .collect(Collectors.toList());

        for (Station station : stationsList) {
            assertThat(station.getTagList(), IsIterableContaining.hasItem("news"));
        }
    }
ChildProdigy commented 2 months ago

The test just now is normal, but the exact search and the inexact search return the same result.

sfuhrm commented 2 months ago

Thanks for verifying!