Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Massive deleting a internet radio station
#11
It completely solves it because the stations will never appear in Radio view unless you un-hide them. Just delete the Default Playlist in Folder view and delete the stations from the Queue (main Playlist) or do a Clear/Add of some other item.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#12
(Coming from github https://github.com/moode-player/moode/issues/530 back to the forum)

(01-31-2021, 01:43 PM)Tim Curtis Wrote: If you are trying to remove the built in radio stations simply switch to Radio view, click the cog icon to open the Radio Manager and for "moOde stations" select "Hide all"

I cannot re-add the stations from Moode that I want to keep, such as 'BBC Radio 1', it gives me the following error message:


Attached Files Thumbnail(s)
   
Reply
#13
The Radio feature uses the cfg_radio SQL table to tie together the station URL, metadata, pls file and cover art.

If you have already deleted the pls files and logo images try the following command to delete all the station rows from cfg_radio. NOTE: Row number 499 must be left in the table for the Radio feature to work correctly.

Code:
moodeutl -q "delete from cfg_radio where id < '499'"

If you haven't yet deleted the pls and log files then you could try selectively deleting rows from cfg_radio leaving only the rows you want to keep. Just leave the pls files and logo's as-is. It's the contents of cfg_radio table that determines what is displayed in Radio view.

Code:
moodeutl -q "select * from cfg_radio"

moodeutl -q "delete from cfg_radio where id = 'ID'"

moodeutl -q "delete from cfg_radio where id >= 'START_ID' and id <='END_ID'"
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#14
Don't know if this will work....depends if an empty json causes all existing stations to be dropped?

backup current Moode config from the web interface.

Unpack the zip and replace the contents of "station_data.json" with:

{
"fields": [
"id",
"station",
"name",
"type",
"logo",
"genre",
"broadcaster",
"language",
"country",
"region",
"bitrate",
"format",
"geo_fenced",
"home_page",
"reserved2"
],
"stations": [
]
}
Reply
#15
There is a command to clear the radiostations from the command-line:

Code:
/var/www/util/station_manager.py --clear -scope all
Reply
#16
Yes of course, I completely forgot about the station_manager util.

Code:
pi@trx:~ $ /var/www/util/station_manager.py  --help
usage: station_manager.py [-h] [--version] (--import | --export | --clear | --compare | --diff DIFF | --regeneratepls) [--scope {all,moode,other}]
                         [--type {favorite,regular,hidden,nothidden}] [--how {clear,merge}] [--db DB] [--logopath LOGOPATH]
                         [backupfile]

Manages import and export of moOde radiostations.

positional arguments:
 backupfile            Filename of the station backup. Required by the import, export and compare.

optional arguments:
 -h, --help            show this help message and exit
 --version             show program's version number and exit
 --import              Import radio stations from backup.
 --export              Export radio stations to backup.
 --clear               Clear radio stations. This will delete the contents of the SQL table, logo images and pls files of the selected stations within the specified
                       scope.
 --compare             Show difference between SQL table and station backup.
 --diff DIFF           Create a diff backup with the difference between the old (=backup) and new (=db) to this files.
 --regeneratepls       Regenerate the radio .pls files from db.
 --scope {all,moode,other}
                       Indicate to which stations the specified action applies. (default: other)
 --type {favorite,regular,hidden,nothidden}
                       Indicate the type of station to export.
 --how {clear,merge}   On import, clear stations before action or merge and add. (default: merge)
 --db DB               File name of the SQL database. (default: /var/local/www/db/moode-sqlite3.db
 --logopath LOGOPATH   Location of the radio logos. (default: /var/local/www/imagesw/radio-logo

Root privileges required for import or clear.
pi@trx:~ $
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#17
(04-06-2019, 10:05 PM)Tim Curtis Wrote: You can do this via SSH by deleting files in the following directories.

/var/lib/mpd/music/RADIO
/var/www/images/radio-logos
/var/www/images/radio-logos/thumbs

Have the location of the files been moved? I'm not seeing a `radio-logos` folder within `/var/www/images`

Any help appreciated.
Reply
#18
Oops, should be

/var/local/www/imagesw/radio-logos
/var/local/www/imagesw/radio-logos/thumbs
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: