Skip to content

Commit

Permalink
Merge pull request #22 from kotvertolet/release_1.1.3
Browse files Browse the repository at this point in the history
release 1.3.3'
  • Loading branch information
antonyhaman authored Aug 4, 2020
2 parents a90cd59 + 75499c1 commit 7d8d6ea
Show file tree
Hide file tree
Showing 47 changed files with 541 additions and 95 deletions.
13 changes: 8 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "com.github.kotvertolet.youtubeaudioplayer"
minSdkVersion 19
targetSdkVersion 29
versionCode 3
versionName "1.1.2"
versionCode 4
versionName "1.1.3"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}
Expand Down Expand Up @@ -39,12 +39,12 @@ dependencies {

// Core
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.preference:preference:1.1.0'
implementation 'androidx.preference:preference:1.1.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'

// Support
implementation 'com.google.android.material:material:1.2.0-alpha05'
implementation 'com.google.android.material:material:1.3.0-alpha02'

// Retrofit
implementation "com.squareup.retrofit2:retrofit:2.7.2"
Expand Down Expand Up @@ -86,6 +86,9 @@ dependencies {
// Multidex
implementation 'com.android.support:multidex:1.0.3'

// Ripple for API <21
//implementation 'com.balysv:material-ripple:1.0.2'

// YoutubeJExtractor
implementation 'com.github.kotvertolet:youtube-jextractor:0.2.5'
implementation 'com.github.kotvertolet:youtube-jextractor:0.3.1'
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ public void onCreate() {
cachingTasksManager = new CachingTasksManager();
}

@Override
public void onTerminate() {
super.onTerminate();
}

public DownloadNotificationHelper getDownloadNotificationHelper() {
if (downloadNotificationHelper == null) {
downloadNotificationHelper =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,17 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
utils = new CommonUtils();
sharedPreferences = getSharedPreferences(APP_PREFERENCES, Context.MODE_PRIVATE);
presenter = new SplashActivityPresenterImpl(this);
}

@Override
protected void onPostResume() {
boolean noRecommendations = sharedPreferences.getBoolean(Constants.PREFERENCE_NO_RECOMMENDATIONS, false);
if (noRecommendations) {
presenter.loadRecents(new HashMap<>());
} else {
presenter.loadYoutubeRecommendations();
}
}

@Override
protected void onPostResume() {
super.onPostResume();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.github.kotvertolet.youtubeaudioplayer.data

import com.github.kotvertolet.youtubeaudioplayer.db.dto.PlaylistDto
import com.github.kotvertolet.youtubeaudioplayer.db.dto.YoutubeSongDto

class PlaylistWithSongs {
var playlist: PlaylistDto? = null
var songs: List<YoutubeSongDto>? = null

constructor()
constructor(playlist: PlaylistDto?, songs: List<YoutubeSongDto>?) {
this.playlist = playlist
this.songs = songs
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package com.github.kotvertolet.youtubeaudioplayer.data.models.youtube.videos.list

import com.google.gson.annotations.SerializedName

class ContentDetails {
@SerializedName("duration")
var duration: String? = null

@SerializedName("licensedContent")
var isLicensedContent = false

@SerializedName("caption")
var caption: String? = null

@SerializedName("definition")
var definition: String? = null

@SerializedName("regionRestriction")
var regionRestriction: RegionRestriction? = null

@SerializedName("projection")
var projection: String? = null

@SerializedName("dimension")
var dimension: String? = null

override fun toString(): String {
return "ContentDetails{" +
"duration = '" + duration + '\'' +
",licensedContent = '" + isLicensedContent + '\'' +
",caption = '" + caption + '\'' +
",definition = '" + definition + '\'' +
",regionRestriction = '" + regionRestriction + '\'' +
",projection = '" + projection + '\'' +
",dimension = '" + dimension + '\'' +
"}"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.github.kotvertolet.youtubeaudioplayer.data.models.youtube.videos.list

import com.google.gson.annotations.SerializedName

class High {
@SerializedName("width")
var width = 0

@SerializedName("url")
var url: String? = null

@SerializedName("height")
var height = 0

override fun toString(): String {
return "High{" +
"width = '" + width + '\'' +
",url = '" + url + '\'' +
",height = '" + height + '\'' +
"}"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.github.kotvertolet.youtubeaudioplayer.data.models.youtube.videos.list

import com.google.gson.annotations.SerializedName

class Id {
@SerializedName("kind")
var kind: String? = null

@SerializedName("videoId")
var videoId: String

constructor(videoId: String) {
this.videoId = videoId
}

constructor(kind: String?, videoId: String) {
this.kind = kind
this.videoId = videoId
}

override fun toString(): String {
return "Id{" +
"kind = '" + kind + '\'' +
",videoId = '" + videoId + '\'' +
"}"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.github.kotvertolet.youtubeaudioplayer.data.models.youtube.videos.list

import com.google.gson.annotations.SerializedName

class JsonMemberDefault {
@SerializedName("width")
var width = 0

@SerializedName("url")
var url: String? = null

@SerializedName("height")
var height = 0

override fun toString(): String {
return "JsonMemberDefault{" +
"width = '" + width + '\'' +
",url = '" + url + '\'' +
",height = '" + height + '\'' +
"}"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.github.kotvertolet.youtubeaudioplayer.data.models.youtube.videos.list

import com.google.gson.annotations.SerializedName

class Localized {
@SerializedName("description")
var description: String? = null

@SerializedName("title")
var title: String? = null

override fun toString(): String {
return "Localized{" +
"description = '" + description + '\'' +
",title = '" + title + '\'' +
"}"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.github.kotvertolet.youtubeaudioplayer.data.models.youtube.videos.list

import com.google.gson.annotations.SerializedName

class Maxres {
@SerializedName("width")
var width = 0

@SerializedName("url")
var url: String? = null

@SerializedName("height")
var height = 0

override fun toString(): String {
return "Maxres{" +
"width = '" + width + '\'' +
",url = '" + url + '\'' +
",height = '" + height + '\'' +
"}"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.github.kotvertolet.youtubeaudioplayer.data.models.youtube.videos.list

import com.google.gson.annotations.SerializedName

class Medium {
@SerializedName("width")
var width = 0

@SerializedName("url")
var url: String? = null

@SerializedName("height")
var height = 0

override fun toString(): String {
return "Medium{" +
"width = '" + width + '\'' +
",url = '" + url + '\'' +
",height = '" + height + '\'' +
"}"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.github.kotvertolet.youtubeaudioplayer.data.models.youtube.videos.list

import com.google.gson.annotations.SerializedName

class PageInfo {
@SerializedName("totalResults")
var totalResults = 0

@SerializedName("resultsPerPage")
var resultsPerPage = 0

override fun toString(): String {
return "PageInfo{" +
"totalResults = '" + totalResults + '\'' +
",resultsPerPage = '" + resultsPerPage + '\'' +
"}"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.github.kotvertolet.youtubeaudioplayer.data.models.youtube.videos.list

import com.google.gson.annotations.SerializedName

class RegionRestriction {
@SerializedName("allowed")
var allowed: List<String>? = null

override fun toString(): String {
return "RegionRestriction{" +
"allowed = '" + allowed + '\'' +
"}"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.github.kotvertolet.youtubeaudioplayer.data.models.youtube.videos.list

import com.google.gson.annotations.SerializedName

class ResourceId {
@SerializedName("kind")
var kind: String? = null

@SerializedName("videoId")
var videoId: String? = null

override fun toString(): String {
return "ResourceId{" +
"kind = '" + kind + '\'' +
",videoId = '" + videoId + '\'' +
"}"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package com.github.kotvertolet.youtubeaudioplayer.data.models.youtube.videos.list

import com.google.gson.annotations.SerializedName

class Snippet {
@SerializedName("publishedAt")
var publishedAt: String? = null

@SerializedName("localized")
var localized: Localized? = null

@SerializedName("description")
var description: String? = null

@SerializedName("title")
var title: String? = null

@SerializedName("thumbnails")
var thumbnails: Thumbnails? = null

@SerializedName("channelId")
var channelId: String? = null

@SerializedName("categoryId")
var categoryId: String? = null

@SerializedName("channelTitle")
var channelTitle: String? = null

@SerializedName("tags")
var tags: List<String>? = null

@SerializedName("liveBroadcastContent")
var liveBroadcastContent: String? = null

//TODO: Only for playlist
@SerializedName("resourceId")
var resourceId: ResourceId? = null

override fun toString(): String {
return "Snippet{" +
"publishedAt = '" + publishedAt + '\'' +
",localized = '" + localized + '\'' +
",description = '" + description + '\'' +
",title = '" + title + '\'' +
",thumbnails = '" + thumbnails + '\'' +
",channelId = '" + channelId + '\'' +
",categoryId = '" + categoryId + '\'' +
",channelTitle = '" + channelTitle + '\'' +
",tags = '" + tags + '\'' +
",liveBroadcastContent = '" + liveBroadcastContent + '\'' +
"}"
}
}
Loading

0 comments on commit 7d8d6ea

Please sign in to comment.