#422 Icecast radio plugin

Freevo 1.x series
closed
nobody
Plugins (215)
5
2009-05-17
2009-03-10
Ian Denton
No

Adds a list of available icecast streams from http://dir.xiph.org

I had to add mplayer options to get it play the AAC/AAC+ & OGG streams

Discussion

  • Duncan Webb

    Duncan Webb - 2009-03-14

    Hi Ian,

    First many thanks for the plug-in.

    However there a few problems with the plug-in, don't take this negatively that is not the intention.

    The plug-in interface needs a constructor which calls the "plugin.MainMenuPlugin.__init__(self)" method, this then allows the config method to be processed.
    Exceptions are better avoided where possible so code like this can be avoided:
    try:
    self.cache_ttl = int(config.ICECAST_TTL)
    except:
    self.cache_ttl=3600
    The reasoning is that the has been set by the config method and if a person has set 'abc' then it is better to let the plug-in bomb out so the person can see the error.

    The definition "def __init__(self, ..., genremap = {}, bitrates = {}):" has uses a shared object for the genremap and bitrates, this is a python gotcha, the solution is to use None and then set self.genremap = genremap or {}. BTW this got me for days doing the same thing with a list.

    The only other thing is the white space usage I like it to be consistent and follow the freevo convention, so three lines between classes and two lines between methods and spaces after commas and around operators. Except for default arguments where no space around the "=".

    Thanks again,
    Duncan

     
  • Duncan Webb

    Duncan Webb - 2009-04-11
    • milestone: --> Freevo 1.x series
    • status: open --> pending
     
  • Duncan Webb

    Duncan Webb - 2009-04-11

    Hi Ian,

    Just a reminder about the plug-in. It needs to conform to Freevo coding standard before it is added to svn.

    Cheers,
    Duncan

     
  • Ian Denton

    Ian Denton - 2009-04-13
    • status: pending --> open
     
  • Ian Denton

    Ian Denton - 2009-04-13

    Hi Duncan,

    Thanks for the feedback.

    I've added the __init__ to the PluginInstance, removed the exception handling around the config variables, and believe I correct the white spacing to be consistent with your code.

     
  • Ian Denton

    Ian Denton - 2009-04-13

    Corrections applied

     
  • Duncan Webb

    Duncan Webb - 2009-05-02

    Many thanks Ian,

    This plug-in is now in svn at r11463

     
  • Duncan Webb

    Duncan Webb - 2009-05-02
    • status: open --> pending
     
  • SourceForge Robot

    • status: pending --> closed
     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks