vale46n1 / immich_duplicate_finder

A Comprehensive Solution for Identifying and Managing Duplicate Photos in Immich
Apache License 2.0
184 stars 12 forks source link

Video in immich #6

Closed Sn0wAlice closed 4 months ago

Sn0wAlice commented 5 months ago

Seems to crash on video

           try:
                if response.text:
                    assets = response.json()
                    st.success('Assets fetched successfully!')
                    return assets
                else:
                    st.error('Received an empty response.')
                    return None
            except requests.exceptions.JSONDecodeError as e:
                st.error('Failed to decode JSON from the response.')
                st.error(f'Response content: {response.text}')
                return None

add an asset filter assets = [asset for asset in assets if asset.get("type") == "IMAGE"] seems to patch the problem

           try:
                if response.text:
                    assets = response.json()
                    assets = [asset for asset in assets if asset.get("type") == "IMAGE"]
                    st.success('Assets fetched successfully!')
                    return assets
                else:
                    st.error('Received an empty response.')
                    return None
            except requests.exceptions.JSONDecodeError as e:
                st.error('Failed to decode JSON from the response.')
                st.error(f'Response content: {response.text}')
                return None
vale46n1 commented 5 months ago

Thank you for your feedback! I'm planning to incorporate your suggestion into the project. Additionally, I'm exploring a feature to detect duplicate videos, which I'll be working on in the coming days. To enhance user experience, I'm also considering revising the app using React. Stay tuned for updates!

Sn0wAlice commented 5 months ago

gl for the react update ^^