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

[Bug report] containsLivePhotos be deprecated, how to disable live photo in future? #1150

Closed
dodatw opened this issue Jun 22, 2024 · 7 comments

Comments

@dodatw
Copy link

dodatw commented Jun 22, 2024

Version

3.2.0

Platforms

dart

Device Model

All

flutter info

flutter 3.13.3

How to reproduce?

I saw containsLivePhotos be deprecated.
How can I disable live photo in right way ?

    @Deprecated(
      'The option will be always enabled by default. '
      'This will be removed in v4.0.0',
    )
    this.containsLivePhotos = true,

Logs

No response

Example code (optional)

No response

Contact

No response

@AlexV525
Copy link
Member

Live Photos are image + video so when you are obtaining it like images it behaves the same as other images. In this case it makes no difference with others.

@dodatw
Copy link
Author

dodatw commented Jun 22, 2024

For my use case, I need it for video picker.

Some case I need "video with livePhoto", some case I need "video without livePhoto".
How can I do that after containsLivePhotos be removed

Thanks.

@AlexV525
Copy link
Member

Use a custom filter to grab video assets and Live Photos subtype resources. Live Photos are images in concept.

@dodatw
Copy link
Author

dodatw commented Jun 23, 2024

Oh, I found different from 3.1 to 3.2

in Photo_Manager 3.1,
If I set RequestType.video and containsLivePhotos = true,
I get "Video + Live Photos".

in Photo_Manager 3.2,
If I set RequestType.video, no matter containsLivePhotos is true or false,
I only get Video.

In new version , Live photo is photo.

If I set RequestType.common (video and image), I get "video + live photo + photo", that is not I want.

How to set correct filterOption to get "Video + LivePhoto" result ?
FilterOptionGroup seem no way to set option.

I need "video + LivePhoto" result like before.

@AlexV525
Copy link
Member

@dodatw
Copy link
Author

dodatw commented Jun 23, 2024

Is that mean, I need "Video + LivePhotos"
Here is what i did: (type set to RequestType.common)

CustomFilter.sql(
        where:
            '${CustomColumns.base.mediaType} = 2 OR ${CustomColumns.darwin.mediaSubtypes} & 8 = 8',
        orderBy: [
          OrderByItem(CustomColumns.base.createDate, false),
        ],
      )

Seem work.

@AlexV525
Copy link
Member

Yeah that's it. Additionally placing the filter only on iOS should complete your demand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants