Skip to content
Permalink
Browse files

remove shoutcast preferences and localplay table

Looks like it was around at least 3.7.0 was the last i could see this being used.
  • Loading branch information
lachlan-00 committed Feb 6, 2020
1 parent 1493952 commit 2691348d13566eec561a3bec09f2c5cc4391b444
Showing with 31 additions and 24 deletions.
  1. +1 −1 lib/class/preference.class.php
  2. +30 −0 lib/class/update.class.php
  3. +0 −4 locale/base/translatable-database-strings.txt
  4. +0 −19 sql/ampache.sql
@@ -440,7 +440,7 @@ public static function is_boolean($key)
'allow_stream_playback', 'allow_democratic_playback',
'use_auth', 'allow_localplay_playback', 'debug', 'lock_songs',
'transcode_m4a', 'transcode_mp3', 'transcode_ogg', 'transcode_flac',
'shoutcast_active', 'httpq_active', 'show_lyrics');
'httpq_active', 'show_lyrics');

if (in_array($key, $boolean_array)) {
return true;
@@ -187,6 +187,10 @@ public static function populate_version()
$update_string = "* Add a last_count to search table to speed up access requests<br />";
$version[] = array('version' => '400005', 'description' => $update_string);

$update_string = "* Drop shoutcast_active preferences. (Feature has not existed for years)<br />" .
"* Drop localplay_shoutcast table if present.<br />";
$version[] = array('version' => '400006', 'description' => $update_string);

return $version;
}

@@ -1023,6 +1027,7 @@ public static function update_400004()

return $retval;
}

/**
* update_400005
*
@@ -1036,4 +1041,29 @@ public static function update_400005()

return $retval;
}

/**
* update_400006
*
* drop shoutcast_active preferences and localplay_shoutcast table
*/
public static function update_400006()
{
$retval = true;

$sql = "DELETE FROM `user_preference` " .
"WHERE `user_preference`.`preference` IN " .
"(SELECT `preference`.`id` FROM `preference` " .
"WHERE `preference`.`name` = 'shoutcast_active');";
$retval &= Dba::write($sql);

$sql = "DELETE FROM `preference` " .
"WHERE `preference`.`name` = 'shoutcast_active';";
$retval &= Dba::write($sql);

$sql = "DROP TABLE IF EXISTS `localplay_shoutcast`";
$retval &= Dba::write($sql);

return $retval;
}
}
@@ -411,10 +411,6 @@ msgstr ""
msgid "player"
msgstr ""

#: Database preference subcategory table id 72
msgid "shoutcast"
msgstr ""

#: Database preference subcategory table id 78
msgid "lastfm"
msgstr ""
@@ -418,24 +418,6 @@ CREATE TABLE IF NOT EXISTS `localplay_mpd` (

-- --------------------------------------------------------

--
-- Table structure for table `localplay_shoutcast`
--

DROP TABLE IF EXISTS `localplay_shoutcast`;
CREATE TABLE IF NOT EXISTS `localplay_shoutcast` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(128) CHARACTER SET utf8 DEFAULT NULL,
`owner` int(11) NOT NULL,
`pid` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
`playlist` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
`local_root` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
`access` smallint(4) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `movie`
--
@@ -658,7 +640,6 @@ INSERT INTO `preference` (`id`, `name`, `value`, `description`, `level`, `type`,
(69, 'show_lyrics', '0', 'Show lyrics', 0, 'boolean', 'interface', 'player'),
(70, 'mpd_active', '0', 'MPD Active Instance', 25, 'integer', 'internal', 'mpd'),
(71, 'httpq_active', '0', 'httpQ Active Instance', 25, 'integer', 'internal', 'httpq'),
(72, 'shoutcast_active', '0', 'Shoutcast Active Instance', 25, 'integer', 'internal', 'shoutcast'),
(77, 'lastfm_grant_link', '', 'Last.FM Grant URL', 25, 'string', 'internal', 'lastfm'),
(78, 'lastfm_challenge', '', 'Last.FM Submit Challenge', 25, 'string', 'internal', 'lastfm'),
(102, 'share', '0', 'Allow Share', 100, 'boolean', 'options', 'feature'),

0 comments on commit 2691348

Please sign in to comment.
You can’t perform that action at this time.