Trying to create dynamic album that lists all video files in other albums except one

J_C Member
edited April 2021 in General support

I’m trying to setup a dynamic album that shows all the rest of the videos in my gallery, except for those in one “Video” folder (and its subfolders). So basically, “Videos in other albums”. I would even settle for a dynamic album that did all videos on the site.

In 1.5.7, if I do a default search for mp4 or .mp4, or any variation I can think of like *.mp4, I get nothing. If I do a search for jpg or gif, same thing (unless a jpg is used in an album description). BUT if I do a search for mp3, it will find them all.

I’ve tried searching only what appears to be video related fields, but when I do, it also returns mp3 audio clips I have on the site.

I currently have 50 videos (mp4) and 22 mp3 clips on my site. If I do a * search on only these fields I get-

Framerate-
Nothing.

Video artist-
It returns only 5 mp3s with Artist metadata.

Video dataformat-
71 videos and mp3s, all except one old mp3 that Zenphoto can’t play.

Video File Size-
72 videos and mp3s, all video and audio files listed.

Video Title-
It returns only 5 mp3s with Title metadata.

So does anyone know how to accomplish this in the search field or with a dynamic album?

Also, if the fields are going to recognize metadata from both video and audio files, maybe they should be changed from “Video artist” to something like “A/V artist”?

Thanks!

Comments

  • J_C Member

    When I tried the same thing in 1.5.8RC tonight, I got different results-

    Framerate-
    Nothing.

    Video artist-
    Nothing.

    Video dataformat-
    49 videos only (missing one small old video), no mp3s!

    Video File Size-
    49 videos (missing old video), and including one very old mp3 that Zenphoto has issues playing normally.

    Video Title-
    Nothing.

    Also, when I do a default search for mp3 it no longer shows any results.

    At least with 1.5.8 I can create a dynamic album that lists only videos (most of them), but it would be nice if I could still exclude albums from the search. I’ve tried every boolean combo I can think of to try to get it to work, so please let me know if you think of anything.

  • acrylian Administrator, Developer
    edited April 2021

    We didn't change anything regarding search from 1.5.7 to 1.5.8RC that I am aware of except some sorting. And a bug that returnd unpublished items when it shouldn't.

    Are your items published? Do you use the right names for the fields to search (the db column names). Are those fields enabled on the search options and also are they populated in the db?

    If you want to search by suffix you need to have the filename field only enabled.

    How does the query within the .alb file look like? You can alter that manually by editing the file only currently.

    There is no way to exclude specific albums, actually you have to include the albums that should be covered.

  • J_C Member

    All items are published. The right field names are only selected when searched and enabled in the search options. All metadata has been refreshed in the database.

    Enabling the File/Folder name allowed me to do a search for all mp4s in 1.5.7, so thanks for that!

    The dynamic album I was trying had Video File Size, since that previously got all video results-
    words=*&searchfields=videosize&inalbums=1&inimages=1&unpublished=0

    The new one works fine-
    words=mp4&searchfields=filename&inalbums=1&inimages=1&unpublished=0

    I'm a little bummed that I can't exclude certain albums. I figured I could do something like-
    mp4 NOT "Videos"
    or
    mp4 NOT "https://domain.com/zenphoto/Videos/"

    Thanks as always for the prompt help Malte.

  • acrylian Administrator, Developer
    edited April 2021

    I figured I could do something like-

    mp4 NOT "Videos"

    . I figured I could do something like mp4 NOT "Videos"

    That actually should work if you best have only file/folder as the search field. The album foldername would probably lowercase so mp4 NOT videos (no need for the full path as that is no useed internally).

  • J_C Member

    I tried it multiple ways on both 1.5.7 and 1.5.8 using NOT, and unfortunately it seemed to return all video files, and on top of that, what appeared to now be almost all albums in the gallery. If I created a dynamic album with the search and had it not include albums, it still returned all video files on the site.

    If I used mp4 AND NOT videos, it went back to returning all videos on the site, not including the gallery albums, but also not excluding the Videos album or its subalbums.

    No matter what I tried, it would not exclude the general content of the Videos album or its subalbums from the search. If I used words included in the filenames after AND NOT it would exclude those files from the search, but that would not work for me as a solution.

    Thanks again for getting back to me.

  • acrylian Administrator, Developer

    Do you have album and image results enabled? Just asking because if albums are disabled excluding the album name via NOT may not work since albums itself are then excluded in general (haven't looked at the code).

    In any case we will have to try this ourselves. However, this will be most likely not be anything we will change for 1.5.8 at this time.

  • J_C Member

    I do have album and image results enabled. I have now noticed that using NOT on other searches tends to return all items in the gallery, for some reason, instead of limiting the results.

    To get the limited, and expected, results I have to use AND NOT.

  • acrylian Administrator, Developer

    Thanks for the feedback AND NOT seems semantically to make sense. Similar to if($a == "something" && $a != "somethingelse"). Probably as coded, I have to take a look. I guess we need to document better how use this.

  • acrylian Administrator, Developer
    edited April 2021

    The 1.5.8RC (github master) has now an internal change that allows this. However it is not available via the searchform or the dynamic interface but you can manually create it by editing the dynamicalbum define within the .alb file.

    The last line is something like:

    CONSTRAINTS=inalbums=1&inimages=1&unpublished=0

    Here means search in albums and images that are published.

    inalbums could also have a album name or a comma separated list of album folders to explicitly search in.

    There is now also excludealbums that can have one album name or a comma separated list of several. For sub albums the name naturally needs to include all toplevel (toplevel/myalbum).

    CONSTRAINTS=inalbums=1&inimages=1&unpublished=0&excludealbums=myalbum should now exclude the album with the name "myalbum". Subalbums inherit the exclusion.

  • J_C Member

    Thank you Malte for putting in the work to make that happen!

Sign In or Register to comment.