美文网首页
Data relationship between origin

Data relationship between origin

作者: 广氏菠萝猫 | 来源:发表于2017-10-25 15:50 被阅读0次

    Open SQLite database <path-to-your-photos-library-"file">/database/photos.db

    My path-to-your-photos-library-"file" is 
    /Volume/Mac Photos/MacPhotos.libraries/Photos.photoslibrary
    
    hence my path of database is
    /Volume/Mac Photos/MacPhotos.libraries/Photos.photoslibrary/database/photos.db
    
    1. Get modelId from RKMaster
    select modelId from RKMaster where imagePath='2017/10/14/20171014-120320/1507889041932.mp4'
    

    imagePath here means the path under folder <path-to-your-photos-library-"file">/Masters/
    where your pictures/videos were imported by Photos app. The date of the folder is the importing date and time, but not the date time when the picture was taken.

    we got 34591 for this record.

    1. Get modelId from RKVersion via column masterId
    select modelId from RKVersion where masterId = 34591
    

    We can also link up these 2 tables via columns RKMaster.uuid and RKVersion.masterUuid

    we got 36841 for this record.

    1. Transform decimal (36841) to hexadecimal (8fe9)

    2. Get preview thumbnails from Finder
      /Volume/Mac Photos/MacPhotos.libraries/Photos.photoslibrary/resources/proxies/derivatives/8f/00/8fe9
      i.e.
      <path-to-your-photos-library-"file">/resources/proxies/derivatives/<first-2-positions>/00/<hexadecimal>

    you can see files as follows:
    UNADJUSTEDNONRAW_largepv_8fe9.jpg
    UNADJUSTEDNONRAW_mini_8fe9.jpg
    UNADJUSTEDNONRAW_thumb_8fe9.jpg

    For pictures, there're only 2 files, i.e. mini and thumb.
    For videos, there're 3 files, i.e. largepv, mini and thumb.

    相关文章

      网友评论

          本文标题:Data relationship between origin

          本文链接:https://www.haomeiwen.com/subject/dkiqpxtx.html