[ANSWERED] Raw Metadata Option
#1
I'm running get_iplayer 3.12.0 from a Windows 7 command prompt.

Would you consider adding a --metadataraw option that dumps to file the JavaScript object notation (json) files that get_iplayer already retrieves when downloading? That is: the clip or episode json, the playlist json, the version json, etc. It would also be useful to include a --metadataraw-ancestors option that, in addition, dumps to file the parent, grandparent and great-grandparent jsons that get_iplayer already retrieves when downloading a programme.

Some of these data appear in the metadata xml that get_iplayer creates when the --metadata option is specified, but some of it is discarded.

Since the BBC have stated that these files may become unavailable soon, it would be useful to grab the information before it's lost—particularly for channels that consist mainly of repeats such as BBC Four, CBBC, CBeebies and BBC Radio 4 Extra. A user may not want to download a programme now, but may want to keep the data to re-consider when it is inevitably repeated. It would also prove useful in general for when a user wants to search their local download folder by actor or writer, for example. The credits are available in the version jsons, but get_iplayer currently discards these data.

The dumped files could be saved alongside the downloaded programme and could be named by appending a suitable suffix to the --file-prefix. For example, suggestions for file-prefix suffixes for a clip:
  • <_pid>.json
  • <_pid>_playlist.json
  • <_pid><_version>_<version_id>.json
  • <_pid>_<parent_kind>_<parent_id>.json
    Where parent_kind is one of episode, series or brand. And with similar suffixes for grandparent and great-grandparent where these exist.
The <pid> and/or <version> parameters could be omited where the parameter already exist in the file-prefix.

The option could also include a dump to a text file of the stream information for the download. This information is currently available through the --streaminfo option, but this has to be run separately from the download command.
#2
Thanks for the suggestion, but I'm afraid the answer from me is no. Of course, you can implement any features you like if you take over as get_iplayer maintainer. I have no interest in turning get_iplayer into some kind of data provider, nor do I think it is a good idea. The --metadata and --streaminfo functionalities are from before my time. I should have axed them long ago, but it didn't seem worth the bother. Perhaps I should reconsider - few users would miss them. Those options merely provide crude dumps of internal state that are useless to the core functions of get_iplayer. You would be better off creating a proper tool for the job, something that catalogued your downloads in a form more useful than a bunch of JSON files. It might be useful to other users if, say, you created a tool that generated the sort of catalogue you want from the get_iplayer download history.
#3
OT perhaps...

But a great application for the Original Poster
would be to derive from the json file:
1) if the program is a repeat
2) if it is n of N in a series.

It's getting harder to find such info from the web site
- though it is often hidden in the json file

just my 2c s