Permalink
Browse files

Added better handling to Seeker when starting a recording and no dire…

…ctories are selectable for the desired encoder.
  • Loading branch information...
1 parent e37f79e commit 8c57ab51f94d1ec4626ba0af6d7eb21a13515a95 @enternoescape enternoescape committed Jan 4, 2017
Showing with 14 additions and 2 deletions.
  1. +1 −0 CHANGELOG.md
  2. +2 −1 i18n/SageTVCoreTranslations.properties
  3. +11 −1 java/sage/Seeker.java
View
@@ -3,6 +3,7 @@
## Version 9.0.13 (??)
* Fix: Schedules Direct was unable to distinguish between two lineups with the exact same name.
* Fix: Added handling for an unknown regular expression Schedules Direct was providing for the postal code for a few countries. The code also now skips the check if it does not recognize the regex formatting.
+* Fix: Added better handling to Seeker when starting a recording and no directories are selectable for the desired encoder.
## Version 9.0.12 (2016-12-22)
* New: Schedules Direct now includes teams as people for favorite scheduling.
@@ -167,7 +167,7 @@ PLAYBACK_FAILED_NULL_AIRING=There was a null object requested to playback
PLAYBACK_FAILED_NO_PLAYLIST_RANDOM_ACCESS=Random access into playlists is currently not supported
PLAYBACK_FAILED_PLAYLIST_OVER=There are no more items left in the Playlist to play
PLAYBACK_FAILED_SURF_CONTEXT=Channel surfing request was made from an invalid state
-PLAYBACK_FAILED_NETWORK_ERROR=The playback request could not be completed due to a nework failure
+PLAYBACK_FAILED_NETWORK_ERROR=The playback request could not be completed due to a network failure
PLAYBACK_FAILED_FORCE_REQUEST_WITHOUT_CONTROL=Cannot forcibly change channel without having control of the encoder
PLAYBACK_FAILED_NO_MEDIA_PLAYER_FOR_TIMESHIFTED_FILE=There is no MediaPlayer that can playback the selected file while it's being recorded
PLAYBACK_FAILED_NO_MEDIA_PLAYER_FOR_FILE=There is no MediaPlayer that can playback the selected file
@@ -277,6 +277,7 @@ CAPTURE_ERROR_SW_VIDEO_COMPRESSION=There was a problem setting up software video
CAPTURE_ERROR_HW_VIDEO_COMPRESSION=There was a problem setting up hardware video compression. Please be sure you have the latest drivers installed for your capture device, and that they are installed correctly.
CAPTURE_ERROR_SW_AUDIO_COMPRESSION=There was a problem setting up software audio compression.
CAPTURE_ERROR_FILESYSTEM=There was a problem accessing the filesystem for capture.
+CAPTURE_ERROR_NO_RECORDING_DIRECTORY=There are no directories available to the selected encoder.
DVD=DVD
Playback=Playback
Capture=Capture
View
@@ -2357,6 +2357,10 @@ else if (currQuality != null)
{
VideoStorage bestStore = findBestStorageForSize(spaceMaybeNeeded, encState.capDev.getForcedVideoStoragePrefix());
if (Sage.DBG) System.out.println("VideoStorage for new file: " + bestStore);
+ if (bestStore == null) {
+ encState.doingStartup = false;
+ throw new IllegalArgumentException(Sage.rez("CAPTURE_ERROR_NO_RECORDING_DIRECTORY"));
+ }
sage.media.format.ContainerFormat cf = mmcConn.getEncoderMediaFormat();
encState.currRecordFile = wiz.addMediaFile(encState.currRecord, currTime, bestStore.videoDir.toString(),
fileQualityName, mmcConn.getProviderID(),
@@ -4539,8 +4543,14 @@ else if (!es.capDev.wantsDataScanning(es.capDev.getActiveInput()))
{
Object[] currStartData = pendingStarts.elementAt(i);
if (Sage.DBG) System.out.println("Change in record to another show. Entering device record mode. - NOW");
- startRecord((EncoderState) currStartData[0], (Airing) currStartData[1],
+ try
+ {
+ startRecord((EncoderState) currStartData[0], (Airing) currStartData[1],
(Long) currStartData[2], (Boolean) currStartData[3]);
+ } catch (Throwable e) {
+ Catbert.distributeHookToAll(
+ "MediaPlayerError", new Object[] { Sage.rez("Capture"), e.getMessage() });
+ }
}
}

0 comments on commit 8c57ab5

Please sign in to comment.