diff -ur mythtv.org/libs/libmythtv/tv_play.cpp mythtv/libs/libmythtv/tv_play.cpp
old
|
new
|
|
222 | 222 | { |
223 | 223 | if (curProgram) |
224 | 224 | { |
| 225 | /* If PrePlaybackCmd defined then blindly execute prior to starting recording playback */ |
| 226 | /* eg: 'lights_dim.sh &' */ |
| 227 | /* Append '&' to command to prevent blocking */ |
| 228 | QString preplayback_cmd = gContext->GetSetting("PrePlaybackCmd", ""); |
| 229 | if (!preplayback_cmd.isEmpty()) |
| 230 | { |
| 231 | VERBOSE(VB_PLAYBACK, QString("Executing pre-playback command: " + preplayback_cmd)); |
| 232 | myth_system(preplayback_cmd); |
| 233 | } |
| 234 | |
225 | 235 | VERBOSE(VB_PLAYBACK, LOC + "tv->Playback() -- begin"); |
226 | 236 | if (!tv->Playback(*curProgram)) |
227 | 237 | quitAll = true; |
… |
… |
|
229 | 239 | } |
230 | 240 | else if (RemoteGetFreeRecorderCount()) |
231 | 241 | { |
| 242 | /* If PrePlaybackCmd defined then blindly execute prior to starting livetv playback */ |
| 243 | QString preplayback_cmd = gContext->GetSetting("PrePlaybackCmd", ""); |
| 244 | if (!preplayback_cmd.isEmpty()) |
| 245 | { |
| 246 | VERBOSE(VB_PLAYBACK, QString("Executing pre-playback command: " + preplayback_cmd)); |
| 247 | myth_system(preplayback_cmd); |
| 248 | } |
| 249 | |
232 | 250 | VERBOSE(VB_PLAYBACK, LOC + "tv->LiveTV() -- begin"); |
233 | 251 | if (!tv->LiveTV(showDialogs, startInGuide)) |
234 | 252 | { |
… |
… |
|
1067 | 1085 | TV::exit(0); |
1068 | 1086 | TV::wait(); |
1069 | 1087 | |
| 1088 | /* If PostPlaybackCmd defined then blindly execute when recording or livetv playback complete */ |
| 1089 | /* eg: 'lights_on.sh &' */ |
| 1090 | QString postplayback_cmd = gContext->GetSetting("PostPlaybackCmd", ""); |
| 1091 | if (!postplayback_cmd.isEmpty()) |
| 1092 | { |
| 1093 | VERBOSE(VB_PLAYBACK, QString("Executing post-playback command: " + postplayback_cmd)); |
| 1094 | myth_system(postplayback_cmd); |
| 1095 | } |
| 1096 | |
1070 | 1097 | VERBOSE(VB_PLAYBACK, "TV::~TV() -- lock"); |
1071 | 1098 | |
1072 | 1099 | // restore window to gui size and position |
diff -ur mythtv.org/programs/mythfrontend/main.cpp mythtv/programs/mythfrontend/main.cpp
old
|
new
|
|
813 | 813 | } |
814 | 814 | } |
815 | 815 | |
| 816 | /* If PrePlaybackCmd defined then blindly execute prior to starting video playback */ |
| 817 | /* eg: 'lights_dim.sh &' */ |
| 818 | /* Append '&' to command to prevent blocking */ |
| 819 | QString preplayback_cmd = gContext->GetSetting("PrePlaybackCmd", ""); |
| 820 | if (!preplayback_cmd.isEmpty()) |
| 821 | { |
| 822 | VERBOSE(VB_PLAYBACK, QString("Executing pre-playback command: " + preplayback_cmd)); |
| 823 | myth_system(preplayback_cmd); |
| 824 | } |
| 825 | |
816 | 826 | TV::StartTV(pginfo); |
817 | 827 | |
| 828 | /* If PostPlaybackCmd defined then blindly execute when video playback complete */ |
| 829 | /* eg: 'lights_on.sh &' */ |
| 830 | QString postplayback_cmd = gContext->GetSetting("PostPlaybackCmd", ""); |
| 831 | if (!postplayback_cmd.isEmpty()) |
| 832 | { |
| 833 | VERBOSE(VB_PLAYBACK, QString("Executing post-playback command: " + postplayback_cmd)); |
| 834 | myth_system(postplayback_cmd); |
| 835 | } |
| 836 | |
818 | 837 | res = 0; |
819 | 838 | |
820 | 839 | sleep(1); |