Changeset 93


Ignore:
Timestamp:
Jan 15, 2009, 4:06:13 PM (10 years ago)
Author:
sylvinus
Message:

jamendo app improvements

Location:
branches/communities/jamendo/applications/luci-jamendo
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/communities/jamendo/applications/luci-jamendo/luasrc/controller/jamendo.lua

    r82 r93  
    33
    44function index()
    5         local page = entry({"fon_services", "fon_jamendo"}, call("jamendo"), "Jamendo Radios", 90)
     5        local page = entry({"Jamendo"}, call("jamendo"), "Jamendo Radios", 90) -- {"fon_services", "fon_jamendo"}
    66        page.icon_path = "/luci-static/resources/icons/"
    77        page.icon = "jamendo.png"
     
    2525        local firsttime = false
    2626       
     27        local hwaddr = false
     28       
    2729        if not radioid then
    2830                firsttime = true
     
    3537                uci:commit("jamendo")
    3638               
    37                        
    38                 -- how to do this properly on install?
    39                 sys.call("chmod +x /usr/sbin/jamendoradio")
    40                
    41                
    42                
     39
    4340                local service = srv.Service("jamendoradio")
    4441                service:stop()
     
    6057       
    6158        if dolicense then
    62        
    63                 tpl.render("jamendo/license",{jamendo_fonid=42})
     59                hwaddr = sys.exec('ifconfig wifi0 | grep HWaddr | awk -F "HWaddr " \'{ print $2 }\' | awk \'{gsub(":","-",$1); print substr($0,0,17) }\'')
     60                tpl.render("jamendo/license",{jamendo_fonid=hwaddr,jamendo_test="aaa"})
    6461       
    6562        else
  • branches/communities/jamendo/applications/luci-jamendo/luasrc/view/jamendo/index.htm

    r82 r93  
    6161<div id="jamendo_change_radio">   
    6262
    63         <img style="float:right;" src="/luci-static/resources/jamendo/logo_small.png" />
     63        <a href="http://pro.jamendo.com/" target="_blank"><img style="border:0;float:right;" src="/luci-static/resources/jamendo/logo_small.png" /></a>
    6464
    6565
     
    107107
    108108        <div class="boxerror">
    109                 Radios are currently in DEMO mode. To play them legally in a commercial environment, <a href="<%=REQUEST_URI%>?jamendo_license=1">please buy a license now</a>.
     109                Radios are currently in DEMO mode. With Jamendo, you can <a href="<%=REQUEST_URI%>?jamendo_license=1">avoid paying your local collective rights society</a>.
    110110        </div>
    111111        <br/>
     
    123123
    124124        <div class="boxwarning">
    125                 Radios are currently in DEMO mode. To play them legally in a commercial environment, <a href="<%=REQUEST_URI%>?jamendo_license=1">please buy a license now</a>.
     125                Radios are currently in DEMO mode. With Jamendo, you can <a href="<%=REQUEST_URI%>?jamendo_license=1">avoid paying your local collective rights society</a>.
    126126        </div>
    127127       
  • branches/communities/jamendo/applications/luci-jamendo/luasrc/view/jamendo/license.htm

    r82 r93  
    1515<div id="jamendo_change_radio">   
    1616
    17         <iframe id="pro_jamendo_shop" src="http://fon.pro.localjamendo.com/product/publicspace?pro_partner_id=<%=PRO_PARTNER_ID%>" />
     17        <iframe id="pro_jamendo_shop" src="http://fon.pro.jamendo.com/product/publicspace?pro_partner_id=<%=jamendo_fonid%>" />
    1818
    1919</div>
  • branches/communities/jamendo/applications/luci-jamendo/root/etc/config/jamendo

    r30 r93  
    11config general radio
    2         option id lounge
    3         option autostart 1
     2        option id off
  • branches/communities/jamendo/applications/luci-jamendo/upgrade

    r92 r93  
    1212-- Dashboard Information
    1313local DASHBOARD = true          -- Show plugin on dashboard
    14 local DB_ICON   = "jamendo.png"  -- Plugin icon file relative to /luci-static/resources
     14local DB_ICON   = "icons/jamendo.png"  -- Plugin icon file relative to /luci-static/resources
    1515local DB_ORDER  = 1000          -- Plugin dashboard order number
    1616
     
    2020local fs = require "luci.fs"
    2121local dir = require "posix".getcwd()
     22local sys = require "luci.sys"
    2223
    2324-- Create Plugin object
     
    5455        fs.chmod(file, mode)
    5556end
     57
     58-- Just to be sure
     59sys.call("chmod +x /usr/sbin/jamendoradio")
Note: See TracChangeset for help on using the changeset viewer.