[Enhancement] Add history table to homepage (And TZ support) (#229)
* Added basic history table to homepage * Improved homepage history query * Set table to use 24h time * Added timezone support * Updated README to reflect new TZ stuff
This commit is contained in:
1 parent
1b7fb6d14b
commit
a1a568b7f7
10 files changed
+165
-7
No files matched your search
@@ -21,6 +21,8 @@ defmodule Pinchflat.Media.MediaQuery do
|
||||
# Suffixes:
|
||||
# - _for - the arg passed is an association record
|
||||
|
||||
# NOTE: that dyanmic query approach kinda rocked - should refactor in future
|
||||
|
||||
def new do
|
||||
MediaItem
|
||||
end
|
||||
@@ -172,6 +174,12 @@ defmodule Pinchflat.Media.MediaQuery do
|
||||
|> matching_source_title_regex()
|
||||
end
|
||||
|
||||
def where_pending_or_downloaded(query) do
|
||||
query
|
||||
|> where_pending_download()
|
||||
|> or_where([mi], not is_nil(mi.media_downloaded_at))
|
||||
end
|
||||
|
||||
defp require_assoc(query, identifier) do
|
||||
if has_named_binding?(query, identifier) do
|
||||
query
|
||||
|
||||
Reference in new issue
Block a user