[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Review Request 114741: Add time duration to media item for youtube videos.
From:       "Shantanu Tushar" <shantanu () kde ! org>
Date:       2013-12-31 5:22:04
Message-ID: 20131231052204.12418.15103 () probe ! kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/114741/#review46470
-----------------------------------------------------------


Works nicely :) Just one nitpick around the hh:mm:ss formatting-


browsingbackends/onlineservices/youtube/youtubemodel.cpp
<https://git.reviewboard.kde.org/r/114741/#comment33189>

    This calculation should go inside QML (view), not C++ (model). From the model you \
should return the seconds.  
    You can look at mediacontroller and re-use the existing code there (which \
converts video duration to hh:mm:ss format)


- Shantanu Tushar


On Dec. 30, 2013, 6:13 p.m., Sudhendu Kumar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/114741/
> -----------------------------------------------------------
> 
> (Updated Dec. 30, 2013, 6:13 p.m.)
> 
> 
> Review request for Plasma, Shantanu Tushar, Sinny Kumari, and Sujith Haridasan.
> 
> 
> Repository: plasma-mediacenter
> 
> 
> Description
> -------
> 
> While searching for youtube videos from PMC, it was difficult to differentiate \
> among the videos of same kind but different duration. This feature adds the \
> duration of video at top-right corner of thumbnail. Snapshot added along with this \
> review. 
> 
> Diffs
> -----
> 
> components/common/LabelOverlay.qml fd722af 
> components/common/MediaItem.qml ccdc8c2 
> libs/mediacenter/mediacenter.h 7cdf285 
> libs/mediacenter/mediacenter.cpp 009ce22 
> browsingbackends/onlineservices/youtube/youtubemodel.cpp abb4f89 
> browsingbackends/onlineservices/youtube/youtubemodel.h 47be4ce 
> 
> Diff: https://git.reviewboard.kde.org/r/114741/diff/
> 
> 
> Testing
> -------
> 
> Works good.
> 
> 
> File Attachments
> ----------------
> 
> snapshot3.png
> https://git.reviewboard.kde.org/media/uploaded/files/2013/12/30/a1194a19-4412-43cf-92ff-3bf150bbd38c__snapshot3.png
>  
> 
> Thanks,
> 
> Sudhendu Kumar
> 
> 


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/114741/">https://git.reviewboard.kde.org/r/114741/</a>
  </td>
    </tr>
   </table>
   <br />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Works nicely :) Just one \
nitpick around the hh:mm:ss formatting-</pre>  <br />







<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/114741/diff/1/?file=228016#file228016line116" \
style="color: black; font-weight: bold; text-decoration: \
underline;">browsingbackends/onlineservices/youtube/youtubemodel.cpp</a>  <span \
style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void \
YoutubeModel::parseResults(KJob *job)</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">116</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="tb">	</span><span class="n">QString</span> <span \
class="n">videoDuration</span> <span class="o">=</span> <span \
class="n">QTime</span><span class="p">().</span><span class="n">addSecs</span><span \
class="p">(</span><span class="n">mediaNode</span><span class="p">.</span><span \
class="n">namedItem</span><span class="p">(</span><span \
class="s">&quot;yt:duration&quot;</span><span class="p">).</span><span \
class="n">toElement</span><span class="p">().</span><span \
class="n">attribute</span><span class="p">(</span><span \
class="s">&quot;seconds&quot;</span><span class="p">).</span><span \
class="n">toInt</span><span class="p">()).</span><span class="n">toString</span><span \
class="p">(</span><span class="s">&quot;h:mm:ss&quot;</span><span \
class="p">);</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This \
calculation should go inside QML (view), not C++ (model). From the model you should \
return the seconds.

You can look at mediacontroller and re-use the existing code there (which converts \
video duration to hh:mm:ss format)</pre> </div>
<br />



<p>- Shantanu Tushar</p>


<br />
<p>On December 30th, 2013, 6:13 p.m. UTC, Sudhendu Kumar wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for Plasma, Shantanu Tushar, Sinny Kumari, and Sujith \
Haridasan.</div> <div>By Sudhendu Kumar.</div>


<p style="color: grey;"><i>Updated Dec. 30, 2013, 6:13 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
plasma-mediacenter
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">While searching for youtube videos from PMC, it was difficult to \
differentiate among the videos of same kind but different duration. This feature adds \
the duration of video at top-right corner of thumbnail. Snapshot added along with \
this review.</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Works good.</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>components/common/LabelOverlay.qml <span style="color: \
grey">(fd722af)</span></li>

 <li>components/common/MediaItem.qml <span style="color: grey">(ccdc8c2)</span></li>

 <li>libs/mediacenter/mediacenter.h <span style="color: grey">(7cdf285)</span></li>

 <li>libs/mediacenter/mediacenter.cpp <span style="color: grey">(009ce22)</span></li>

 <li>browsingbackends/onlineservices/youtube/youtubemodel.cpp <span style="color: \
grey">(abb4f89)</span></li>

 <li>browsingbackends/onlineservices/youtube/youtubemodel.h <span style="color: \
grey">(47be4ce)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/114741/diff/" style="margin-left: \
3em;">View Diff</a></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments \
</h1>

<ul>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2013/12/30/a1194a19-4412-43cf-92ff-3bf150bbd38c__snapshot3.png">snapshot3.png</a></li>


</ul>





  </td>
 </tr>
</table>








  </div>
 </body>
</html>



_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic