Skip to content

Convert newpipe/local/playlist/RemotePlaylistManager to kotlin#12976

Closed
ghost wants to merge 1 commit intodevfrom
unknown repository
Closed

Convert newpipe/local/playlist/RemotePlaylistManager to kotlin#12976
ghost wants to merge 1 commit intodevfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Dec 31, 2025

What is it?

  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

Converted newpipe/local/playlist/RemotePlaylistManager to kotlin

Tracking down that issue with playlists required me to understand this file so I am sure it is a trivial conversion. I tested it and everything works except I didn't test onUpdate because that is the only part I don't understand when called

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

@github-actions github-actions Bot added the size/medium PRs with less than 250 changed lines label Dec 31, 2025
@theimpulson
Copy link
Copy Markdown
Member

HI @dustdfg, could you please squash all your multiple Kotlin conversion PRs into a single one but with separate commits? They are all on the same topic and will make it easier for review and changes.

@theimpulson
Copy link
Copy Markdown
Member

Also, please add an SPDX copyright and license header to each new kotlin file conversion you are doing. Please see the database directory files for an example.

): Completable {
return Completable.fromRunnable {
database.runInTransaction {
for (uid in deletedItems) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use forEach here and everywhere for loops?


fun onUpdate(playlistId: Long, playlistInfo: PlaylistInfo): Single<Int> {
return Single.fromCallable {
val playlist = PlaylistRemoteEntity(playlistInfo)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can probably use the .copy method here to modify the uid.

@ghost
Copy link
Copy Markdown
Author

ghost commented Dec 31, 2025

HI @dustdfg, could you please squash all your multiple Kotlin conversion PRs into a single one but with separate commits? They are all on the same topic and will make it easier for review and changes.

Ok. I think it is almost "antipatern" though because it is harder to merge one PR and etc...

@ghost ghost closed this Dec 31, 2025
@ghost ghost deleted the kotlin_refactor10 branch January 7, 2026 18:53
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/medium PRs with less than 250 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant