summaryrefslogtreecommitdiffstats
path: root/abs/core-testing
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core-testing')
-rw-r--r--abs/core-testing/tweaker/PKGBUILD2
-rwxr-xr-xabs/core-testing/tweaker/bin/twk_general.pl106
2 files changed, 58 insertions, 50 deletions
diff --git a/abs/core-testing/tweaker/PKGBUILD b/abs/core-testing/tweaker/PKGBUILD
index e38f247..f546293 100644
--- a/abs/core-testing/tweaker/PKGBUILD
+++ b/abs/core-testing/tweaker/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=tweaker
pkgver=1
-pkgrel=26
+pkgrel=29
pkgdesc=""
arch=('i686' 'x86_64')
diff --git a/abs/core-testing/tweaker/bin/twk_general.pl b/abs/core-testing/tweaker/bin/twk_general.pl
index 0255852..5b48bda 100755
--- a/abs/core-testing/tweaker/bin/twk_general.pl
+++ b/abs/core-testing/tweaker/bin/twk_general.pl
@@ -33,7 +33,7 @@ sub implement_option {
# keymap tweaks
"twk_keymap.sh"
);
-
+
foreach my $command (@commands) {
if (my $error = execute_shell_command($command)) {
my $logger = get_logger('tweaker.script');
@@ -43,13 +43,13 @@ sub implement_option {
}
return 1;
}
-
+
# Enhance the default MythTV SQL
sub SQL_tweaks {
my($option) = @_;
$dbconnectionstring = get_mythtv_connection_string();
-
+
if (connect_to_db("DBI:mysql:$dbconnectionstring")) {
# ??? This also exists in mkmythdir - it should be centralized
my $SQL_DirData="/myth"; # Top level dir. of structure,
@@ -59,7 +59,7 @@ sub implement_option {
my $SQL_DirPics="$SQL_DirData/gallery"; # Pictures directory.
my $SQL_DirTmp="$SQL_DirData/tmp"; # DVD temp
my $SQL_DirVideo="$SQL_DirData/video"; # videos
-
+
# ??? Eventually, put these into a text file so that 1) people can contribute without having to code, and 2) the data
# stays separate from the code and can be re-used by other (non-Perl) implementations
@@ -78,9 +78,9 @@ sub implement_option {
change_or_make_entry("keybindings", [["keylist", "F"]], [["context", "Stream"], ["action","FULLSCREEN"]]);
change_or_make_entry("keybindings", [["keylist", "|,\\,F9,Volume Mute"]], [["context", "Stream"], ["action","MUTE"]]);
change_or_make_entry("keybindings", [["keylist", "Y"]], [["context", "Stream"], ["action","STOREMARKED"]]);
-
+
change_or_make_entry("keybindings", [["keylist", "l"]], [["context", "TV Frontend"], ["action","PLAYBACK"]]);
-
+
change_or_make_entry("keybindings", [["keylist", "l"]], [["context", "TV Playback"], ["action","PLAY"]]);
change_or_make_entry("keybindings", [["keylist", "P"]], [["context", "TV Playback"], ["action","PAUSE"]]); # default, but here for completeness
@@ -95,7 +95,7 @@ sub implement_option {
foreach my $non_video_ext ("jpg", "par2") {
change_or_make_entry("videotypes", [["f_ignore", "1"]], [["extension", $non_video_ext]]);
}
-
+
#
# games, game players, and emulators
#
@@ -164,7 +164,7 @@ sub implement_option {
change_or_make_entry("profilegroups", [["name", "Freebox Input"], ["cardtype", "Freebox"], ["is_default", 1]], [["id", 10]]);
change_or_make_entry("profilegroups", [["name", "HDHomeRun Recorders"], ["cardtype", "HDHOMERUN"], ["is_default", 1]], [["id", 11]]);
change_or_make_entry("profilegroups", [["name", "CRC IP Recorders"], ["cardtype", "CRC_IP"], ["is_default", 1]], [["id", 12]]);
-
+
do_query("INSERT INTO codecparams (profile, name, value) VALUES (21, 'transcodelossless', 0)");
do_query("INSERT INTO codecparams (profile, name, value) VALUES (21, 'transcoderesize', 0)");
do_query("INSERT INTO codecparams (profile, name, value) VALUES (21, 'mpeg4bitrate', 2200)");
@@ -332,35 +332,36 @@ sub implement_option {
change_or_make_setting('EndOfRecordingExitPrompt','1');
change_or_make_setting('GalleryDir', $SQL_DirPics);
change_or_make_setting('GalleryRecursiveSlideshow', '1');
- change_or_make_setting('HaltCommand', 'sudo /sbin/halt');
- change_or_make_setting('HostAudiotype','ALSA');
- change_or_make_setting('HostMiro','1');
- change_or_make_setting('HostXine','1');
- change_or_make_setting('Hostpluginmythappletrailers','1');
- change_or_make_setting('Hostpluginmytharchive','1');
- change_or_make_setting('Hostpluginmythbrowser','1');
- change_or_make_setting('Hostpluginmythcontrols','1');
- change_or_make_setting('Hostpluginmythflix','1');
- change_or_make_setting('Hostpluginmythgallery','1');
- change_or_make_setting('Hostpluginmythgame','1');
- change_or_make_setting('HostpluginmythgameFceu','1');
- change_or_make_setting('HostpluginmythgameMame','1');
- change_or_make_setting('HostpluginmythgameMame','1');
- change_or_make_setting('HostpluginmythgameROMDB','1');
- change_or_make_setting('HostpluginmythgameXE','1');
- change_or_make_setting('HostpluginmythgameZsnes','1');
- change_or_make_setting('HostpluginmythgameZsnes','1');
- change_or_make_setting('Hostpluginmythmovietime','1');
- change_or_make_setting('Hostpluginmythmusic','1');
- change_or_make_setting('Hostpluginmythnews','1');
- change_or_make_setting('Hostpluginmythphone','1');
- change_or_make_setting('Hostpluginmythsmolt','1');
- change_or_make_setting('Hostpluginmythstream','1');
- change_or_make_setting('Hostpluginmythvideo','1');
- change_or_make_setting('Hostpluginmythvideo_dvdcss','0');
- change_or_make_setting('Hostpluginmythvideo_dvdcss','0');
- change_or_make_setting('Hostpluginmythvodka','1');
- change_or_make_setting('Hostpluginmythweather','1');
+#------------------------JM---------------------------
+ change_or_make_setting('HaltCommand', 'sudo /sbin/halt');
+# change_or_make_setting('HostAudiotype','ALSA');
+# change_or_make_setting('HostMiro','1');
+# change_or_make_setting('HostXine','1');
+# change_or_make_setting('Hostpluginmythappletrailers','1');
+# change_or_make_setting('Hostpluginmytharchive','1');
+# change_or_make_setting('Hostpluginmythbrowser','1');
+# change_or_make_setting('Hostpluginmythcontrols','1');
+# change_or_make_setting('Hostpluginmythflix','1');
+# change_or_make_setting('Hostpluginmythgallery','1');
+# change_or_make_setting('Hostpluginmythgame','1');
+# change_or_make_setting('HostpluginmythgameFceu','1');
+# change_or_make_setting('HostpluginmythgameMame','1');
+# change_or_make_setting('HostpluginmythgameMame','1');
+# change_or_make_setting('HostpluginmythgameROMDB','1');
+# change_or_make_setting('HostpluginmythgameXE','1');
+# change_or_make_setting('HostpluginmythgameZsnes','1');
+# change_or_make_setting('HostpluginmythgameZsnes','1');
+# change_or_make_setting('Hostpluginmythmovietime','1');
+# change_or_make_setting('Hostpluginmythmusic','1');
+# change_or_make_setting('Hostpluginmythnews','1');
+# change_or_make_setting('Hostpluginmythphone','1');
+# change_or_make_setting('Hostpluginmythsmolt','1');
+# change_or_make_setting('Hostpluginmythstream','1');
+# change_or_make_setting('Hostpluginmythvideo','1');
+# change_or_make_setting('Hostpluginmythvideo_dvdcss','0');
+# change_or_make_setting('Hostpluginmythvideo_dvdcss','0');
+# change_or_make_setting('Hostpluginmythvodka','1');
+# change_or_make_setting('Hostpluginmythweather','1');
change_or_make_setting('JobAllowCommFlag', '1');
change_or_make_setting('JobAllowTranscode', '1');
change_or_make_setting('JobAllowUserJob1', '1');
@@ -375,8 +376,8 @@ sub implement_option {
change_or_make_setting('JobsRunOnRecordHost','0');
change_or_make_setting('LiveTVInAllPrograms','1');
change_or_make_setting('MasterMixerVolume','100');
- change_or_make_setting('MasterServerIP', '127.0.0.1');
- change_or_make_setting('MasterServerPort', '6543');
+# change_or_make_setting('MasterServerIP', '127.0.0.1');
+# change_or_make_setting('MasterServerPort', '6543');
change_or_make_setting('MediaChangeEvents','1');
change_or_make_setting('MonitorDrives', '1');
change_or_make_setting('MusicLocation', $SQL_DirMusic);
@@ -432,7 +433,7 @@ sub implement_option {
change_or_make_setting('WOLslaveBackendsCommand','');
change_or_make_setting('WakeupTimeFormat','hh:mm yyyy-MM-dd');
change_or_make_setting('WatchTVGuide','0');
- change_or_make_setting('WeatherDBSchemaVer','1000');
+# change_or_make_setting('WeatherDBSchemaVer','1000');
change_or_make_setting('WebBrowserCommand','/usr/bin/mythbrowser');
change_or_make_setting('WebBrowserHideScrollbars','0');
change_or_make_setting('WebBrowserScrollMode','1');
@@ -477,14 +478,20 @@ sub implement_option {
# change_or_make_entry("weathersourcesettings", [["sourceid", "5"], ["source_name", "NDFD-18_hour"], ["update_timeout", "900"], ["retrieve_timeout", "30"], ["path", "/usr/share/mythtv/mythweather/scripts/ndfd18.pl"], ["author", "Lucien Dunning"], ["version", "0.1"], ["email", "ldunning\@gmail.com"], ["types", "18hrlocation,updatetime,temp-0,temp-1,temp-2,temp-3,temp-4,temp-5,18icon-0,18icon-1,18icon-2,18icon-3,18icon-4,18icon-5,pop-0,pop-1,pop-2,pop-3,pop-4,pop-5,time-0,time-1,time-2,time-3,time-4,time-5"]]);
# change_or_make_entry("weathersourcesettings", [["sourceid", "6"], ["source_name", "NWS-Alerts"], ["update_timeout", "600"], ["retrieve_timeout", "30"], ["path", "/usr/share/mythtv/mythweather/scripts/nws-alert.pl"], ["author", "Lucien Dunning"], ["version", "0.1"], ["email", "ldunning\@gmail.com"], ["types", "swlocation,updatetime,alerts"]]);
# change_or_make_entry("weathersourcesettings", [["sourceid", "7"], ["source_name", "NWS-XML"], ["update_timeout", "900"], ["retrieve_timeout", "30"], ["path", "/usr/share/mythtv/mythweather/scripts/nwsxml.pl"], ["author", "Lucien Dunning"], ["version", "0.2"], ["email", "ldunning\@gmail.com"], ["types", "cclocation,station_id,latitude,longitude,observation_time,observation_time_rfc822,weather,temperature_string,temp,relative_humidity,wind_string,wind_dir,wind_degrees,wind_speed,wind_gust,pressure_string,pressure,dewpoint_string,dewpoint,heat_index_string,heat_index,windchill_string,windchill,visibility,weather_icon,appt,wind_spdgst"]]);
-
+
my $ipaddress = execute_shell_command("ifconfig | grep inet.addr | head -1");
$ipaddress =~ s/.*inet addr:(\d+.\d+.\d+.\d+)\s.*/$1/g;
- # Change from the generic IP address to the real one.
- do_query("UPDATE settings SET data='$ipaddress' where data='127.0.0.1'");
- do_query("UPDATE settings SET data='$ipaddress' where data='MythTVip'"); # ??? needed?
-
+
+
+
+
+
+#-------------------jm
+# # Change from the generic IP address to the real one.
+# do_query("UPDATE settings SET data='$ipaddress' where data='127.0.0.1'");
+# do_query("UPDATE settings SET data='$ipaddress' where data='MythTVip'"); # ??? needed?
+
my $hostname = execute_shell_command("hostname") || "localhost";
# one table at a time, replace hostname with our actual hostname
# ??? can this be done all at once in MySQL?
@@ -497,6 +504,7 @@ sub implement_option {
# There are fewer entries that stay NULL than there are that should have the hostname set, so while
# it duplicates some effort to change them from NULL to the hostname and them back to NULL, it's
# easier to maintain and more future-proof.
+
foreach my $entry ("mythfilldatabaseLastRunStart", "mythfilldatabaseLastRunEnd", "mythfilldatabaseLastRunStatus",
"DataDirectMessage", "HaveRepeats", "DBSchemaVer", "DefaultTranscoder", "MythFillSuggestedRunTime",
"MythFillGrabberSuggestsTime", "MasterServerIP", "MasterServerPort", "TVFormat", "VbiFormat", "FreqTable",
@@ -519,10 +527,10 @@ sub implement_option {
"mythvideo.DBSchemaVer", "WeatherDBSchemaVer") {
do_query("UPDATE settings SET hostname=NULL WHERE value='$entry'");
}
-
+
change_or_make_setting('MasterBackendOverride','1'); # I don't remember why, but making the hostname NULL is important here
do_query("UPDATE settings SET hostname=NULL WHERE value='MasterBackendOverride'");
-
+
# storagegroup
change_or_make_entry("storagegroup", [["groupname", "Default"], ["hostname", $hostname], ["dirname", $SQL_DirTV]], [["id", 1]]);
@@ -531,13 +539,13 @@ sub implement_option {
#
#change_or_make_entry("websites", [["grp", "LinHeS"], ["dsc", ""], ["updated", ""]], [["url", "http://knoppmyth.net"]]);
#change_or_make_entry("websites", [["grp", "LinHeS"], ["dsc", ""], ["updated", ""]], [["url", "http://knoppmythwiki.org"]]);
-
+
disconnect_from_db();
# Fix hostname for iPod feed URLs
$command = "sed -i \"s/hostname\\//$hostname\\//g\" /usr/local/bin/myth2ipod";
execute_shell_command($command);
-
+
# Fix hostname for XViD feed URLs
$command = "sed -i \"s/192.168.0.222\\//$hostname\\//g\" /usr/local/bin/myt2xvid3";
execute_shell_command($command);