-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert new and important files to Kotlin and optimize
- Loading branch information
Showing
12 changed files
with
1,035 additions
and
1,053 deletions.
There are no files selected for viewing
13 changes: 0 additions & 13 deletions
13
app/src/main/java/org/schabi/newpipe/database/LocalItem.java
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
app/src/main/java/org/schabi/newpipe/database/LocalItem.kt
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,18 @@ | ||
package org.schabi.newpipe.database | ||
|
||
/** | ||
* Represents a generic item that can be stored locally. This can be a playlist, a stream, etc. | ||
*/ | ||
interface LocalItem { | ||
/** | ||
* The type of local item. Can be null if the type is unknown or not applicable. | ||
*/ | ||
val localItemType: LocalItemType? | ||
|
||
enum class LocalItemType { | ||
PLAYLIST_LOCAL_ITEM, | ||
PLAYLIST_REMOTE_ITEM, | ||
PLAYLIST_STREAM_ITEM, | ||
STATISTIC_STREAM_ITEM, | ||
} | ||
} |
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
15 changes: 0 additions & 15 deletions
15
app/src/main/java/org/schabi/newpipe/database/playlist/PlaylistLocalItem.java
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
app/src/main/java/org/schabi/newpipe/database/playlist/PlaylistLocalItem.kt
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,28 @@ | ||
package org.schabi.newpipe.database.playlist | ||
|
||
import org.schabi.newpipe.database.LocalItem | ||
|
||
/** | ||
* Represents a playlist item stored locally. | ||
*/ | ||
interface PlaylistLocalItem : LocalItem { | ||
/** | ||
* The name used for ordering this item within the playlist. Can be null. | ||
*/ | ||
val orderingName: String? | ||
|
||
/** | ||
* The index used to display this item within the playlist. | ||
*/ | ||
var displayIndex: Long | ||
|
||
/** | ||
* The unique identifier for this playlist item. | ||
*/ | ||
val uid: Long | ||
|
||
/** | ||
* The URL of the thumbnail image for this playlist item. Can be null. | ||
*/ | ||
val thumbnailUrl: String? | ||
} |
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
Oops, something went wrong.