Where to Save Downloads -- Best Practice?

Sivakatirswami katir at hindu.org
Mon Oct 9 19:56:05 EDT 2006


I have a Podcast App dedicated to a single feed.

to avoid issues with the player playing streaming
remote URL's (which is not working on many windows
machines)I used a download, save and play model,
as we know that playing media from the local hard
drive is quite solid.

But, now a new problem arises, some windows users
are complaining that the podcast appears to be
downloaded but can't be played. My script is simple
and works on the Mac where the downloaded file
ends up inside (unexpectedly) in the package contents
of the standalone on OSX...

Where, btw, Spotlight and Mac Finder "Find"
are unable to find it....causing me to be perplexed because
the download appeared fine, the audio played but I could
not find the file! the path returned by the filename
of this stack goes all the way down into
../Podcast.app/Contents/MacOS/Latest_Podcast.mp3
Fortunately the player in Rev has no problem with this path:
~/Desktop/Podcast.app/Contents/MacOS/Latest_Podcast.mp3

But, things are not happy on Windows:

-------------
# lots of download progress
# stuff goes on here:
# then:

ON saveURL gURL
   put the filename of this stack into tPath
   set the itemdel to "/"
   put "Lastest_Podcast.mp3" into item -1 of tPath
   put url gURL into url ("binfile:" & tPath)
   unload url gURL
   runPodcast tPath
END saveURL

  ON RunPodcast pPath
    set the cursor to arrow
      show player "player1" --with visual effect dissolve
      set the filename of player "player1" to pPath
      start player "player1"
      set the itemdel to ":"
      put item 1 of tDuration && "min. " & item 2 of tDuration && "sec." 
into tLength
     showstatus ("Title:" & cr &cr & tTitle & cr & cr & tLength),15
      show image "Gurudeva" with visual dissolve slowly
END runPodCast

------------------

Again, same old issue: This works fine on our old Del Running XP..
So, my in-house tests indicate "Looking Good on Windows--
OK to Ship...."

Then now I get a report from a Windows user
"It downloads but it will not play... "  On this same user's
machine they use another application I deploy which plays sound
files in Revolution, but they save the files manually to some other
directory on their box.  So, I'm thinking there is a problem with
writing to a protected directory?  Or does can windows be set to block
saving a file that was just downloaded via http?

So, I'm guessing now that saving  a downloaded cached URL
to the same directory as the standalone, may not be good practice.

Windows Wizards, please advise!

TIA

Sivakatirswami
www.himalayanacademy.com

Get Hinduism Today Digital Edition. It's Free!
http://www.hinduismtoday.com/digital/



More information about the use-livecode mailing list