DirCaster 0.9i Released Today!

Thanks to our PHP Coding Master, Henry Ratliff, for working out a way to add a great new feature to DirCaster!

We added “The Cloud Option” – A method of allowing media files to be stored in another location than in the DirCaster directory, for instance, in a Cloud storage location, like Amazon S3. This would also allow the use of Amazon Cloudfront to better distribute media world-wide.

The override ‘.txt’ tag [enclosureURL] DID NOT WORK in previous versions, it has been corrected in this new (.9i) version.

Optional: Made a sub-directory for the override text files. We used ‘override_files’ but, it can be configured. Placing all the files here makes things cleaner and avoids any problems with other types of text files. You can leave them in the DirCaster root, but rename any other .txt files \ from the directory you choose.

These variables are new to config_inc.php
$remoteMedia = 1; //1= remote, 0= current method
$overrideFileType = ‘.txt’;
$overrideFolder = ‘./override_files’. ‘/’;

You should be able to add these to any existing config_inc.php file to avoid re-doing the old config file.

See the included config_inc.php file for new installations, and documentation.

When using $remoteMedia = 1
Make sure to use the following variables
All these values are the same:
[link]https://yourmedialocation.yourdomain.com/yourfilename.m4v
[enclosureURL]https://yourmedialocation.yourdomain.com/yourfilename.m4v
[guid]https://yourmedialocation.yourdomain.com/yourfilename.m4v

You may use these new tags. The program will skip them if not valued:
[enclosureLength]10
[enclosureType]video/quicktime

For a $remoteMedia = 1
You should remove any media files, unless you point to them in an override text file. With $remoteMedia = 1, media can be anywhere including local to dircaster.php (full URL, not a relative path)

$enclosurePrefix still works the same as before.

6 comments

  • Error in v0.9i.

    Standard configuration file (config_inc.php).

    To match the directory, the line:
    $id3LibPath = “./lib_getlib3/getid3/getid3.php”;

    Should Read…

    $id3LibPath = “./lib_getid3/getid3/getid3.php”;

    The path is actually…
    OK: “./lib_getid3/getid3/getid3.php”;
    BAD: “./lib_getlib3/getid3/getid3.php”;

    Was subtle, so it was causing me some confusion on initial install.

  • Also noticed that the XML output of the file doesn’t take into account relative path names in the media dir….

    I was attempting to store the MP3 files in a my standard /mp3/…/ folder off my public_html root, but put the podcast into another root folder for simplicity, say, /dh/dircaster.php, so that the media folder came out to be “../mp3/…/”, but the XML leaves the relative path with the “/dh/../mp3/…” which still resolves, but leaves something to be desired!

    Nice program though!

  • Hey… Since I’m at it… If you want them, here’s two (2) feature requests…

    I’m looking at streaming around 200 sermons (not my own). They are for archival purposes of a well-known minister who doesn’t sell his own tapes and books, but someone else collected them, and so they are in the public domain. I notice the script times out with them all showing, so I was considering making “override files” for each of them…

    1) Would it be be in the scope of the project to have some extension of DirCaster GENERATE the override files automatically for me, even on a one-time basis? This, as opposed to writing an XSL file to translate the XML fragment I have and do it for me? This, I assume, would make the creation of the final RSS feed faster…

    2) Would it be advisable to cache the XML RSS feed to a file, optionally or automatically.. Even if the URL was still dircaster.php, but read the file and returned it, simply in the case where none of the files have changed? Perhaps 1 file for current “high water mark” of the oldest date for MP3s and overrides, plus 1 file for the current XML/RSS, which could simply be file_get_contents()’d and then dumped to the stdout? This might make my situation much more adaptable.

    Thanks!

  • One more comment, I hope it isn’t an issue..

    I modified the dircaster.php file to try a few things.. Specifically, I added a create_override() function in the ID3 class, and called in in the nonremote media dir function… then, I realized that it loaded the ID3 information regardless, so I modified that very slightly to only load the id3 object if there is no override file…

    For performance, I was only getting the first 44 of 213 files to load at all… After a “couple iterations”, the RSS feed loads now fine, and fast! Fast enough for my tastes, anyway..

    Anyway, I just thought if the mod was of interest to you, you could use my changes (link below).

    Take note, that, for my interests, I hard-coded the TRUE value into whether the override creation algorithm should be used, and also didn’t do nice things like verify the override directory (cuz it exists for me). There may likewise be some saftey things I did not address.

    As an additional side-note, it might be advisable to at least add to the $overrideFolder comment block an example in the form of:
    $overrideFolder = $mediaDir . ‘/override_files’. ‘/’;

    Where $mediaDir is pre-pended onto the path, which is what I ended up doing, and, I would guess, if it was the default, would suit the needs of at least 80% of users. Just a thought.

    Thanks again.

  • I have forwarded your comments on to our coder-in-chief and he is looking at it! Thanks for pointing out the issue!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.