The archive should have a table to associate the audio node with the program it is a recording of. This table should also be used to select old audio for deletion. It would also make it easier for the schedule to link to recordings of a program rather than the current time it's scheduled at.

Knowing the audio program linkage would also allow the archive to do some form_alter business on the audio node and link in program info. Ideally, down the road, it'd be able to locate a playlist for the same date and link to that.

Comments

drewish’s picture

okay, got the table in there. next step is to do removals based on the import date in {station_archive} and make the taxonomy optional. then to add menu items to select audio nodes by program id. maybe the best way to present these would be via views...

mfb’s picture

FYI, I had some very weird timezone stuff due to _station_archive_add_file() and station_local_ts() when using station_archive.module,v 1.7.2.13 2006/09/29 17:15:30 drewish

I had the archive and schedule sites set to the same (Pacific) timezone; the archive server as a whole is running on UTC time.

The archive file for Oct 12th 7-8pm Pacific time is imported a little after 3am Oct 13th UTC. This is correct because its minus 7 hours. The taxonomy and filename are set correctly. but, $node->created is totally bogus: The node is set to Oct 12th 10am Pacific -- before the show even happened. 9 hours too early in fact.

I've just cvs updated and will see how things are...

mfb’s picture

OK the above problem seems to be fixed now! There's one small issue I still have with the latest 4.7 cvs code:

I have one instance of the archive module which is working fine, and another instance where the titles of the audio nodes are not being entered into the title column of the node table -- and therefore no titles appear on the admin/node page or other pages where nodes are listed (e.g. tracker).

The differences between the two instances are: problematic site is running only the archive module -- schedule module is running on another site (good site has both modules running on one site); and the problematic site is running PHP 4 (good site is running PHP 5).

drewish’s picture

Status: Active » Fixed

okay, well the archive now has a table for mapping program node titles onto groups of audio nodes. and there's views support for pulling them up by program node.

the taxonomy isn't optional, and with some hindsight i think it's probably good to keep it a required dependency.

mfb’s picture

I fixed my station archive title problem with this patch: http://drupal.org/node/90070

drewish’s picture

oh cool, well that's been comitted.

drewish’s picture

Here's some PHP you can run to update any audio that didn't get it's title set. You might have to run it a few times as it will only update 100 nodes at a time.

$result = db_query("SELECT nid FROM {node} WHERE type = 'audio' AND title='' LIMIT 100");
while ($o = db_fetch_object($result)) {
  if ($node = node_load($o->nid)) {
    print "$node->nid<br>";
    node_save(node_submit($node));
  }
}
Anonymous’s picture

Status: Fixed » Closed (fixed)