X-Git-Url: https://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Ffunction%2FAsyncMediaLoader.java;h=f8a505aad164aeb85af3a9ca64f48cd6c6920428;hp=0365125b6e9e5133487e63790eb5948069683bf3;hb=f1b92378a792131ac8fb33a869405851d5b2d1f7;hpb=649c5da6ee1bbc590699e11a92316ece2ea8512d diff --git a/tim/prune/function/AsyncMediaLoader.java b/tim/prune/function/AsyncMediaLoader.java index 0365125..f8a505a 100644 --- a/tim/prune/function/AsyncMediaLoader.java +++ b/tim/prune/function/AsyncMediaLoader.java @@ -29,6 +29,8 @@ implements Runnable, Cancellable private String[] _linkArray = null; /** Track to use for connecting */ private Track _track = null; + /** Source file */ + private File _sourceFile = null; /** Cancelled flag */ private boolean _cancelled = false; @@ -38,13 +40,15 @@ implements Runnable, Cancellable * @param inApp App object * @param inLinkArray array of links * @param inTrack Track object for connecting points + * @param inSourceFile file from which data was loaded, if any */ - public AsyncMediaLoader(App inApp, File inZipFile, String[] inLinkArray, Track inTrack) + public AsyncMediaLoader(App inApp, File inZipFile, String[] inLinkArray, Track inTrack, File inSourceFile) { super(inApp); _zipFile = inZipFile; _linkArray = inLinkArray; _track = inTrack; + _sourceFile = inSourceFile; } /** @@ -84,6 +88,7 @@ implements Runnable, Cancellable if (numLinks <= 0) return; // Make progress dialog MediaLoadProgressDialog progressDialog = new MediaLoadProgressDialog(_app.getFrame(), this); + // Make array to store results MediaObject[] media = new MediaObject[numLinks]; int currLink = 0; @@ -91,7 +96,7 @@ implements Runnable, Cancellable { if (_linkArray[i] != null) { - MediaObject mf = MediaHelper.createMediaObject(_zipFile, _linkArray[i]); + MediaObject mf = MediaHelper.createMediaObject(_zipFile, _linkArray[i], _sourceFile); if (mf != null) { // attach media to point and set status