-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
996 changed files
with
473 additions
and
240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[submodule "SharedUtils"] | ||
path = SharedUtils | ||
url = https://github.com/yuliskov/SharedUtils | ||
[submodule "SharedModules"] | ||
path = SharedModules | ||
url = https://github.com/yuliskov/SharedModules | ||
[submodule "MediaServiceCore"] | ||
path = MediaServiceCore | ||
url = https://github.com/yuliskov/MediaServiceCore |
Submodule MediaServiceCore
updated
96 files
Submodule SharedModules
updated
8 files
27 changes: 27 additions & 0 deletions
27
common/src/main/java/com/liskovsoft/smartyoutubetv2/common/mvp/models/Header.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.liskovsoft.smartyoutubetv2.common.mvp.models; | ||
|
||
public class Header { | ||
private int mId; | ||
private String mTitle; | ||
|
||
public Header(int id, String title) { | ||
mId = id; | ||
mTitle = title; | ||
} | ||
|
||
public String getTitle() { | ||
return mTitle; | ||
} | ||
|
||
public void setTitle(String title) { | ||
mTitle = title; | ||
} | ||
|
||
public int getId() { | ||
return mId; | ||
} | ||
|
||
public void setId(int id) { | ||
mId = id; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
common/src/main/java/com/liskovsoft/smartyoutubetv2/common/mvp/models/VideoGroup.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
package com.liskovsoft.smartyoutubetv2.common.mvp.models; | ||
|
||
import com.liskovsoft.mediaserviceinterfaces.data.MediaGroup; | ||
import com.liskovsoft.mediaserviceinterfaces.data.MediaItem; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class VideoGroup { | ||
private int mId; | ||
private String mTitle; | ||
private List<Video> mVideos; | ||
|
||
public static VideoGroup from(MediaGroup mediaGroup) { | ||
VideoGroup videoGroup = new VideoGroup(); | ||
videoGroup.mId = mediaGroup.hashCode(); // TODO: replace with real id | ||
videoGroup.mTitle = mediaGroup.getTitle(); | ||
videoGroup.mVideos = new ArrayList<>(); | ||
|
||
for (MediaItem item : mediaGroup.getMediaItems()) { | ||
long id = item.getId(); | ||
String title = item.getTitle(); | ||
String category = item.getContentType(); | ||
String desc = item.getDescription(); | ||
String videoUrl = item.getMediaUrl(); | ||
String bgImageUrl = item.getBackgroundImageUrl(); | ||
String cardImageUrl = item.getCardImageUrl(); | ||
String studio = item.getDescription(); | ||
|
||
// Build a Video object to be processed. | ||
Video video = new Video.VideoBuilder() | ||
.id(id) | ||
.title(title) | ||
.category(category) | ||
.description(desc) | ||
.videoUrl(videoUrl) | ||
.bgImageUrl(bgImageUrl) | ||
.cardImageUrl(cardImageUrl) | ||
.studio(studio) | ||
.build(); | ||
|
||
videoGroup.mVideos.add(video); | ||
} | ||
|
||
return videoGroup; | ||
} | ||
|
||
public List<Video> getVideos() { | ||
return mVideos; | ||
} | ||
|
||
public void setVideos(List<Video> videos) { | ||
mVideos = videos; | ||
} | ||
|
||
public String getTitle() { | ||
return mTitle; | ||
} | ||
|
||
public void setTitle(String title) { | ||
mTitle = title; | ||
} | ||
|
||
public int getId() { | ||
return mId; | ||
} | ||
|
||
public void setId(int id) { | ||
mId = id; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...ommon/presenters/OnboardingPresenter.java → ...n/mvp/presenters/OnboardingPresenter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...utubetv2/common/presenters/Presenter.java → .../common/mvp/presenters/PresenterBase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
common/src/main/java/com/liskovsoft/smartyoutubetv2/common/mvp/views/MainView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.liskovsoft.smartyoutubetv2.common.mvp.views; | ||
|
||
import com.liskovsoft.smartyoutubetv2.common.mvp.models.Header; | ||
import com.liskovsoft.smartyoutubetv2.common.mvp.models.VideoGroup; | ||
|
||
public interface MainView { | ||
void updateRow(VideoGroup group, Header header); | ||
void updateGrid(VideoGroup group, Header header); | ||
void clearRow(Header header); | ||
void clearGrid(Header header); | ||
void showOnboarding(); | ||
} |
2 changes: 1 addition & 1 deletion
2
...utubetv2/common/views/OnboardingView.java → ...etv2/common/mvp/views/OnboardingView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
common/src/main/java/com/liskovsoft/smartyoutubetv2/common/views/MainView.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="home_header">Home</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
include ':tvapp', ':common' | ||
include ':smartyoutubetv2', ':common' | ||
|
||
def rootDir = settingsDir | ||
|
||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.