Page 1 of 1

Sorting Radio Stations

PostPosted: Tue Nov 17, 2009 7:11 pm
by precipitous
Is there a way to sort the list of Internet Radio Stations? The default appears to be the order in which they were input. I would like to make mine either alphabetical, or by genre...

PostPosted: Thu Nov 26, 2009 2:03 am
by M0NG0
Yep, it's possible. Here's the method I used:

In the following example, let's say I have two stations: .977 Hitz & .977 Alternative. .977 Hitz was entered first and .977 Alternative was entered 2nd - so they are not sorted alphabetically.

1) Use SQL to view the internet tv/radio stations table. Go to http://[your_Subsonic_URL]:[your_port]/db.view. Enter the following query to see the table:
Code: Select all
Select * from internet_radio

You should see a table that shows all of your internet radio stations. The first one listed will have an ID of 0. In this example I want .977 Alternative to have ID=0.

2) Use SQL to change the IDs. Unless there's a better way that I am not aware of, you will have to run the following statement for each station to change the IDs.

This first query changes .977 Hitz's ID to 10. Just pick a number higher than the number of stations you have. This is necessary because there cannot be duplicate IDs.
Code: Select all
UPDATE internet_radio
SET ID='10'
WHERE NAME='.977 Hitz'


This query changes the ID for .977 Alternative to 0:
Code: Select all
UPDATE internet_radio
SET ID='0'
WHERE NAME='.977 Alternative'


This query changes the ID for .977 Hitz to 1:
Code: Select all
UPDATE internet_radio
SET ID='1'
WHERE NAME='.977 Hitz'


Once you have everything in the correct order, go to the settings page and disable all of the internet tv/radio stations (i.e., uncheck the 'enabled' boxes), then refresh the home page. There shouldn't be anything listed for internet tv/radio. Then go back to the settings page and enable all of the stations. Once you refresh the home page you should see all of the tv/radio stations in the order you set. This last step might not be necessary, but it seems to work.

Thank You

PostPosted: Thu Nov 26, 2009 3:35 am
by precipitous
Mongo:
Thank you for this incredibly useful procedure! Your instructions were clear, accurate, easy to follow, and produced perfect results. You really made my day...