Compare commits

..

No commits in common. "2b1940b401f81f7c58b94806da0fcad47c794eb8" and "34bfd77ba6b0b62b55a72dd78ffd7a89a65f40ad" have entirely different histories.

3 changed files with 11 additions and 16 deletions

1
.gitignore vendored
View File

@ -2,5 +2,4 @@
todo
dist-newstyle/
paths.txt
temp_paths.txt
temp_backfill_settings.json

View File

@ -244,8 +244,8 @@ setPostIdInPosts tuples ids = map f ids
(\(a, b, c, i, j) -> (a, b, c, i, j { Posts.post_id = Just asdf1 })) (post_map Map.! (asdf2, asdf3))
fileToAttachment :: Int -> Posts.Post -> JS.File -> At.Attachment
fileToAttachment i post file =
fileToAttachment :: Posts.Post -> JS.File -> At.Attachment
fileToAttachment post file =
At.Attachment
{ At.mimetype = maybe guessed_mime id (JS.mime file)
, At.creation_time = Posts.creation_time post
@ -260,7 +260,6 @@ fileToAttachment i post file =
, At.file_size_bytes = JS.fsize file
, At.board_filename = JS.id file
, At.spoiler = maybe False id $ JS.spoiler file
, At.attachment_idx = i
}
where
@ -461,7 +460,6 @@ processFiles settings tuples = do -- perfect just means that our posts have ids,
, At.file_size_bytes = size
, At.board_filename = tim
, At.spoiler = spoiler > 0
, At.attachment_idx = 1
}
return (p, attachment)
@ -479,16 +477,14 @@ processFiles settings tuples = do -- perfect just means that our posts have ids,
-> [(Sites.Site, Boards.Board, Threads.Thread, Posts.Post, At.Paths, At.Attachment)]
parseAttachments (site, board, thread, p, q) = filter notDeleted $
case JSONPosts.files p of
Just files -> map
(\(i, x) ->
( site
, board
, thread
, q
, At.Paths (withPathPrefix $ JS.file_path x) (withPathPrefix $ JS.thumb_path x)
, fileToAttachment i q x
)
) (zip [1..] files)
Just files -> map (\x ->
( site
, board
, thread
, q
, At.Paths (withPathPrefix $ JS.file_path x) (withPathPrefix $ JS.thumb_path x)
, fileToAttachment q x)
) files
Nothing ->
case parseLegacyPaths p of
Nothing -> []

@ -1 +1 @@
Subproject commit 1b08b3ac079c6032e1090e79a8074d4cfd9ef24f
Subproject commit 1264424bd541649a2f163542a93203235e996ac3