I wanted to have two nodes (one in english and one in french, with i18n) pointing to the same video file but I couldn't because the form generates an error: "A video node/xxx using that link already exists."

I think we should be able to have many nodes pointing to the same video file. I was able to change this behavior by commenting out the following lines in video.module (from line 653 to 663):

  if (isset($node->vidfile)) {
    if ($node->vidfile != '') {
      //let's see if we have it yet
      $result = db_query("SELECT * from {video} WHERE vidfile = '%s' and nid <> %d", $node->vidfile, $node->nid);
      if (db_num_rows($result) > 0) {
        $video = db_fetch_object($result);
        $othernode = node_load($video->nid);
        form_set_error('vidfile', t('A video %link-to-existing using that link already exists', array("%link-to-existing" => l($othernode->title, 'node/' . $othernode->nid . '/edit'))));
      }
    }
  }

Comments

fax8’s picture

Removed this check on HEAD.

Thanks for pointing this out.

Fabio

fax8’s picture

Status: Active » Fixed

Removed this check on HEAD.

Thanks for pointing this out.

Fabio

Anonymous’s picture

Status: Fixed » Closed (fixed)