2heoh (2heoh) wrote in changelog,
2heoh
2heoh
changelog

[ljcom] r10030: added video ID attribute for youtube emb...

Committer: slobin
added video ID attribute for youtube embed objects

M get_recent_entries.pm
U   trunk/cgi-bin/LJ/SUP/RPC/Command/get_recent_entries.pm
Modified: trunk/cgi-bin/LJ/SUP/RPC/Command/get_recent_entries.pm
===================================================================
--- trunk/cgi-bin/LJ/SUP/RPC/Command/get_recent_entries.pm	2011-02-11 10:47:28 UTC (rev 10029)
+++ trunk/cgi-bin/LJ/SUP/RPC/Command/get_recent_entries.pm	2011-02-12 06:54:59 UTC (rev 10030)
@@ -2,13 +2,13 @@
 use strict;
 use base qw/LJ::SUP::RPC::Command::get_entries/;
 use LJ::TimeUtil;
+use LJ::EmbedModule;
 
 sub need_journal        { 'any' }
 sub need_active_session { 0 }
 sub need_post           { 0 }
 
 sub process {
-
     my $self   = shift;
     my $params = $self->params;
 
@@ -75,7 +75,6 @@
     LJ::load_log_props2($logdb, $journal->{'userid'}, \@itemids, \%logprops);
     my $logtext = LJ::get_logtext2($journal, @itemids);
     my $logtags = LJ::Tags::get_logtags($journal, \@itemids);
-
     my @res = ();
     my $itemnum = 0;
     my $lastdate = '';
@@ -105,6 +104,8 @@
             ## subject and event must be stored in tags (<subject>...</subject>),
             ## not attributes, since \n in attributes are substituted with spaces
         $h{subject}     = [ $logtext->{$itemid}->[0] ]; #[ $entry->subject_raw ];
+        # get video ID for youtube embed objects
+        LJ::EmbedModule->expand_entry($journal,\$logtext->{$itemid}->[1],get_youtube_id => 1);
         $h{event}       = [ $logtext->{$itemid}->[1] ]; #[ $entry->event_raw ];
         $h{replies}     = $entry->reply_count;
         $h{security}    = $entry->is_suspended ? "suspended" : $entry->security;

Tags: 2heoh, ljcom, pm
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments