From 627da0570e79865643ae3c23c0f5244ac46d5d68 Mon Sep 17 00:00:00 2001 From: TheTroll Date: Thu, 25 Feb 2010 19:22:16 +0100 Subject: Added a source type and now show the media browsing respect to the type --- includes/inc_audio.php | 13 +++++++++++-- includes/inc_home.php | 16 +++++++++++++--- includes/inc_media.php | 17 ----------------- includes/inc_stream.php | 2 +- includes/inc_video.php | 13 +++++++++++-- includes/include.php | 7 +++++-- 6 files changed, 41 insertions(+), 27 deletions(-) delete mode 100755 includes/inc_media.php (limited to 'includes') diff --git a/includes/inc_audio.php b/includes/inc_audio.php index 1806703..b1f58e3 100755 --- a/includes/inc_audio.php +++ b/includes/inc_audio.php @@ -2,6 +2,15 @@ global $httppath; +$mediapath = $_REQUEST['mediapath']; +$subdir = $_REQUEST['subdir']; + +/* Add last slash to dirs */ +if ($mediapath[strlen($mediapath)-1] != '/') + $mediapath = $mediapath .'/'; +if ($subdir[strlen($subdir)-1] != '/') + $subdir = $subdir .'/'; + print "\r\n"; print "
\r\n"; print "
\r\n"; @@ -50,7 +59,7 @@ if ($medianame_array[0]) print " \r\n"; print " \r\n"; print "
\r\n"; - print " \r\n"; + print " \r\n"; print " \r\n"; print " \r\n"; print "
\r\n"; @@ -98,7 +107,7 @@ else $upsubdir = dirname($subdir); print "
\r\n"; -print " \r\n"; +print " \r\n"; print " \r\n"; print " \r\n"; print "
\r\n"; diff --git a/includes/inc_home.php b/includes/inc_home.php index 9515860..d907b87 100755 --- a/includes/inc_home.php +++ b/includes/inc_home.php @@ -27,17 +27,27 @@ if ($vdrenabled) // Media menus print " MEDIA\r\n"; print "
    \r\n"; -foreach($mediasources as $sname => $spath) +foreach($mediasources as $source) { + $stype = $source[0]; + $sname = $source[1]; + $spath = $source[2]; + print "
  • \r\n"; print " \r\n"; - print " \r\n"; + if ($stype == 1) + print " \r\n"; + else + print " \r\n"; print " {$sname}\r\n"; print " \r\n"; print " \r\n"; print "
  • \r\n"; print "
    \r\n"; - print " \r\n"; + if ($stype == 1) + print " \r\n"; + else + print " \r\n"; print " \r\n"; print " \r\n"; print "
    \r\n"; diff --git a/includes/inc_media.php b/includes/inc_media.php deleted file mode 100755 index e0f7cb9..0000000 --- a/includes/inc_media.php +++ /dev/null @@ -1,17 +0,0 @@ - diff --git a/includes/inc_stream.php b/includes/inc_stream.php index aa3179b..b98b132 100755 --- a/includes/inc_stream.php +++ b/includes/inc_stream.php @@ -211,7 +211,7 @@ else case 3: $mediapath = $_REQUEST['mediapath']; $subdir = $_REQUEST['subdir']; - print " "; + print " "; print " \r\n"; print " \r\n"; break; diff --git a/includes/inc_video.php b/includes/inc_video.php index d933a04..10a5714 100755 --- a/includes/inc_video.php +++ b/includes/inc_video.php @@ -1,5 +1,14 @@ \r\n"; print "
    \r\n"; print "
    \r\n"; @@ -57,7 +66,7 @@ if ($medianame_array[0]) print " \r\n"; print "\r\n"; print "
    "; - print " "; + print " "; print " "; print " \r\n"; print "
    \r\n"; @@ -91,7 +100,7 @@ if ($medianame_array[0]) $upsubdir = dirname($subdir); print "
    \r\n"; -print " \r\n"; +print " \r\n"; print " \r\n"; print " \r\n"; print "
    \r\n"; diff --git a/includes/include.php b/includes/include.php index bf18d55..42cf446 100755 --- a/includes/include.php +++ b/includes/include.php @@ -40,8 +40,11 @@ function selectpage() case ("recordings"): include('includes/inc_rec.php'); break; - case ("media"): - include('includes/inc_media.php'); + case ("video"): + include('includes/inc_video.php'); + break; + case ("audio"): + include('includes/inc_audio.php'); break; case ("epg"): include('includes/inc_epg.php'); -- cgit v1.2.3