
package com.hustunique.jianguo.parsingplayer.parser.entity;

import java.util.List;
import java.util.Map;

/**
 * Created by JianGuo on 1/16/17.
 * POJO for video information extracted from websites
 */
// TODO: 1/16/17 define fields for information in videos
public class VideoInfo {

    // now four hds are enough
    public static int HD_0 = 0;
    public static int HD_1 = 1;
    public static int HD_2 = 2;
    public static int HD_3 = 3;

    private Map<Integer,List<Seg>> segsMap;
    private String title;

    public List<Seg> getSegs(int hd){
        if (!segsMap.containsKey(hd)) throw new RuntimeException("No such hd in this url");
        return segsMap.get(hd);
    }
    //TODO:construct this class and use HashMap or ?

}


@@ -193,16 +193,53 @@
 ebsites%0A
+ * A list of segs represents a steam%0A
  */%0A// T
@@ -325,129 +325,431 @@
     
-// now four hds are enough%0A    public static int HD_0 = 0;%0A    public static int HD_1 = 1;%0A    public static int HD_2 = 2
+public static String FORMAT_3GP = %223gp%22;%0A    public static String FORMAT_3GPHD = %223gphd%22;%0A    public static String FORMAT_FLV = %22flv%22;%0A    public static String FORMAT_FLVHD = %22flvhd%22;%0A    public static String FORMAT_MP4 = %22mp4%22;%0A    public static String FORMAT_MP4HD = %22mp4hd%22;%0A    public static String FORMAT_MP4HD2 = %22mp4hd2%22;%0A    public static String FORMAT_MP4HD3 = %22mp4hd3%22;%0A    public static String FORMAT_HD2 = %22hd2%22
 ;%0A  
@@ -768,21 +768,35 @@
 tic 
-int 
+String FORMAT_
 HD
-_
 3 = 
-3;
+%22hd3%22;%0A
 %0A%0A  
@@ -813,15 +813,14 @@
 Map%3C
-Integer
+String
 ,Lis
@@ -896,14 +896,21 @@
 egs(
-int hd
+String format
 )%7B%0A 
@@ -941,18 +941,22 @@
 ainsKey(
-hd
+format
 )) throw
@@ -1031,18 +1031,22 @@
 Map.get(
-hd
+format
 );%0A    %7D
@@ -1050,61 +1050,143 @@
   %7D%0A
+%0A
     
-//TODO:construct this class and use HashMap or ?%0A
+public VideoInfo(Map%3CString, List%3CSeg%3E%3E segsMap, String title) %7B%0A        this.segsMap = segsMap;%0A        this.title = title;%0A    %7D
 %0A%7D%0A%0A

delete HD vars and new some FORMAT vars,change the key of map to format instead of HD