This repository was archived by the owner on Oct 27, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
app/src/main/java/com/esoxjem/movieguide Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -12,4 +12,6 @@ public class Api
12
12
public static final String GET_REVIEWS = "http://api.themoviedb.org/3/movie/%s/reviews?api_key=" + API_KEY ;
13
13
public static final String POSTER_PATH = "http://image.tmdb.org/t/p/w342" ;
14
14
public static final String BACKDROP_PATH = "http://image.tmdb.org/t/p/w780" ;
15
+ public static final String YOUTUBE_VIDEO_URL = "http://www.youtube.com/watch?v=%1$s" ;
16
+ public static final String YOUTUBE_THUMBNAIL_URL = "http://img.youtube.com/vi/%1$s/0.jpg" ;
15
17
}
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ public static String getUrl(Video video)
51
51
{
52
52
if (SITE_YOUTUBE .equalsIgnoreCase (video .getSite ()))
53
53
{
54
- return String .format ("http://www.youtube.com/watch?v=%1$s" , video .getVideoId ());
54
+ return String .format (Api . YOUTUBE_VIDEO_URL , video .getVideoId ());
55
55
} else
56
56
{
57
57
return Constants .EMPTY ;
@@ -62,7 +62,7 @@ public static String getThumbnailUrl(Video video)
62
62
{
63
63
if (SITE_YOUTUBE .equalsIgnoreCase (video .getSite ()))
64
64
{
65
- return String .format ("http://img.youtube.com/vi/%1$s/0.jpg" , video .getVideoId ());
65
+ return String .format (Api . YOUTUBE_THUMBNAIL_URL , video .getVideoId ());
66
66
} else
67
67
{
68
68
return Constants .EMPTY ;
You can’t perform that action at this time.
0 commit comments