hslbck / gnome-shell-extension-radio

Gnome shell extension for listening to internet radio streams
GNU General Public License v3.0
144 stars 43 forks source link

Import/Export Json Channels [Improvement] #111

Open joaovarelas opened 6 years ago

joaovarelas commented 6 years ago

I've recently reinstalled my operating system and lost all my stations.

Fortunately I had a channelList.json saved somewhere in the cloud and replaced it with the original. Maybe it could be useful to add a export/import function through json formatted files.

There are 2 files ~/.local/share/gnome-shell/extensions/radio@hslbck.gmail.com/channelList.json and ~/.gse-radio/channelList.json

Only the second one is recognized by the extension.

Thanks

hslbck commented 6 years ago

Thanks for the feedback! An import/export function probably makes sense for most users. This way they don't have to look on github or the code in order to find the proper file. There are 2 channelList.json files, because the first one will be overwritten when you update the extension from the website. It only functions as initial setup.

Issue #67 should probably implemented before this feature.

BR

croatiancowboy commented 6 years ago

being able to import the channel list from radio-browser.info would also be greatly spectacular, since they use a sql version, I don't know how closely related to json that is, or if one can be translated into the other, or how hard/easy it would be to do so.

hslbck commented 6 years ago

I didn't check if radio-browser has some sort of json export, but the api at least supports json. Already in use by the browse function of the extension. Importing from radio-browser would be a separate task from this one, as the json has to be parsed in some way and brought into the same format the extension is using. Further there probably need to be some sort of limit, because I don't how GNOME Shell and GJS will behave for such an amount of data