Browse files

git-svn-id: http://xelisaviihde.googlecode.com/svn/trunk@49 f6f80a8b-…

…968f-e7cd-b104-9312d2818bcb
  • Loading branch information...
1 parent 43becae commit e25687d70bdedae37c7d691796582a985923c52f jaakko.lukkari@gmail.com committed Feb 9, 2011
View
6 components/mainmenu/c.php
@@ -16,9 +16,9 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
defined( 'parentFile' ) or die( 'No direct access! Olet väärässä paikassa!' );
-require_once($XRUUTUDIR.'libs/mvc/c.php');
-class MainMenuXRuutuController extends XRuutuController {
+require_once($XEEDIR.'libs/mvc/c.php');
+class MainMenuXElisaViihdeController extends XElisaViihdeController {
-}
+}
View
6 components/mainmenu/m.php
@@ -16,8 +16,8 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
defined( 'parentFile' ) or die( 'No direct access! Olet väärässä paikassa!' );
-require_once($XRUUTUDIR.'libs/mvc/m.php');
-class MainMenuXRuutuModel extends XRuutuModel {
+require_once($XEEDIR.'libs/mvc/m.php');
+class MainMenuXElisaViihdeModel extends XElisaViihdeModel {
function getMenuItems() {
global $XEEDIR;
@@ -45,4 +45,4 @@ function getMenuItems() {
}
-}
+}
View
39 components/mainmenu/mainmenu.xml
@@ -1,13 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<items>
<item>
- <name>Valikko</name>
- <component></component>
- <image></image>
- <imageover></imageover>
+ <name>Valmiit nauhoitukset</name>
+ <component>ready</component>
+ <image>mainmenuready.jpg</image>
+ <imageover>mainmenuready_over.jpg</imageover>
</item>
-
+ <item>
+ <name>Tulevat nauhoitukset</name>
+ <component>scheduled</component>
+ <image>mainmenuscheduled.jpg</image>
+ <imageover>mainmenuscheduled_over.jpg</imageover>
+ </item>
+
+ <item>
+ <name>Kanavaopas</name>
+ <component>epg</component>
+ <image>mainmenuinfo.jpg</image>
+ <imageover>mainmenuinfo_over.jpg</imageover>
+
+
+
+ </item>
+ <item>
+ <name>Asetukset</name>
+ <component>settings</component>
+ <image>mainmenusettings.jpg</image>
+ <imageover>mainmenusettings_over.jpg</imageover>
+
+
+ </item>
+ <item>
+ <name>Päivitä</name>
+ <component>update</component>
+ <image>mainmenuupdate.jpg</image>
+ <imageover>mainmenuupdate_over.jpg</imageover>
+ </item>
</items>
View
6 components/mainmenu/v.php
@@ -16,8 +16,8 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
defined( 'parentFile' ) or die( 'No direct access! Olet väärässä paikassa!' );
-require_once($XRUUTUDIR.'libs/mvc/v.php');
-class MainMenuXRuutuView extends XRuutuView {
+require_once($XEEDIR.'libs/mvc/v.php');
+class MainMenuXElisaViihdeView extends XElisaViihdeView {
function render($tmpl='default') {
@@ -29,4 +29,4 @@ function render($tmpl='default') {
return parent::render($tmpl);
}
-}
+}
View
190 components/ready/layout/default.php
@@ -24,10 +24,196 @@
?>
<rss version="2.0" xmlns:media="http://purl.org/dc/elements/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <log>
+ old = readStringFromFile("/tmp/usbmounts/sda1/debug.txt");
+ time = readStringFromFile("/tmp/currenttime");
+ new = old + "&#x0A;" + time + ": " + txt;
+ writeStringToFile("/tmp/usbmounts/sda1/debug.txt", new);
+ </log>
+
+
+<loadData>
+
+thumb = getItemInfo(getFocusItemIndex(), "thumbnail");
+name = getItemInfo(getFocusItemIndex(), "name");
+
+
+
+</loadData>
+
+<onEnter>
+ executeScript("loadData");
+</onEnter>
+
+<onExit>
+setRefreshTime(-1);
+</onExit>
+
+ <onRefresh>
+ setRefreshTime(-1);
+ executeScript("loadData");
+
+ redrawDisplay();
+
+ </onRefresh>
+
+
+
+
+
+ <mediaDisplay name="photoFocusView"
+ imageBottomSide="null"
+ imageTopSide="null"
+ imageFocusItemBackground="null"
+ imageItemBackground="null"
+ imageFocus="null"
+ imageParentFocus="null"
+ backgroundColor="0:0:0"
+ rowCount="1"
+ columnCount="5"
+ fontSize="12"
+ sideTopHeightPC="0"
+ sideColorTop="-1:-1:-1"
+ sideColorBottom="-1:-1:-1"
+ itemOffsetXPC="10"
+ itemImageOffsetXPC="0"
+ itemOffsetYPC="70.8"
+
+ itemWidthPC="14"
+ itemHeightPC="14"
+ itemBorderColor="0:250:180"
+ itemBackgroundWidthPC="0"
+ itemBackgroundHeightPC="0"
+ itemGapXPC="1.43"
+ focusItemOffsetYPC="69"
+ focusItemOffsetXPC="0"
+ focusItemWidthPC="17"
+ focusItemHeightPC="17"
+ focusItemBackgroundWidthPC="0"
+ focusItemBackgroundHeightPC="0"
+ bottomYPC="85"
+ showHeader="yes"
+ showDefaultInfo="no"
+ idleImageXPC="89"
+ idleImageYPC="8"
+ idleImageWidthPC="6"
+ idleImageHeightPC="10">
+
+
+
+ <idleImage>/tmp/usbmounts/sda1/scripts/xLive/image/busy1.png</idleImage>
+ <idleImage>/tmp/usbmounts/sda1/scripts/xLive/image/busy2.png</idleImage>
+ <idleImage>/tmp/usbmounts/sda1/scripts/xLive/image/busy3.png</idleImage>
+ <idleImage>/tmp/usbmounts/sda1/scripts/xLive/image/busy4.png</idleImage>
+ <idleImage>/tmp/usbmounts/sda1/scripts/xLive/image/busy5.png</idleImage>
+ <idleImage>/tmp/usbmounts/sda1/scripts/xLive/image/busy6.png</idleImage>
+ <idleImage>/tmp/usbmounts/sda1/scripts/xLive/image/busy7.png</idleImage>
+ <idleImage>/tmp/usbmounts/sda1/scripts/xLive/image/busy8.png</idleImage>
+
+
+
+
+<text redraw="yes" tailDots="yes" fontSize="14" lines="1"
+ offsetXPC="43" offsetYPC="25" widthPC="80" heightPC="5"
+ backgroundColor="0:0:0" foregroundColor="255:255:255">
+ <script>
+ getItemInfo(getFocusItemIndex(), "name");
+
+</script>
+
+ </text>
+ <text redraw="yes" tailDots="yes" fontSize="14" lines="1"
+ offsetXPC="43" offsetYPC="30" widthPC="80" heightPC="5"
+ backgroundColor="0:0:0" foregroundColor="255:255:255">
+ <script>
+
+ if(getItemInfo(getFocusItemIndex(), "xeeType")=="recording") {
+ getItemInfo(getFocusItemIndex(), "channel");
+ } else if(getItemInfo(getFocusItemIndex(), "xeeType")=="folder") {
+ koko=getItemInfo(getFocusItemIndex(), "size");
+ "Koko: "+koko;
+ } else {
+ "";
+ }
+
+</script>
+
+ </text>
+ <text redraw="yes" tailDots="yes" fontSize="14" lines="1"
+ offsetXPC="43" offsetYPC="35" widthPC="80" heightPC="5"
+ backgroundColor="0:0:0" foregroundColor="255:255:255">
+ <script>
+ if(getItemInfo(getFocusItemIndex(), "xeeType")=="recording") {
+ getItemInfo(getFocusItemIndex(), "startTime");
+ } else if(getItemInfo(getFocusItemIndex(), "xeeType")=="folder") {
+ maara=getItemInfo(getFocusItemIndex(), "recordingsCount");
+ "Nauhoituksia "+maara+" kpl";
+ } else {
+ "";
+ }
+
+</script>
+
+ </text>
+ <text redraw="yes" tailDots="yes" fontSize="14" lines="1"
+ offsetXPC="43" offsetYPC="40" widthPC="80" heightPC="5"
+ backgroundColor="0:0:0" foregroundColor="255:255:255">
+ <script>
+ if(getItemInfo(getFocusItemIndex(), "xeeType")=="recording") {
+
+kesto = getItemInfo(getFocusItemIndex(), "videolength");
+ "kesto: "+ kesto +" min";
+ } else {
+"";
+ }
+
+</script>
+
+ </text>
+ <image redraw="yes" offsetXPC=10 offsetYPC=25 widthPC=32.9 heightPC=33.2>
+ <script>
+ getItemInfo(getFocusItemIndex(), "thumbnail");
+ </script>
+ </image>
+ <image offsetXPC=10 offsetYPC=6.8 widthPC=20 heightPC=15>
+ <?php echo $XEEDIR; ?>images/logo_small.jpg
+ </image>
+
+<onUserInput>
+userInput = currentUserInput();
+
+
+ /* OPEN LISTVIEW */
+ if ( userInput == "2" ) {
+ showIdle();
+ url = "<?php echo $XEEURL ?>ready.php?view=listview";
+ jumpToLink("destination");
+ redrawDisplay();
+ ret;
+ }
+
+ </onUserInput>
+
+</mediaDisplay>
+
+ <destination>
+ <link>
+ <script>
+ url;
+ </script>
+
+ </link>
+ </destination>
+
+
+
<channel>
-<title>Tulevat nauhoitukset</title>
+<title>Nauhoitukset</title>
-//tähän itemit
+<?php // if($folderid!="") { include("templates/rss.prevfolder.php"); } ?>
+<?php // include("templates/rss.newfolder.php"); ?>
+<?php foreach($this->folders as $folder) { include($XEEDIR."components/ready/layout/rss.folder.php"); } ?>
+<?php foreach($this->recordings as $recording) { include($XEEDIR."components/ready/layout/rss.recording.php"); } ?>
</channel>
</rss>
View
145 components/ready/layout/listview.php
@@ -0,0 +1,145 @@
+<?php
+defined( 'parentFile' ) or die( 'No direct access! Olet väärässä paikassa!' );
+
+global $XEEDIR, $XEEURL;
+
+header("Content-Type: application/rss+xml");
+echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
+?>
+<rss version="2.0" xmlns:media="http://purl.org/dc/elements/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/">
+
+<item_template>
+<onClick>
+<script>
+ movieLink= getItemInfo(getFocusItemIndex(), "link");
+ playItemURL(movieLink, 0, "mediaDisplay");
+ </script>
+</onClick>
+</item_template>
+
+ <mediaDisplay name="onePartView"
+ showDefaultInfo="no" showHeader="no"
+ thumbnail="" sideLeftWidthPC="0" rowCount="28" columnCount="1"
+ itemPerPage="30" itemImageXPC="65" itemXPC="65" itemYPC="5"
+ itemWidthPC="50" itemHeightPC="3" backgroundColor="0:0:0"
+ itemBackgroundColor="80:80:80"
+ focusBorderColor="0:0:200" itemGapXPC=0 itemGapYPC=0
+ itemImageWidthPC="0" itemImageHeightPC="0" idleImageXPC="89"
+ idleImageYPC="8"
+ idleImageWidthPC="6"
+ idleImageHeightPC="10">
+
+ <idleImage>/tmp/usbmounts/sda1/scripts/xLive/image/busy1.png</idleImage>
+ <idleImage>/tmp/usbmounts/sda1/scripts/xLive/image/busy2.png</idleImage>
+ <idleImage>/tmp/usbmounts/sda1/scripts/xLive/image/busy3.png</idleImage>
+ <idleImage>/tmp/usbmounts/sda1/scripts/xLive/image/busy4.png</idleImage>
+ <idleImage>/tmp/usbmounts/sda1/scripts/xLive/image/busy5.png</idleImage>
+ <idleImage>/tmp/usbmounts/sda1/scripts/xLive/image/busy6.png</idleImage>
+ <idleImage>/tmp/usbmounts/sda1/scripts/xLive/image/busy7.png</idleImage>
+ <idleImage>/tmp/usbmounts/sda1/scripts/xLive/image/busy8.png</idleImage>
+
+
+
+<text redraw="yes" tailDots="yes" fontSize="14" lines="1"
+ offsetXPC="10" offsetYPC="65" widthPC="35" heightPC="5"
+ backgroundColor="0:0:0" foregroundColor="255:255:255">
+ <script>
+ getItemInfo(getFocusItemIndex(), "name");
+
+</script>
+
+ </text>
+ <text redraw="yes" tailDots="yes" fontSize="14" lines="1"
+ offsetXPC="10" offsetYPC="70" widthPC="35" heightPC="5"
+ backgroundColor="0:0:0" foregroundColor="255:255:255">
+ <script>
+
+ if(getItemInfo(getFocusItemIndex(), "xeeType")=="recording") {
+ getItemInfo(getFocusItemIndex(), "channel");
+ } else if(getItemInfo(getFocusItemIndex(), "xeeType")=="folder") {
+ koko=getItemInfo(getFocusItemIndex(), "size");
+ "Koko: "+koko;
+ } else {
+ "";
+ }
+
+</script>
+
+ </text>
+ <text redraw="yes" tailDots="yes" fontSize="14" lines="1"
+ offsetXPC="10" offsetYPC="75" widthPC="35" heightPC="5"
+ backgroundColor="0:0:0" foregroundColor="255:255:255">
+ <script>
+ if(getItemInfo(getFocusItemIndex(), "xeeType")=="recording") {
+ getItemInfo(getFocusItemIndex(), "startTime");
+ } else if(getItemInfo(getFocusItemIndex(), "xeeType")=="folder") {
+ maara=getItemInfo(getFocusItemIndex(), "recordingsCount");
+ "Nauhoituksia "+maara+" kpl";
+ } else {
+ "";
+ }
+
+</script>
+
+ </text>
+ <text redraw="yes" tailDots="yes" fontSize="14" lines="1"
+ offsetXPC="10" offsetYPC="80" widthPC="35" heightPC="5"
+ backgroundColor="0:0:0" foregroundColor="255:255:255">
+ <script>
+ if(getItemInfo(getFocusItemIndex(), "xeeType")=="recording") {
+
+kesto = getItemInfo(getFocusItemIndex(), "videolength");
+ "kesto: "+ kesto +" min";
+ } else {
+"";
+ }
+
+</script>
+
+ </text>
+ <image redraw="yes" offsetXPC=10 offsetYPC=25 widthPC=32.9 heightPC=33.2>
+ <script>
+ getItemInfo(getFocusItemIndex(), "thumbnail");
+ </script>
+ </image>
+
+ <image offsetXPC=10 offsetYPC=6.8 widthPC=20 heightPC=15>
+ <?php echo $XEEDIR; ?>images/logo_small.jpg
+ </image>
+
+<onUserInput>
+userInput = currentUserInput();
+
+
+ /* OPEN LISTVIEW */
+ if ( userInput == "2" ) {
+ showIdle();
+ url = "<?php echo $XEEURL ?>ready.php?view=coverflow";
+ jumpToLink("destination");
+ redrawDisplay();
+ ret;
+ }
+
+ </onUserInput>
+
+</mediaDisplay>
+
+<destination>
+ <link>
+ <script>
+ url;
+ </script>
+
+ </link>
+ </destination>
+
+<channel>
+<title>Nauhoitukset</title>
+
+<?php // if($folderid!="") { include("templates/rss.prevfolder.php"); } ?>
+<?php // include("templates/rss.newfolder.php"); ?>
+<?php foreach($this->folders as $folder) { include($XEEDIR."components/ready/layout/rss.folder.php"); } ?>
+<?php foreach($this->recordings as $recording) { include($XEEDIR."components/ready/layout/rss.recording.php"); } ?>
+
+</channel>
+</rss>
View
30 components/ready/layout/rss.folder.php
@@ -0,0 +1,30 @@
+<?php
+/* Copyright Jaakko Lukkari 2011
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+?>
+<item>
+<title>Kansio: <?php echo $folder->name ?></title>
+<link><?php echo $XEEURL; ?>index.php?option=ready&amp;folder=<?php echo $folder->id; ?><?php if($this->folderid!="") { echo urlencode("&pfolder=").$this->folderid; } ?>&amp;view=<?php echo $this->view; ?></link>
+<media:thumbnail url="<?php echo $XEEDIR; ?>images/folder.jpg" />
+
+<xeeType><![CDATA[folder]]></xeeType>
+<id><?php echo $folder->id; ?></id>
+<name><![CDATA[Kansio: <?php echo $folder->name; ?>]]></name>
+<size><![CDATA[<?php echo $folder->size; ?>]]></size>
+<recordingsCount><![CDATA[<?php echo $folder->recordings_count; ?>]]></recordingsCount>
+
+</item>
View
26 components/ready/layout/rss.newfolder.php
@@ -0,0 +1,26 @@
+<?php
+/* Copyright Jaakko Lukkari 2011
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+?>
+<item>
+<title>UUSI HAKEMISTO</title>
+<name>Luo uusi kansio</name>
+<xeeType><![CDATA[newfolder]]></xeeType>
+<link></link>
+<media:thumbnail url="<?php echo $XEEURL; ?>images/new_folder.jpg" />
+<description></description>
+</item>
View
27 components/ready/layout/rss.prevfolder.php
@@ -0,0 +1,27 @@
+<?php
+/* Copyright Jaakko Lukkari 2011
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+?>
+<item>
+<title>..</title>
+<name>Edellinen kansio</name>
+<link><?php echo $XEEURL; ?>ready.php<?php if(isset($_GET['pfolder'])) { echo "?folder=".$_GET['pfolder']; } ?></link>
+<description></description>
+<xeeType><![CDATA[prevfolder]]></xeeType>
+<media:thumbnail url="<?php echo $XEEURL; ?>images/prevfolder.jpg" />
+
+</item>
View
41 components/ready/layout/rss.recording.php
@@ -0,0 +1,41 @@
+<?php
+/* Copyright Jaakko Lukkari 2011
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+?>
+<item>
+<title><?php echo urldecode ($recording->name); ?></title>
+<link></link>
+<media:thumbnail url="http://tvmedia16.pa.saunalahti.fi/thumbnails/<?php echo $recording->program_id; ?>.jpg" />
+
+<link><?php echo $XEEURL; ?>watch.php?id=<?php echo $recording->program_id; ?></link>
+
+<enclosure type="video/mpeg" url="<?php echo $XEEURL; ?>watch.php?id=<?php echo $recording->program_id; ?>"/>
+<xeeType><![CDATA[recording]]></xeeType>
+<id><?php echo $recording->id; ?></id>
+<programId><?php echo $recording->program_id; ?></programId>
+<folderId><?php echo $recording->folder_id; ?></folderId>
+<name><![CDATA[<?php echo urldecode ($recording->name); ?>]]></name>
+<channel><![CDATA[<?php echo $recording->channel; ?>]]></channel>
+<startTime><![CDATA[<?php echo $recording->start_time; ?>]]></startTime>
+<timestamp><![CDATA[<?php echo $recording->timestamp; ?>]]></timestamp>
+<viewcount><![CDATA[<?php echo $recording->viewcount; ?>]]></viewcount>
+<videolength><?php echo $recording->length; ?></videolength>
+<description><![CDATA[Ei vielä implementoitu]]></description>
+
+
+
+</item>
View
4 libs/mvc/c.php
@@ -16,7 +16,7 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
defined( 'parentFile' ) or die( 'No direct access! Olet väärässä paikassa!' );
-class XRuutuController {
+class XElisaViihdeController {
private $model=null;
private $view=null;
private $layout=null;
@@ -65,4 +65,4 @@ function execute($command) {
}
-}
+}
View
14 libs/mvc/m.php
@@ -16,19 +16,19 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
defined( 'parentFile' ) or die( 'No direct access! Olet väärässä paikassa!' );
-class XRuutuModel {
+class XElisaViihdeModel {
- private $ruutu =null;
+ private $elisaviihde =null;
- function __construct($ruutu) {
+ function __construct($elisaviihde) {
- $this->ruutu=$ruutu;
+ $this->elisaviihde=$elisaviihde;
}
- function getRuutu() {
- return $this->ruutu;
+ function getElisaViihde() {
+ return $this->elisaviihde;
}
-}
+}
View
4 libs/mvc/v.php
@@ -16,7 +16,7 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
defined( 'parentFile' ) or die( 'No direct access! Olet väärässä paikassa!' );
-class XRuutuView {
+class XElisaViihdeView {
private $model=null;
private $layout=null;
@@ -67,4 +67,4 @@ function render($tmpl='default') {
-}
+}

0 comments on commit e25687d

Please sign in to comment.