Ticket #3184: allocine.diff

File allocine.diff, 7.8 KB (added by laurent@…, 17 years ago)

The patch for allocine.pl handler

  • modules/_shared/lang/French.lang

     
    7171"Album Tracks"
    7272"Albums"
    7373"Albums with songs by %s"
     74"ALLOCINETYPE"
     75    Allo Ciné
    7476"All"
    7577"All Albums"
    7678"All Categories"
     
    316318    Humidité
    317319"IMDB"
    318320    Allociné
     321"IMDBTYPE"
     322    Imdb
    319323"Inactive"
    320324    Inactif
    321325"info: activate recording"
     
    825829"Visit $1"
    826830"Watched"
    827831"Weather"
     832"web_video_imdb_type"
    828833"web_video_imdb_path"
    829834"Wednesday"
    830835    Mercredi
  • modules/_shared/lang/English.lang

     
    5151"Album Tracks"
    5252"Albums"
    5353"Albums with songs by %s"
     54"ALLOCINETYPE"
     55    Allo Ciné
    5456"All"
    5557"All Albums"
    5658"All Categories"
     
    239241"hue"
    240242"Humidity"
    241243"IMDB"
     244"IMDBTYPE"
     245    Imdb
    242246"Inactive"
    243247"info: activate recording"
    244248    Force this specific showing to record.
     
    683687"Weather"
    684688"web_video_imdb_path"
    685689    Path to imdb.pl on this webserver
     690"web_video_imdb_type"
    686691"Wednesday"
    687692"welcome: backend_log"
    688693    Show the server logs.
  • modules/video/imdb.php

     
    4747    // Escape any extra " in the title string
    4848        $title = str_replace('"', '\"', $title);
    4949    // Setup the option list
    50         $options = array( 'tv=both',
    51                           'tv=both\;type=fuzzy'
    52                         );
     50        $options = array('');
     51        //$options = array( 'tv=both',
     52         //                 'tv=both\;type=fuzzy'
     53           //             );
    5354        foreach ($options as $option) {
    5455            $cmd = "$imdb -M $option \"$title\"";
    5556            exec($cmd, $output, $retval);
     
    141142    {
    142143        $video = new Video($id);
    143144        echo $video->metadata();
    144     }
    145  Pas de fin de ligne à la fin du fichier
     145    }
  • modules/video/set_settings.php

     
    3131    if (isset($_POST['host']))
    3232        $_SESSION['settings']['host'] = $_POST['host'];
    3333
     34
    3435    if ($_POST['save']) {
    3536        setting('web_video_imdb_path',          $_SESSION['settings']['host'], $_POST['web_video_imdb_path']);
     37        setting('web_video_imdb_type',          $_SESSION['settings']['host'], $_POST['web_video_imdb_type']);
    3638        setting('VideoAggressivePC',            $_SESSION['settings']['host'], $_POST['VideoAggressivePC']);
    3739        setting('VideoArtworkDir',              $_SESSION['settings']['host'], $_POST['VideoArtworkDir']);
    3840        setting('VideoBrowserNoDB',             $_SESSION['settings']['host'], $_POST['VideoBrowserNoDB']);
  • modules/video/tmpl/default/set_settings.php

     
    1919
    2020<table border="0" cellspacing="0" cellpadding="0">
    2121<tr>
     22    <?php
     23      $imdbType=setting('web_video_imdb_type', $_SESSION['settings']['host']);
     24    ?>
     25
     26    <td><?php echo t('web_video_imdb_type'); ?>:</td>
     27    <td><select name="web_video_imdb_type">
     28           <option value="IMDB"  <?php if ($imdbType == "IMDB") echo 'SELECTED'; ?> ><?php echo t('IMDBTYPE'); ?></option>
     29           <option value="ALLOCINE" <?php if ($imdbType == "ALLOCINE") echo 'SELECTED'; ?> ><?php echo t('ALLOCINETYPE'); ?></option>
     30        </select>
     31    </td>
     32</tr>
     33<tr>
    2234    <td><?php echo t('web_video_imdb_path'); ?>:</td>
    2335    <td><input type="text" name="web_video_imdb_path" size="60" value="<?php echo $imdb_path; ?>"></td>
    2436</tr>
  • modules/video/tmpl/default/video.php

     
    2121
    2222// Print the page header
    2323    require 'modules/_shared/tmpl/'.tmpl.'/header.php';
     24
     25    function makeImdbWebUrl($num) {
     26        $imdbwebtype = setting('web_video_imdb_type', hostname);
     27        if ($imdbwebtype=='IMDB')
     28        {
     29            return "http://www.imdb.com/Title?".$num;
     30        }
     31        else if ($imdbwebtype=='ALLOCINE')
     32        {
     33            return "http://www.allocine.fr/film/fichefilm_gen_cfilm=".$num.".html";
     34        }
     35    }
    2436?>
    2537
    2638<SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT">
    2739<!--Hide script from old browsers
    2840
     41
    2942    function newWindow(newContent) {
    3043        winContent = window.open(newContent, 'nextWin', 'right=0, top=20,width=350,height=440, toolbar=no,scrollbars=no, resizable=yes');
    3144    }
     
    87100                        title_index += 1;
    88101                    }
    89102                    if (title.length > 0)
    90                         content.innerHTML += '<br /><a href="http://www.imdb.com/Title?'+num+'" style="float: right; margin-left: 1em;">(IMDB)<\/a> <a href="javascript:imdb_select(\''+id+'\',\''+num+'\')">'+title+'<\/a>';
     103                        content.innerHTML += '<br /><a href="'.makeImdbWebUrl(num).'" style="float: right; margin-left: 1em;">(IMDB)<\/a> <a href="javascript:imdb_select(\''+id+'\',\''+num+'\')">'+title+'<\/a>';
    91104                    matches_index += 1;
    92105                }
    93106                content.innerHTML += '<br /><a href="javascript: imdb_prompt(\''+id+'\');"><?php echo t('Custom Search'); ?><\/a>';
     
    309322        <div id="video_<?php echo $show->intid; ?>_genre" class="hidden"><?php if (count($show->genres)) foreach ($show->genres as $genre) echo ' '.$genre.' ';?></div>
    310323        <div id="video_<?php echo $show->intid; ?>_browse" class="hidden"><?php echo $show->browse; ?></div>
    311324        <div id="video_<?php echo $show->intid; ?>-title" class="title"><a href="<?php echo $show->url; ?>"><?php echo htmlentities($show->title); ?></a></div>
    312         <div id="video_<?php echo $show->intid; ?>_img">                <img <?php if (show_video_covers && file_exists($show->cover_url)) echo 'src="data/video_covers/'.basename($show->coverfile).'"'; echo ' width="'.video_img_width.'" height="'.video_img_height.'"'; ?> alt="<?php echo t('Missing Cover'); ?>"></div>
     325        <div id="video_<?php echo $show->intid; ?>_img">                <img <?php if (show_video_covers && file_exists($show->coverfile)) echo 'src="data/video_covers/'.basename($show->coverfile).'"'; echo ' width="'.video_img_width.'" height="'.video_img_height.'"'; ?> alt="<?php echo t('Missing Cover'); ?>"></div>
    313326        <div id="video_<?php echo $show->intid; ?>-category">           <?php echo $Category_String[$show->category]; ?></div>
    314327        <div id="video_<?php echo $show->intid; ?>_playtime">           <?php echo nice_length($show->length * 60); ?></div>
    315         <div id="video_<?php echo $show->intid; ?>_imdb">               <?php if ($show->inetref != '00000000') { ?><a href="http://www.imdb.com/Title?<?php echo $show->inetref; ?>"><?php echo $show->inetref ?></a><?php } ?></div>
     328        <div id="video_<?php echo $show->intid; ?>_imdb">               <?php if ($show->inetref != '00000000') { ?><a href="<?php echo makeImdbWebUrl($show->inetref); ?>"><?php echo $show->inetref ?></a><?php } ?></div>
    316329        <div class="command">
    317330            <span class="commands"><a href="javascript:newWindow('<?php echo root ?>video/edit?intid=<?php echo $show->intid ?>')" ><?php echo t('Edit') ?></a></span>
    318331            <span class="commands"><a href="javascript:imdb_lookup('<?php echo $show->intid ?>','<?php echo addslashes($show->title); ?>')">IMDB</a></span>