Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
61 user(s) are online (45 user(s) are browsing Forums)

Members: 0
Guests: 61

more...
Support us!
Recent OS4 Files
OS4Depot.net
Report message:*
 

Re: What is "AHI User Mode" in TuneNet?

Subject: Re: What is "AHI User Mode" in TuneNet?
by broadblues on 2017/8/1 11:22:02

@ChrisH

Quote:

OK, that gives me 9 results, while searching for 'JPop' gives 21 results.

While using the website gives me 36 results, and 'JPop' gives 40.


The only limit here is what the API search finds, the website may have direct access to the database, rather than using the API, thus returning more stations, who knows.

The API as described in their documantation is not fully implmented, for example you can't query for subgenre names at the moment (or couldn't when I wrote the code anyway haven't tested for 6 months) JPOP is a subgenre, but when searching for genres you don't search by the text name but rather but it's numerical ID.

JPOP is 227 (worked out by using the GETGENREINFO rexx command to get the main genre ID (POP = 220) and the using this list to guess the sub genre ID)

http://forums.winamp.com/showthread.php?t=303241

rx "ADDRESS TUNENET.1 STATIONSCAN STATIONS 100 GENREID 227"

Gives 20 results

There should have been a ScanByGenre.rexx example script included in the archive but it seems to be missing.

Here is the code.

/* Scan Stations Example */

/*
This example shows how to fetch genres, then scan the list for one of the genre IDS returned 
*/

options results

parse arg searchgenre

address TUNENET.1

'GETGENRELISTINFO STEM "GENRES"' 

Say "Avalable Genres:"

searchid "Not Found"

if rc 0 then do
    do 
1 to GENRES.0
        genre 
"   "
        
do 1 to GENRES.ATTRS.0
            at 
GENRES.ATTRS.j.ATTR
            genre 
genre || " " || GENRES.i.at
        end
        say genre
    end
    
    
do 0 to GENRES.0
        
if GENRES.i.NAME searchgenre then do
            
searchid GENRES.i.ID
            leave
        end
    end
    
if searchid "Not Found" then do
        
say "Requested Genre Not Available"
        
exit
    
end 
    
    Say 
"Scanning for " searchgenre
    
    
'STATIONSCAN GENREID ' searchid ' STATIONS 10'
    
if rc 0 then do
    
'GETSTATIONLISTINFO STEM "STATIONS"'
    
Say "Found:"
    
if rc 0 then do
        do 
1 to STATIONS.0
            station 
|| "  "
            
do 1 to STATIONS.ATTRS.0
                at 
STATIONS.ATTRS.j.ATTR
                station 
station || "  " || STATIONS.i.at
            end
            say station
        end    
    end
    end
end


Quote:

TuneNet itself could limit the number of searches.


It already does. Still the idea is to keep the GUI simple and fast and provide ARexx for 'advanced' / 'specialist' cases.



Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project