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

Package for Flatpak #2047

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Package for Flatpak #2047

wants to merge 3 commits into from

Conversation

Grafcube
Copy link

Closes #737

This patch adds flatpak support. I built and installed it on my branch with these commands:

pnpm build
pnpm electron-builder --linux flatpak
flatpak install --bundle 'pack/YouTube Music-3.3.6-x86_64.flatpak'

A few things to note, I need to write a separate yml to publish to flathub which repeats a lot of metadata (electron builder doesn't currently have any way to publish to flathub automatically). According to the flatpak app submission guidelines:

Flathub is primarily intended as a service that is used by app developers to distribute their apps. Our goal is to give developers control of their apps and to allow them a closer relationship with their users without middlemen getting in the way. However, as part of setting up Flathub, some applications are being distributed on Flathub without the involvement of their developers. We would prefer that these applications are controlled by their authors.

I am perfectly fine with maintaining the flatpak myself.

The appstream metadata should probably contain content warnings since YT music also has explicit content. I've left it blank for now. It also needs to be packaged manually since electron builder doesn't yet support adding it (see electron-userland/electron-builder#1993). I'll manually include it in the manifest until that issue is resolved. The appstream file is useful for all linux packages, not just flatpak, which is why I've included it in the PR.

If you don't want to wait, you can checkout my branch and install it yourself with the above commands. Cheers!

@Grafcube Grafcube mentioned this pull request May 11, 2024
@razzeee
Copy link

razzeee commented May 11, 2024

You can try using https://hughsie.github.io/oars/generate.html to generate the missing oars data

@Grafcube
Copy link
Author

You can try using https://hughsie.github.io/oars/generate.html to generate the missing oars data

Here's what I got. I'm unsure if it's accurate since it's only audio and not video.

  <content_rating type="oars-1.1">
    <content_attribute id="drugs-alcohol">mild</content_attribute>
    <content_attribute id="drugs-narcotics">mild</content_attribute>
    <content_attribute id="drugs-tobacco">mild</content_attribute>
    <content_attribute id="sex-nudity">mild</content_attribute>
    <content_attribute id="sex-themes">mild</content_attribute>
    <content_attribute id="language-profanity">moderate</content_attribute>
    <content_attribute id="social-info">intense</content_attribute>
    <content_attribute id="money-purchasing">intense</content_attribute>
    <content_attribute id="money-advertising">intense</content_attribute>
  </content_rating>

@ArjixWasTaken
Copy link
Collaborator

is there any point in setting oars ratings to anything other than intense?
we do not have control over youtube's content, so we cannot explicitly set age ratings

@razzeee
Copy link

razzeee commented May 12, 2024

Won't this also play video in some cases?

@MulverineX
Copy link
Contributor

Also social-info shouldn't be marked intense, anonymous users can use this app

@Grafcube
Copy link
Author

Grafcube commented May 18, 2024

Also social-info shouldn't be marked intense, anonymous users can use this app

I'm pretty sure the algorithm still works for anonymous users.

From https://hughsie.github.io/oars/generate.html
If the user is able to "enable" NSFW or "adult" content, then this should be included in the assessment even if it is turned off by default.

This makes me think that it should be the "worst case" for all the fields.

@JellyBrick JellyBrick added the enhancement New feature or request label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flatpak Support
5 participants