diff --git a/radio-extension.png b/radio-extension.png index 09f53eb..7d67d9e 100644 Binary files a/radio-extension.png and b/radio-extension.png differ diff --git a/radio@hslbck.gmail.com/addChannelDialog.js b/radio@hslbck.gmail.com/addChannelDialog.js index 9e3bff3..abf1c71 100644 --- a/radio@hslbck.gmail.com/addChannelDialog.js +++ b/radio@hslbck.gmail.com/addChannelDialog.js @@ -24,7 +24,7 @@ const _httpSession = new Soup.SessionSync(); let oldChannel = null; -const AddChannelDialog = new Lang.Class({ +var AddChannelDialog = new Lang.Class({ Name: 'AddChannelDialog', Extends: ModalDialog.ModalDialog, diff --git a/radio@hslbck.gmail.com/channel.js b/radio@hslbck.gmail.com/channel.js index 822b2b5..6d7f166 100644 --- a/radio@hslbck.gmail.com/channel.js +++ b/radio@hslbck.gmail.com/channel.js @@ -6,7 +6,7 @@ */ const Lang = imports.lang; -const Channel = new Lang.Class({ +var Channel = new Lang.Class({ Name: 'Channel', _init: function (name, uri, favourite, encoding) { diff --git a/radio@hslbck.gmail.com/channelListDialog.js b/radio@hslbck.gmail.com/channelListDialog.js index 87c6260..131c2b7 100644 --- a/radio@hslbck.gmail.com/channelListDialog.js +++ b/radio@hslbck.gmail.com/channelListDialog.js @@ -23,7 +23,7 @@ const FavouriteDisabledIcon = 'non-starred-symbolic'; let _selectedChannel; -const ChannelListDialog = new Lang.Class({ +var ChannelListDialog = new Lang.Class({ Name: 'ChannelListDialog', Extends: ModalDialog.ModalDialog, diff --git a/radio@hslbck.gmail.com/metadata.json b/radio@hslbck.gmail.com/metadata.json index 1837006..ea5d82a 100644 --- a/radio@hslbck.gmail.com/metadata.json +++ b/radio@hslbck.gmail.com/metadata.json @@ -1,5 +1,5 @@ { - "shell-version": ["3.18", "3.20", "3.22", "3.24"], + "shell-version": ["3.18", "3.20", "3.22", "3.24", "3.26"], "uuid": "radio@hslbck.gmail.com", "name": "Internet Radio", "description": "Listen to an Internet Radio Stream", diff --git a/radio@hslbck.gmail.com/player.js b/radio@hslbck.gmail.com/player.js index 2847148..f47fb52 100644 --- a/radio@hslbck.gmail.com/player.js +++ b/radio@hslbck.gmail.com/player.js @@ -20,7 +20,7 @@ const MyE = Extension.imports.extension; const Convert = Extension.imports.convertCharset; const Convenience = Extension.imports.convenience; -Gst.init(null, 0); +Gst.init(null); let tag = ""; let currentChannel; @@ -32,7 +32,7 @@ let settings; const SETTING_VOLUME_LEVEL = 'volume-level'; -const Player = new Lang.Class({ +var Player = new Lang.Class({ Name: 'Player', _init: function (channel) { diff --git a/radio@hslbck.gmail.com/prefs.js b/radio@hslbck.gmail.com/prefs.js index b3da292..3eacef9 100644 --- a/radio@hslbck.gmail.com/prefs.js +++ b/radio@hslbck.gmail.com/prefs.js @@ -16,7 +16,7 @@ const SETTING_TITLE_NOTIFICATION = 'title-notification'; const SETTING_SHOW_TITLE_IN_PANEL = 'show-title-in-panel'; const SETTING_SHOW_VOLUME_ADJUSTMENT_SLIDER = 'show-volume-adjustment-slider'; -const RadioPrefsWidget = new GObject.Class({ +var RadioPrefsWidget = new GObject.Class({ Name: 'RadioPrefsWidget', GTypeName: 'RadioPrefsWidget', Extends: Gtk.Grid, diff --git a/radio@hslbck.gmail.com/radioMenu.js b/radio@hslbck.gmail.com/radioMenu.js index 0503eb2..1d42039 100644 --- a/radio@hslbck.gmail.com/radioMenu.js +++ b/radio@hslbck.gmail.com/radioMenu.js @@ -72,7 +72,7 @@ const MediaKeysInterface = ' \ '; const MediaKeysProxy = Gio.DBusProxy.makeProxyWrapper(MediaKeysInterface); -const RadioMenuButton = new Lang.Class({ +var RadioMenuButton = new Lang.Class({ Name: 'Radio Button', Extends: PanelMenu.Button, @@ -99,9 +99,10 @@ const RadioMenuButton = new Lang.Class({ this.channelList = Io.read(); this.chas = this.channelList.channels; this.lastPlayed = this.channelList.lastplayed; + let encoding = this.lastPlayed.hasOwnProperty('encoding') ? this.lastPlayed.encoding : null; // init last played channel - this.lastPlayedChannel = new Channel.Channel(this.lastPlayed.name, this.lastPlayed.address, false, this.lastPlayed.encoding); + this.lastPlayedChannel = new Channel.Channel(this.lastPlayed.name, this.lastPlayed.address, false, encoding); // init player this.player = new Player.Player(this.lastPlayedChannel); @@ -349,7 +350,8 @@ const RadioMenuButton = new Lang.Class({ // init channel and add channels to the PopupMenu _initChannels: function (chas) { for (var i in chas) { - let channel = new Channel.Channel(chas[i].name, chas[i].address, chas[i].favourite, chas[i].encoding); + let encoding = chas[i].hasOwnProperty('encoding') ? chas[i].encoding : null; + let channel = new Channel.Channel(chas[i].name, chas[i].address, chas[i].favourite, encoding); this.helperChannelList[i] = channel; if (chas[i].favourite) { this._addToFavourites(channel); diff --git a/radio@hslbck.gmail.com/searchDialog.js b/radio@hslbck.gmail.com/searchDialog.js index aef20e0..59f1957 100644 --- a/radio@hslbck.gmail.com/searchDialog.js +++ b/radio@hslbck.gmail.com/searchDialog.js @@ -24,7 +24,7 @@ _httpSession.user_agent = "GSE Radio"; _httpSession.timeout = 10; let _selectedChannel; -const SearchDialog = new Lang.Class({ +var SearchDialog = new Lang.Class({ Name: 'SearchDialog', Extends: ModalDialog.ModalDialog, diff --git a/radio@hslbck.gmail.com/titleMenu.js b/radio@hslbck.gmail.com/titleMenu.js index ffdb7af..baeb38e 100644 --- a/radio@hslbck.gmail.com/titleMenu.js +++ b/radio@hslbck.gmail.com/titleMenu.js @@ -10,7 +10,7 @@ const Clutter = imports.gi.Clutter; const PanelMenu = imports.ui.panelMenu; const Extension = imports.misc.extensionUtils.getCurrentExtension(); -const TitleMenuButton = new Lang.Class({ +var TitleMenuButton = new Lang.Class({ Name: 'Title Button', Extends: PanelMenu.Button,