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

[Enhancement] Make it possible to fetch random image without needing to be public & starred #1814

Closed
mingan666 opened this issue May 1, 2023 · 4 comments · Fixed by #1819
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@mingan666
Copy link
Contributor

Make it configurable if the random method should include all accessible photos.

@ildyria ildyria added enhancement New feature or request good first issue Good for newcomers labels May 1, 2023
@ildyria
Copy link
Member

ildyria commented May 1, 2023

Todo List for anyone interested in giving it a go:

t

Optional:

  • : make the album_id configurable too (Default setting should be starred (to preserve current behaviour):
    • '' => all pictures
    • 'starred' => get random picture from Starred Album (use AlbumFactory to retrieve it)
    • 'any other id' => get random picture from selected Album (use AlbumFactory to retrieve it)

IMPORTANT

  • Security considerations: Visibility/Accessibility query filters should be applied so that no non-public pictures are visible.

@ildyria ildyria changed the title [Enhancement] Make it possible to fetch random image without start [Enhancement] Make it possible to fetch random image without needing to be starred May 1, 2023
@ildyria ildyria changed the title [Enhancement] Make it possible to fetch random image without needing to be starred [Enhancement] Make it possible to fetch random image without needing to be public & starred May 1, 2023
@haivala
Copy link

haivala commented May 5, 2023

I f I want to use album ids how does it actually work? Like where I can find said id and what to type in the setting?

In any case it would be nice to be able to have starred and album ids as I'm now using the starred one.

@mingan666
Copy link
Contributor Author

mingan666 commented May 5, 2023

Hi!

If you do not change the configuration, the system will continue to use the starred album to choose the random items
(the is the default configured album to use).

If you want another album, you need to update the settings (setting -> more -> "random_album_id") and change it to the album id you want to use (could either be a random id for the album or a string such as "starred" for a smart album). The id can be found as part of the album url.

@haivala
Copy link

haivala commented May 5, 2023

Hi!

Thank you!

In my case it would be nice to be able to choose starred and an array of albums.
and just FYI: I was looking for this setting in album info when I was not logged in as admin because it would have been natural place for it. (include in random api or similar)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
3 participants