Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Playlist and video names to local playlist sharing #9060

Conversation

panoreak
Copy link
Contributor

@panoreak panoreak commented Oct 3, 2022

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

-Updated the string generated when sharing a local playlist. It now includes the playlist name, and video titles.

Fixes the following issue(s)

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.

Due diligence

@sonarcloud
Copy link

sonarcloud bot commented Oct 3, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@opusforlife2 opusforlife2 added feature request Issue is related to a feature in the app playlist Anything to do with playlists in the app labels Oct 24, 2022
Comment on lines +387 to +388
.subscribe(urlsText -> ShareUtils.shareText(
requireContext(), name, name + " \n\n" + urlsText),
Copy link
Member

Choose a reason for hiding this comment

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

I would undo this part of the change. Sharing text on Android already provides the title and content fields, so you shouldn't add the title at the beginning of the content again.

.map(StreamEntity::getUrl)
.collect(Collectors.joining("\n"))))
.map(streamEntity -> streamEntity.getTitle() + " " + streamEntity.getUrl())
.collect(Collectors.joining("\n\n"))))
Copy link
Member

@Stypox Stypox Nov 29, 2022

Choose a reason for hiding this comment

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

I would also undo this: why two newlines?

Suggested change
.collect(Collectors.joining("\n\n"))))
.collect(Collectors.joining("\n"))))

@@ -381,10 +381,11 @@ public void sharePlaylist() {
disposables.add(playlistManager.getPlaylistStreams(playlistId)
.flatMapSingle(playlist -> Single.just(playlist.stream()
.map(PlaylistStreamEntry::getStreamEntity)
.map(StreamEntity::getUrl)
.collect(Collectors.joining("\n"))))
.map(streamEntity -> streamEntity.getTitle() + " " + streamEntity.getUrl())
Copy link
Member

Choose a reason for hiding this comment

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

I think it is better to swap title and URL, since URLs are usually all the same length, while titles are not. This way the urls would somewhat align better and be easier to click, and titles would still all start roughly from the same column. Anyway, if you disagree with me it's fine, we can keep it as it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issue is related to a feature in the app playlist Anything to do with playlists in the app
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Playlist sharing: include video names & playlist name
3 participants