Module:Lyrics2: Difference between revisions

Update due to separation of code and data in SongSource.js
m (*sigh*)
(Update due to separation of code and data in SongSource.js)
Line 150: Line 150:
   local s,e,t,t1,t2
   local s,e,t,t1,t2


   s,e,t = string.find(tstr, 'var%s+song_info%s-=%s-{(.-)};')
   s,e,t = string.find(tstr, '{(.+)}')
   if s ~= nil then
   if s ~= nil then
     for n,lst in string.gmatch(t, '"(.-[^\\])"%s-:%s-{(.-)}') do
     for n,lst in string.gmatch(t, '"(.-[^\\])"%s-:%s-{(.-)}') do
Line 193: Line 193:
     end
     end
     if common.isset(source) and common.isset(titlen) then
     if common.isset(source) and common.isset(titlen) then
       if info_list[source] ~= nil then
       if common.isset(info_list) and info_list[source] ~= nil then
         if common.isset(info_list[source][titlen]) then
         if common.isset(info_list[source][titlen]) then
           local extra = info_list[source][titlen]
           local extra = info_list[source][titlen]
Line 603: Line 603:
   local albumNames = getAlbumNames(albumList)
   local albumNames = getAlbumNames(albumList)
   local slist,cols = scanForStanzas(frame)
   local slist,cols = scanForStanzas(frame)
   local info_list = load_info('MediaWiki:SongSource.js')
   local info_list = load_info('MediaWiki:SongSource.json')


   -- allows to force a single-cell closing row
   -- allows to force a single-cell closing row
8,365

edits