";
$service = (isset($_GET['edit'])?$_GET['edit']:(isset($_GET['restore'])?$_GET['restore']:(isset($_GET['default'])?$_GET['default']:"")));
if ($service != "") {
$tmp = preg_split("/ /",$service_ini_array[$service]['files']);
$service_cfg_file = $service_ini_array[$service]['cfg_file']."/".$tmp[0];
$service_tmp_file = $service_ini_array[$service]['tmp_file']."/".$tmp[0];
$service_archive_file = "$rootdir/.npkg/$npkg/".$service_ini_array[$service]['archive']."/".$tmp[0];
}
// MEDIA LISTS
if ($tab == 1) {
// Edit Media service
if (isset($_GET['edit'])) {
$msg = "";
// Save Media service files
if (isset($_POST['save_it'])) {
if (is_writable($service_cfg_file)) {
if ( ($fp = @fopen($service_cfg_file, "w")) !== false ) {
$set_count = false; $i = 0;
if ( isset($_POST['items']) ) {
// Check if field is empty or is the counter and delete it
foreach($_POST['items'] as $key=>$item)
if ( ( $item == "" ) || ( $item == "count") ) unset($_POST['items'][$key]);
// Write the section and counter if any
fwrite($fp, "[".$service_ini_array[$service]['section']."]\n");
if ($service_ini_array[$service]['counter'] != "")
fwrite($fp, $service_ini_array[$service]['counter']." = ".(count($_POST['items']))."\n");
// Sort the list and write
sort($_POST['items']);
foreach($_POST['items'] as $item) {
$i++; $data = "$i = $item\n";
fwrite($fp, $data);
}
}
fclose($fp);
// Copy into the service configuration backup file too
if ($service_tmp_file != "")
copy($service_cfg_file, $service_tmp_file);
// Keep a local copy of the last modification (for Restore function)
copy($service_cfg_file, $service_archive_file);
$msg = _EDIT_SAVED." ";
} else $msg = _EDIT_CANNOT_SAVE." ";
} else $msg = _EDIT_CANNOT_SAVE." ";
}
// Load Media service list
// If list has not yet been saved, do it
if ( !file_exists($service_cfg_file) && file_exists($service_tmp_file) )
copy($service_tmp_file, $service_cfg_file);
// Display configuration page (list)
echo "
";
} else echo "
"._NPKG_MEDIA_PICASA_EMPTY."";
} else if (file_exists($service_cfg_file)) {
// Save a copy of the source (for Default function)
if (!file_exists($service_cfg_file.".bak"))
copy($service_cfg_file, $service_cfg_file.".bak");
$media_array = parse_inifile($service_cfg_file);
// Display Internet Radio Scheduler
$chk_terms = ($service_ini_array['npkg']['RadioRecording'] && ($_GET['edit'] == 'netradio') ?true:false);
if (isset($media_array ))
if ($chk_terms) {
include(dirname(__FILE__)."/../../system/inc/scheduler.php");
echo "
";
// Restore last Media service list
} else if (isset($_GET['restore'])) {
$service = $_GET['restore'];
if (file_exists($service_archive_file)) {
copy($service_archive_file, $service_cfg_file);
if ($service_tmp_file != "" ) copy($service_archive_file, $service_tmp_file);
}
// For PICASA process the second configuration file
if ($service == "picasa") {
$service_cfg_file = $service_ini_array[$service]['cfg_file']."/".$tmp[1];
$service_tmp_file = $service_ini_array[$service]['tmp_file']."/".$tmp[1];
$service_archive_file = "$rootdir/.npkg/$npkg/".$service_ini_array[$service]['archive']."/".$tmp[1];
if (file_exists($service_archive_file)) {
copy($service_archive_file, $service_cfg_file);
if ($service_tmp_file != "" ) copy($service_archive_file, $service_tmp_file);
}
}
// Reset to default Media service list
} else if (isset($_GET['default'])) {
$service = $_GET['default'];
if (file_exists($service_cfg_file.".bak")) {
copy($service_cfg_file.".bak", $service_cfg_file);
if ($service_tmp_file != "") copy($service_cfg_file.".bak", $service_tmp_file);
}
// For PICASA process the second configuration file
if ($service == "picasa") {
$service_cfg_file = $service_ini_array[$service]['cfg_file']."/".$tmp[1];
$service_tmp_file = $service_ini_array[$service]['tmp_file']."/".$tmp[1];
$service_archive_file = "$rootdir/.npkg/$npkg/".$service_ini_array[$service]['archive']."/".$tmp[1];
if (file_exists($service_cfg_file.".bak")) {
copy($service_cfg_file.".bak", $service_cfg_file);
if ($service_tmp_file != "") copy($service_cfg_file.".bak", $service_tmp_file);
}
}
}
// Display Media Services list
if ( !isset($_GET['edit'])) {
echo "
";
}
// RADIO RECORDING
} else {
$chk_terms = ($service_ini_array['npkg']['RadioRecording']?"checked":"");
if (isset($_POST['setrecording'])) {
$value =(isset($_POST['terms'])?"TRUE":"FALSE");
$output = null; exec(CMD_SETCFG." 'npkg' 'RadioRecording' '$value' -f $rootdir/.npkg/$npkg/$npkg.ini",$output);
$chk_terms = (isset($_POST['terms'])?"checked":"");
}
echo "
";
}
?> media_services/inc/mnu-media_services.php 0000766 0000000 0000000 00000001664 11325775546 022017 0 ustar admin administrators ";
?> media_services/media_services.ini 0000766 0000000 0000000 00000007414 11330570701 020416 0 ustar admin administrators ;#################################
;
; ABSTRACT: NPKG parameters
;
; HISTORY:
; 2009/09/28 Written by Laurent (Ad'Novea)
;
; 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.
;
;#################################
;
[npkg]
; NPKG Plugin name
Name = Media Services
;
; NPKG Plugin version or software version for application
Version = 2.1
;
; Date of NPKG development of date of the application release
Date = 2010-01-20
;
; NPKG author /maintainer or application provider
Author = "AdNovea®"
;
; Hardware platform supported by the current NPKG (use space as list separator)
Models = NMP-1000
;
; Oldest OpenNMP installed version that could be used to run this NPKG
Engine = "0.04.01"
;
; NPKG Category (please keep consistency with already deployed plugins)
Category = Multimedia
;
; Dependencies from other NPKG. The NPKG dependencies will be installed before the current one in automatic mode (use space as list separator)
Dependencies =
;
; IPKG modules required in the order of installation (use space as list separator)
Ipkg = gettext glib libmad libogg libvorbis faad2 streamripper
;
; Script or program to Start/Stop. it will be linked in the /opt/etc/init.d directory for handling execution priority
Service =
;
; Process priority (above 99 for none system NPKG) . There can be 2 different values: first is for Start and second for Kill if needed (use space as list separator)
Priority = 100
;
; Status of the NPKG. Normally UNKOWN after a first installation. Can be set to TRUE for NPKG that does not need to be Enabled/Disabled
Enable = TRUE
;
; Enable Internet radio recording
RadioRecording = FALSE
;
; MD5 is managed by the NPKG installation procedure. Does not need to be given here
MD5 = e8450fbd5516cd66577db40dd2ff24a3
;
[scheduler]
;
; Internet Radio recorded files folder
audio_folder = "/share/Music/RRecording"
;
; Rip to single file and enable/disable also writing individual tracks [FALSE,TRUE]
audio_tracks = TRUE
;
[youtube]
; Files stored by the system
files = YouTube.conf
;
; Folder where files are stored by the system (may be updated only on reboot)
cfg_file = /mnt/config/.config
;
; Temporary folder where are stored files used by the player (current list)
tmp_file =
;
; OpenNMP backup folder for this media service
archive = inc
;
; Does the list has counter (name or leave empty)
counter =
;
; name of the section of the media service list
section = URL
;
; Maximum number of entries in the list (0=illimited)
limit = 14
;
; Link to the Media Service website
link = http://www.youtube.com/
;
; RSS link if any
RSS =
;
[apple]
; We are sorry, we have not yet found where the Apple Movies Trailers config is stored !
files =
cfg_file =
tmp_file =
archive =
counter =
section =
limit =
link = http://www.apple.com/trailers/
RSS = http://images.apple.com/trailers/home/rss/newtrailers.rss
[shoutcast]
files = shoutcast.conf
cfg_file = /mnt/config/.config
tmp_file = /tmp
archive = inc
counter = count
section = Genre
limit = 0
link = http://www.shoutcast.com/
[netradio]
files = netradio.conf
cfg_file = /mnt/config/.config
tmp_file = /tmp
archive = inc
counter = count
section = List
limit = 0
link = "http://forum.qnap.com/viewtopic.php?f=176&t=19868&start=0"
[flickr]
files = flickr.conf
cfg_file = /mnt/config/.config
tmp_file = /tmp
archive = inc
counter = count
section = List
limit = 0
link = http://www.flickr.com/
[picasa]
files = picasa_query3.xml picasa_key.txt
cfg_file = /mnt/config/.config
tmp_file = /tmp
archive = inc
counter =
section =
limit =
link = http://picasaweb.google.fr
media_services/images/ 0000777 0000000 0000000 00000000000 11327273337 016204 5 ustar admin administrators media_services/images/img-media_services_apple.png 0000766 0000000 0000000 00000003054 11324604617 023626 0 ustar admin administrators PNG
IHDR szz pHYs cHRM z% R X : oZ IDATxKlW͞'vǗ]'M
pAU$QV-@.RV, VH-!UKhi&&$=㱝/尨BɆw}}y=BJɽ==>Afn_]@|]UMRlT..Q,eOO+Oߕ0S nwNk;-_NP#JPSwτo\Hbv'Y.O *Mk
wn]#yz
ړwkұ/ ?+ibegb4˹sMt;4
^K,eŁ
UgNW,`6At
N2ZCԛ-NiR;0M?,
l[?]NbM$XvǣXvJH(~T67,_z_4Ǐ=(n+}i ;41L+TuUnP(lT:i-%b}+1,`56[ =G"g03 UHɸ-z<*(
f!H.<=ُxnIGѣ&0%:9~zixA@S캂qOP-aRQBl^#A_YNbDa<5-BÉO04wPy/ FIn,c-vES]ni8H4F`k4>D:r"J;mv
[#4RxwE5zkWH$i4\(]}եe.;*;yMfum` P.0'i]Bq6ByT*
Z
4I%bl\384r^z` GFPq4m[DXE"MRUXuk-F_jU`jb^cB=>v i
mӛhq]4C+7yd?r)o}oN6@,ӧ&X_$?14NYg~})K
a4^&m6X[Yf}}m})V(P(.#Y'鎐JNN-2Iӧ8y_8//^
|(ObWPB P WW!Rv.o|T*%
091.[(4I$h >x>x<|J{p9CW~Uα2]*{[
YYK;8*o_:gΜw܈ٯ~Ok4XUXd EJI
O"k3o5wM"sWɕ52?vL&bQ\&>ya"D:?5 IY
F* IENDB` media_services/images/img-media_services_netradio.png 0000766 0000000 0000000 00000002303 11324604617 024326 0 ustar admin administrators PNG
IHDR szz pHYs cHRM z% R X : oZ IIDATxėkLW/^*0Ќˌpya&4LMF"a"8Xfbo.eF1}
P!"2t%F-po}FR岝|y9ss$l^C}j *"-|ߊ2 ҪlvQ__dxd JŖ-NJ=|䀢(}M_U /Ǒ}D1@~lvFm(SS&?0111b[@QMmM-W( n nEJZZ*9HJ!DcZ&%%(겊k;֮]Kxc+"@yڵS PUuF|y$5lڰ2u95KsK8zP r-+&
_17)bUش!,&J888j7FFet6q "tpx"