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

Should preserve order of items in an album for local album folders #57

Closed
gilesknap opened this issue Mar 2, 2019 · 8 comments
Closed

Comments

@gilesknap
Copy link
Owner

Need to record order items come out into the DB.

@gilesknap
Copy link
Owner Author

Also - need to investigate why "Y2000 M05 D06 Canada - DSCF0051.AVI" and other AVIs have the wrong Create Date in the DB (this is the reason that order of items in albums changed and that I noticed this issue - i had addded ORDER BY Date in LocalData.get_album_files() and all the AVIs ended up at the end of the album '0511 Trip to Banff and Improvement District No. 9' )

@gilesknap
Copy link
Owner Author

The date anomoly in AVI files is because they have incorrect metadata, see example below. Conversely the Google Photos metadata is somehow correct. When I do a local folder comparison pass I extract the create date using ffprobe and write it into the DB, thus trashing the order. The actual metadata comparison is a good way to identify if two files are a copy of the original so probably want to keep this ffprobe.

Solutions?

  • dont use ffprobe and rely on Google meta data only.
  • do ffprobe but have a separte column in the DB for these dates, only used for comparison
  • comparison is a relativley rare (expensive) operation, could simply always re-run a normal scan with --flush-index afterward (which is what I'll do right now while I think about this)
$ ffprobe -v quiet -print_format json -show_entries stream=index,codec_type:stream_tags=creation_time:format_tags=creation_time '/media/Data/GilesPhotos/photos/2000/05/Y2000 M05 D06 Canada - DSCF0051.AVI'
{
    "programs": [

    ],
    "streams": [
        {
            "index": 0,
            "codec_type": "video",
            "tags": {

            }
        },
        {
            "index": 1,
            "codec_type": "audio",
            "tags": {
                "creation_time": "2015-11-05T02:03:03.000000Z"
            }
        }
    ],
    "format": {
        "tags": {
            "creation_time": "2015-11-05T02:03:03.000000Z"
        }
    }
}

@gilesknap
Copy link
Owner Author

The wrong metadata issue is separate from album ordering, splitting into a new ticket.

@gilesknap
Copy link
Owner Author

Top solution for this is to record position in an album in the albumFiles table. Simples.

@gilesknap
Copy link
Owner Author

There appears to be a solution to this here plevold@22f74df

@gilesknap
Copy link
Owner Author

this has been fixed (currently in master) by @plevold. Thanks!

@gilesknap
Copy link
Owner Author

note I need to fix #148 before releasing this

@gilesknap
Copy link
Owner Author

#148 is now fixed - this will go in next release.

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

1 participant