diff --git a/images/topmenu-tagcloud.png b/images/topmenu-tagcloud.png
new file mode 100644
index 00000000..0eac348e
Binary files /dev/null and b/images/topmenu-tagcloud.png differ
diff --git a/images/topmenu-upload.png b/images/topmenu-upload.png
new file mode 100644
index 00000000..9455ae65
Binary files /dev/null and b/images/topmenu-upload.png differ
diff --git a/lib/class/album.class.php b/lib/class/album.class.php
index d092efff..5cf0849e 100644
--- a/lib/class/album.class.php
+++ b/lib/class/album.class.php
@@ -808,7 +808,7 @@ class Album extends database_object implements library_item
return $artist->get_description();
}
- public function display_art($thumb = 2)
+ public function display_art($thumb = 2, $force = false)
{
$id = null;
$type = null;
@@ -817,7 +817,7 @@ class Album extends database_object implements library_item
$id = $this->id;
$type = 'album';
} else {
- if (Art::has_db($this->artist_id, 'artist')) {
+ if (Art::has_db($this->artist_id, 'artist') || $force) {
$id = $this->artist_id;
$type = 'artist';
}
diff --git a/lib/class/artist.class.php b/lib/class/artist.class.php
index f55fcc16..d3cc1d6a 100644
--- a/lib/class/artist.class.php
+++ b/lib/class/artist.class.php
@@ -619,12 +619,12 @@ class Artist extends database_object implements library_item
return $this->summary;
}
- public function display_art($thumb = 2)
+ public function display_art($thumb = 2, $force = false)
{
$id = null;
$type = null;
- if (Art::has_db($this->id, 'artist')) {
+ if (Art::has_db($this->id, 'artist') || $force) {
$id = $this->id;
$type = 'artist';
}
diff --git a/lib/class/broadcast.class.php b/lib/class/broadcast.class.php
index ba05fc26..c6ffbc40 100644
--- a/lib/class/broadcast.class.php
+++ b/lib/class/broadcast.class.php
@@ -286,9 +286,9 @@ class Broadcast extends database_object implements library_item
return null;
}
- public function display_art($thumb = 2)
+ public function display_art($thumb = 2, $force = false)
{
- if (Art::has_db($this->id, 'broadcast')) {
+ if (Art::has_db($this->id, 'broadcast') || $force) {
Art::display('broadcast', $this->id, $this->get_fullname(), $thumb, $this->link);
}
}
diff --git a/lib/class/channel.class.php b/lib/class/channel.class.php
index 98a2a41e..bebeec7c 100644
--- a/lib/class/channel.class.php
+++ b/lib/class/channel.class.php
@@ -249,9 +249,9 @@ class Channel extends database_object implements media, library_item
return $this->description;
}
- public function display_art($thumb = 2)
+ public function display_art($thumb = 2, $force = false)
{
- if (Art::has_db($this->id, 'channel')) {
+ if (Art::has_db($this->id, 'channel') || $force) {
Art::display('channel', $this->id, $this->get_fullname(), $thumb, $this->link);
}
}
diff --git a/lib/class/label.class.php b/lib/class/label.class.php
index 941f2fd7..23898a7b 100644
--- a/lib/class/label.class.php
+++ b/lib/class/label.class.php
@@ -97,9 +97,9 @@ class Label extends database_object implements library_item
return true;
}
- public function display_art($thumb)
+ public function display_art($thumb, $force = false)
{
- if (Art::has_db($this->id, 'label')) {
+ if (Art::has_db($this->id, 'label') || $force) {
Art::display('label', $this->id, $this->get_fullname(), $thumb, $this->link);
}
}
diff --git a/lib/class/library_item.interface.php b/lib/class/library_item.interface.php
index 67d82038..55e96d55 100644
--- a/lib/class/library_item.interface.php
+++ b/lib/class/library_item.interface.php
@@ -37,7 +37,7 @@ interface library_item extends playable_item
public function get_description();
- public function display_art($thumb);
+ public function display_art($thumb, $force = false);
public function update(array $data);
diff --git a/lib/class/live_stream.class.php b/lib/class/live_stream.class.php
index d0ac6993..2d56c4c8 100644
--- a/lib/class/live_stream.class.php
+++ b/lib/class/live_stream.class.php
@@ -165,9 +165,9 @@ class Live_Stream extends database_object implements media, library_item
return null;
}
- public function display_art($thumb = 2)
+ public function display_art($thumb = 2, $force = false)
{
- if (Art::has_db($this->id, 'live_stream')) {
+ if (Art::has_db($this->id, 'live_stream') || $force) {
Art::display('live_stream', $this->id, $this->get_fullname(), $thumb, $this->link);
}
}
diff --git a/lib/class/playlist_object.abstract.php b/lib/class/playlist_object.abstract.php
index 168e9541..bec8b0c1 100644
--- a/lib/class/playlist_object.abstract.php
+++ b/lib/class/playlist_object.abstract.php
@@ -157,7 +157,7 @@ abstract class playlist_object extends database_object implements library_item
return null;
}
- public function display_art($thumb = 2)
+ public function display_art($thumb = 2, $force = false)
{
// no art
}
diff --git a/lib/class/podcast.class.php b/lib/class/podcast.class.php
index 26547bb3..5f84e4e0 100644
--- a/lib/class/podcast.class.php
+++ b/lib/class/podcast.class.php
@@ -226,9 +226,9 @@ class Podcast extends database_object implements library_item
return $this->f_description;
}
- public function display_art($thumb = 2)
+ public function display_art($thumb = 2, $force = false)
{
- if (Art::has_db($this->id, 'podcast')) {
+ if (Art::has_db($this->id, 'podcast') || $force) {
Art::display('podcast', $this->id, $this->get_fullname(), $thumb, $this->link);
}
}
diff --git a/lib/class/podcast_episode.class.php b/lib/class/podcast_episode.class.php
index 3a0dee8b..44af5bde 100644
--- a/lib/class/podcast_episode.class.php
+++ b/lib/class/podcast_episode.class.php
@@ -206,7 +206,7 @@ class Podcast_Episode extends database_object implements media, library_item
return $this->f_description;
}
- public function display_art($thumb = 2)
+ public function display_art($thumb = 2, $force = false)
{
$id = null;
$type = null;
@@ -215,7 +215,7 @@ class Podcast_Episode extends database_object implements media, library_item
$id = $this->id;
$type = 'podcast_episode';
} else {
- if (Art::has_db($this->podcast, 'podcast')) {
+ if (Art::has_db($this->podcast, 'podcast') || $force) {
$id = $this->podcast;
$type = 'podcast';
}
diff --git a/lib/class/song.class.php b/lib/class/song.class.php
index 98461984..a977fb19 100644
--- a/lib/class/song.class.php
+++ b/lib/class/song.class.php
@@ -1592,7 +1592,7 @@ class Song extends database_object implements media, library_item
return $album->get_description();
}
- public function display_art($thumb = 2)
+ public function display_art($thumb = 2, $force = false)
{
$id = null;
$type = null;
@@ -1605,7 +1605,7 @@ class Song extends database_object implements media, library_item
$id = $this->album;
$type = 'album';
} else {
- if (Art::has_db($this->artist, 'artist')) {
+ if (Art::has_db($this->artist, 'artist') || $force) {
$id = $this->artist;
$type = 'artist';
}
diff --git a/lib/class/tag.class.php b/lib/class/tag.class.php
index a9102976..48cbed49 100644
--- a/lib/class/tag.class.php
+++ b/lib/class/tag.class.php
@@ -780,9 +780,9 @@ class Tag extends database_object implements library_item
return null;
}
- public function display_art($thumb = 2)
+ public function display_art($thumb = 2, $force = false)
{
- if (Art::has_db($this->id, 'tag')) {
+ if (Art::has_db($this->id, 'tag') || $force) {
Art::display('tag', $this->id, $this->get_fullname(), $thumb, $this->link);
}
}
diff --git a/lib/class/tvshow.class.php b/lib/class/tvshow.class.php
index 9ab5e064..5222a07e 100644
--- a/lib/class/tvshow.class.php
+++ b/lib/class/tvshow.class.php
@@ -262,9 +262,9 @@ class TVShow extends database_object implements library_item
return $this->summary;
}
- public function display_art($thumb = 2)
+ public function display_art($thumb = 2, $force = false)
{
- if (Art::has_db($this->id, 'tvshow')) {
+ if (Art::has_db($this->id, 'tvshow') || $force) {
Art::display('tvshow', $this->id, $this->get_fullname(), $thumb, $this->link);
}
}
diff --git a/lib/class/tvshow_episode.class.php b/lib/class/tvshow_episode.class.php
index 21fd341a..ce8b5a0c 100644
--- a/lib/class/tvshow_episode.class.php
+++ b/lib/class/tvshow_episode.class.php
@@ -213,7 +213,7 @@ class TVShow_Episode extends Video
return $season->get_description();
}
- public function display_art($thumb = 2)
+ public function display_art($thumb = 2, $force = false)
{
$id = null;
$type = null;
@@ -227,7 +227,7 @@ class TVShow_Episode extends Video
$type = 'tvshow_season';
} else {
$season = new TVShow_Season($this->season);
- if (Art::has_db($season->tvshow, 'tvshow')) {
+ if (Art::has_db($season->tvshow, 'tvshow') || $force) {
$id = $season->tvshow;
$type = 'tvshow';
}
diff --git a/lib/class/tvshow_season.class.php b/lib/class/tvshow_season.class.php
index 22ce4ed1..e410dc8a 100644
--- a/lib/class/tvshow_season.class.php
+++ b/lib/class/tvshow_season.class.php
@@ -227,7 +227,7 @@ class TVShow_Season extends database_object implements library_item
return $tvshow->get_description();
}
- public function display_art($thumb = 2)
+ public function display_art($thumb = 2, $force = false)
{
$id = null;
$type = null;
@@ -236,7 +236,7 @@ class TVShow_Season extends database_object implements library_item
$id = $this->id;
$type = 'tvshow_season';
} else {
- if (Art::has_db($this->tvshow, 'tvshow')) {
+ if (Art::has_db($this->tvshow, 'tvshow') || $force) {
$id = $this->tvshow;
$type = 'tvshow';
}
diff --git a/lib/class/update.class.php b/lib/class/update.class.php
index 4853b32b..1196f3eb 100644
--- a/lib/class/update.class.php
+++ b/lib/class/update.class.php
@@ -544,6 +544,9 @@ class Update
$update_string = "- Add upload rename pattern and ignore duplicate options.
";
$version[] = array('version' => '380007', 'description' => $update_string);
+ $update_string = "- Add browse filter and light sidebar options.
";
+ $version[] = array('version' => '380008', 'description' => $update_string);
+
return $version;
}
@@ -3837,14 +3840,40 @@ class Update
$retval = true;
$sql = "INSERT INTO `preference` (`name`,`value`,`description`,`level`,`type`,`catagory`, `subcatagory`) " .
- "VALUES ('upload_catalog_pattern','0','Rename uploaded file according to catalog pattern',0,'boolean','system','upload')";
+ "VALUES ('upload_catalog_pattern','0','Rename uploaded file according to catalog pattern',100,'boolean','system','upload')";
$retval &= Dba::write($sql);
$id = Dba::insert_id();
$sql = "INSERT INTO `user_preference` VALUES (-1,?,'0')";
$retval &= Dba::write($sql, array($id));
$sql = "INSERT INTO `preference` (`name`,`value`,`description`,`level`,`type`,`catagory`, `subcatagory`) " .
- "VALUES ('catalog_check_duplicate','0','Check library item at import time and don\'t import duplicates',0,'boolean','system','catalog')";
+ "VALUES ('catalog_check_duplicate','0','Check library item at import time and don\'t import duplicates',100,'boolean','system','catalog')";
+ $retval &= Dba::write($sql);
+ $id = Dba::insert_id();
+ $sql = "INSERT INTO `user_preference` VALUES (-1,?,'0')";
+ $retval &= Dba::write($sql, array($id));
+
+ return $retval;
+ }
+
+ /**
+ * update_380008
+ *
+ * Add browse filter and light sidebar options
+ */
+ public static function update_380008()
+ {
+ $retval = true;
+
+ $sql = "INSERT INTO `preference` (`name`,`value`,`description`,`level`,`type`,`catagory`, `subcatagory`) " .
+ "VALUES ('browse_filter','1','Show filter box on browse',25,'boolean','interface','library')";
+ $retval &= Dba::write($sql);
+ $id = Dba::insert_id();
+ $sql = "INSERT INTO `user_preference` VALUES (-1,?,'1')";
+ $retval &= Dba::write($sql, array($id));
+
+ $sql = "INSERT INTO `preference` (`name`,`value`,`description`,`level`,`type`,`catagory`, `subcatagory`) " .
+ "VALUES ('sidebar_light','0','Light sidebar by default',25,'boolean','interface','theme')";
$retval &= Dba::write($sql);
$id = Dba::insert_id();
$sql = "INSERT INTO `user_preference` VALUES (-1,?,'0')";
diff --git a/lib/class/video.class.php b/lib/class/video.class.php
index 38cee764..bb8ee401 100644
--- a/lib/class/video.class.php
+++ b/lib/class/video.class.php
@@ -393,9 +393,9 @@ class Video extends database_object implements media, library_item
return '';
}
- public function display_art($thumb = 2)
+ public function display_art($thumb = 2, $force = false)
{
- if (Art::has_db($this->id, 'video')) {
+ if (Art::has_db($this->id, 'video') || $force) {
Art::display('video', $this->id, $this->get_fullname(), $thumb, $this->link);
}
}
diff --git a/lib/class/xml_data.class.php b/lib/class/xml_data.class.php
index f0d2d0b3..3477f7ec 100644
--- a/lib/class/xml_data.class.php
+++ b/lib/class/xml_data.class.php
@@ -195,9 +195,9 @@ class XML_Data
* This returns the formatted 'playlistTrack' string for an xml document
*
*/
- private static function playlist_song_tracks_string($song,$playlist_data)
+ private static function playlist_song_tracks_string($song, $playlist_data)
{
- if ($playlist_data == "") {
+ if (empty($playlist_data)) {
return "";
}
$playlist_track = "";
@@ -424,7 +424,7 @@ class XML_Data
* This returns an xml document from an array of song ids.
* (Spiffy isn't it!)
*/
- public static function songs($songs,$playlist_data='')
+ public static function songs($songs, $playlist_data='')
{
if (count($songs) > self::$limit or self::$offset > 0) {
$songs = array_slice($songs, self::$offset, self::$limit);
diff --git a/lib/preferences.php b/lib/preferences.php
index 31c70896..f230cd05 100644
--- a/lib/preferences.php
+++ b/lib/preferences.php
@@ -202,6 +202,8 @@ function create_preference_input($name,$value)
case 'libitem_contextmenu':
case 'upload_catalog_pattern':
case 'catalogfav_gridview':
+ case 'browse_filter':
+ case 'sidebar_light':
$is_true = '';
$is_false = '';
if ($value == '1') {
diff --git a/modules/plugins/CatalogFavorites/CatalogFavorites.plugin.php b/modules/plugins/CatalogFavorites/CatalogFavorites.plugin.php
index b7c02820..ac448ba1 100644
--- a/modules/plugins/CatalogFavorites/CatalogFavorites.plugin.php
+++ b/modules/plugins/CatalogFavorites/CatalogFavorites.plugin.php
@@ -126,7 +126,7 @@ class AmpacheCatalogFavorites
echo '