problems with radio.cache file

Jeremy Nicoll - ml get_iplayer jn.ml.gti.91 at wingsandbeaks.org.uk
Wed Oct 23 14:15:07 EDT 2013


Using 2.83

I've been writing some code that reads the radio.cache file, and have found
three instances where the lines in the current file seem to have been split
across two records in the file - I'm guessing there's a LF or CR inside the
'desc' field in each case.

I'm not sure if this is a problem that affects perl, depending on how it
reads the cache and how it splits it into lines.  My program's not written
in perl and maybe did things differently.

Looking at the leftmost parts of the cache file lines I'm seeing:

10323|radio|BBC Introducing in York and North Yorkshire|p01jd341|Unkn...
.|BBC York|Entertainment,Radio|http://www.bbc.co.uk/iplayer/images/ep...
10324 ...
                                                                            
                                                            
11964|radio|Newshour|p01jns1c|Unknown|Guest Editor: UNDP chief & form...
.|BBC World Service|News,Radio|http://www.bbc.co.uk/iplayer/images/ep...
11965 ...
                                                                            
                                                           
12853|radio|The Drift|p01j0zhw|Unknown|20/10/2013 April Verch.|||defa...
Canada.|BBC Lancashire|Folk,Music,Radio|http://www.bbc.co.uk/iplayer/...
12854 ...


Putting it another way, when I look at the file, the index number on the
last record is <> the line number of the line (-10000), and out by more than
the difference of 1 you'd expect from the record layout line at the start of
the file.   The tv.cache file is fine.



I have a slight modification to get_iplayer that prefaces each line of
output with the date and time at which it executed, so my output from
commands is not the same as everyone else's.  Nevertheless if I do a search
for

  men from the min|the drift.*fiddling

(which should find two programmes - one that's not one of the three listed
above, and one that is), I get:

20131023 190318 Matches:

20131023 190318 12848:  The Drift - 20/10/2013 April Verch., BBC Lancashire,
Folk,Music,Radio, 0 dCanada.ours ago - April, the fiddling sensation from
the Ottawa Valley

- the key point here is that "Canada" has overlaid part of the line of
output.  It looks daft here, but in my cmd.exe window it showed up at the
start of a wrapped line.  "Canada" is really meant to follow "Ottawa Valley"
I think.

20131023 190318 12928:  The Men from the Ministry - Under the Weather, BBC
Radio 4 Extra, Comedy,Radio,Sitcoms, 0 days 5 hours ago - The outlook is
stormy for the dotty duo as they arrive at the Met Office.

- whereas this output, wrapping aside, is ok



-- 
Jeremy Nicoll - my opinions are my own.



More information about the get_iplayer mailing list