Remote File Importer Add-In Updated For AT 2.5.1
  • image
    Fast Server to Server file importer for Airtime 2.5 e.g. From BlogTalkRadio
    13/Jan/2014

    An add-in for Airtime 2.51
    John Chewter info@coastal-computing.com

    This file is part of a 3 file solution.
    1/ ingest.php and progressclass.php should be placed in a NEW folder called: /usr/share/airtime/public/ingest/
    2/ index.phtml is a replacement for /usr/share/airtime/application/views/scripts/plupload/index.phtml
    MAKE A BACKUP COPY FIRST!!!!!!
    No longer using Airtime or Libretime.
  • 11 Comments sorted by
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi John,

    Thanks for posting the update! Would you like some code review to get this in shape for a pull request against official Airtime?

    Cheers!

    Daniel
  • Sure Daniel - Thanks.

    Note - They don't like iFrames but it seemed to be the simplest and least intrusive way to do this add-in. Seems working fine here. Very useful for importing my podcasts into AT which are typically 90MB+. Saves about 30mins per file.

    Idealy it should be re-written the AT way without iFrames and to style the button and integrated into the plupload index.phtml properly, I guess and with the supplimentary file in other paths. Its hard for me to dig through the AT code to do all that - so this was a quick cobble-up.


    Post edited by John Chewter at 2014-01-13 08:31:02
    No longer using Airtime or Libretime.
  • Maybe it should be integrated with my rss bulk importer as its all ingest stuff?
    No longer using Airtime or Libretime.
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    I would suggest breaking the contribution down into easily reviewed commits - for example, if it makes sense to do RSS first, please show us what changes that would need.

    Cheers!

    Daniel
  • RSS import is just a button to a bash script ( and installing a folder with a few script files) and maybe a simple text editor to edit a single text file.

    No other mods to airtime files required
    Post edited by John Chewter at 2014-01-13 12:51:58
    No longer using Airtime or Libretime.
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Have you considered putting the folder under utils (i.e. fork from https://github.com/sourcefabric/Airtime/tree/master/utils)? That might solve http://dev.sourcefabric.org/browse/CC-4134

    As for configuration of one or more RSS feed URLs in a text file, could those be options passed to the script on the command line? Ultimately you might wish to have these URLs as a preference in the admin interface, so that sysadmin intervention is not required to add or change a URL.

    I think we should probably take out the mp3gain feature because Airtime already does this, simpler is better. Also not every podcast is in mp3 format so it is better to handle this later.

    I like how eyeD3 makes the metadata on the file richer, but I am cautious about adding an extra dependency to Airtime that duplicates what mutagen does. We could use the command-line tool mid3v2 as a bridge between the script and mutagen, see: http://linux.die.net/man/1/mid3v2

    Cheers!

    Daniel
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    By the way, after installation of Airtime, mid3v2 is available in /usr/lib/airtime/airtime_virtualenv/bin/mid3v2 as we don't currently use the distro's (older) version of python-mutagen.
  • I am not a team member just a user trying to struggle by.

    I just used Ichapod more or less 'as is' with some pathing changes to make it usable with Airtime.
    The gain feature is de-selectable from the cmd line.

    My purpose was to make a tool that saves me hours per week and it does that.
    It was not intended, at this stage, as a fully integrated solution - just a bolt-on 'proof of concept' that works and does a job for me - that others may find useful.

    I am modifying Ichapod again today so that it will recode any mono tracks to stereo so Liquidsoap playout doesn't choke when it finds a mono file when playout is set to stereo. (Yes it does).

    I have other, more pressing, jobs to complete on other AT extensions to make my station far more usable - like an enhanced replacement for smartbock that will create complete shows for the rss feed (with Jingles & bumpers) - and - repeating shows for the same day.

    Post edited by John Chewter at 2014-01-14 10:30:55
    No longer using Airtime or Libretime.
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Sure, hacks are always welcome :-) My goal in trying to integrate these hacks is to make them easier to maintain, make them available to less technical users and hopefully save you work in the future.

    Cheers!

    Daniel
  • One of the problems I have with boltins is that there is no Plug-in Interface, full API info or menu extender.
    If there was (with the API and common variables exposed), it would force standards and AT might progress a lot faster as others make plugins.
    Post edited by John Chewter at 2014-01-14 07:32:59
    No longer using Airtime or Libretime.
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    It is true that there is no generic plug-in interface, but you could potentially add a feature anywhere in Airtime whereas a plug-in system might limit what you could achieve.

    The API is documented briefly in http://sourcefabric.booktype.pro/airtime-25-for-broadcasters/airtime-api-authentication/ but for the full list of actions it is best to read the code for now, for example:

    https://github.com/sourcefabric/Airtime/blob/master/airtime_mvc/application/controllers/ApiController.php

    As for a menu extender, you would have the same issue as with plugins, it would only allow you to add certain menu elements. If you want to add a new menu item, it might be easier just to add it directly to the menu you want.

    Cheers!

    Daniel