Releases: ellman12/MemoryMosaic
V3: The Things I've Always Wanted
This is the biggest update to PSS since V2 all the way back in July 2022. This took over 7 months of my life.
First off, PSS
and PSS-Init
have been renamed to MemoryMosaic
and Initialization
. I never liked the name Photos Storage Server
because of the first and last words: Photos
implies this thing can only store photos—much like Google Photos—and Server
implies it has to be run on a server, which isn't true; you can run it on your local machine. I like the name MemoryMosaic
because this thing's primary pages resemble a mosaic of your memories.
I did a lot of things in this update to hopefully make MemoryMosaic reliably work many decades into the future, if not forever (as long as .NET, Blazor, and PostgreSQL are still alive and well). This is also hopefully the last big update to this project, as the V3 branch has over 1,000 commits on it, somehow. I think I have a problem.
New Features
Big New Features
- Create inheritance structure with classes like
Component
. - Create
ElementVisibility
class, replacingFunctions.VisToggle()
.- Create
ToggleableComponent.razor
. Many components inherit from this to make toggling of them much easier and simpler.- They can (but are not required to) also toggle if the page can scroll or not, fixing the issue in pre-V3 where you could scroll while a modal was active.
- Create
ModalBackground
component, making it consistent and easy to add a semi-transparent background over any modal-like component or element.
- Create
- Create reusable components for things like buttons, text inputs, etc.
- Added a NuGet package for working with SCSS.
- Replaced all
.css
files with.scss
, and improved their syntax/structure. - Reduced a lot of repetition and duplication by moving things to
Shared.scss
andMixins.scss
. - Made things like colors and spacing more consistent with ✨mixins✨.
- Replaced all
- Add Date Added page
- Collections page:
- Collections page now displays the amount of items in each collection.
- Collections can now display the DT range of their items.
- Collections can be sorted by these two ↑.
- Collections can have descriptions.
- Create
build.sh
, which builds the projects and bundles all the necessary files like the.css
files.
Small New Features
- Added a setting controlling the logging level.
- Created
Functions.GetPluralized()
- If you give it an amount of something like a
List<int>
"Items", it makes it easy to control if it should output as "No Items," "1 Item," or "30 Items."
- If you give it an amount of something like a
- Create
Functions.ServerIP
. This is retrieved fromlaunchSettings.json
and set on startup.
Improvements
Huge Improvements
- Completely rewrote
LibraryContentViewer
.- This was two months of my life well spent.
- It is now way leaner, and works significantly better. The library should theoretically be able to scale into the millions with little to no performance problems.
- Sorting and grouping items works way, way better and is less disgusting.
- Null Date Taken items are handled way better.
- Now shows the size of selected items.
- You can now group/view items in different modes: year, month, day, or none.
- The thumbnails now expand to fit the whole screen.
- Clicking the header of a group of thumbnails now selects the entire group.
- Pages like Collections and Trash now have less nonsense going on inside. Lots of their logic has been moved to LCV.
- Alt-clicking a thumbnail always makes it full screen, even if items are selected.
- Ctrl G hotkey works better.
- Add new hotkeys like
Ctrl Shift A
(loads every item on the current page, then selects all). - Hovering an LCV Thumbnail for ≥ 150 ms now preloads it.
- Created
FullscreenViewer
, a significant improvement over the original item viewer in LCV.- Also contains the new
VideoPlayer
component, a cross-browser video player built from scratch with primarily JS. - Its info display is much better, and also displays the file size of items.
- Also contains the new
- Completely rewrote
Import
.- This was also two months of my life well spent.
- Just like LCV, it is much leaner but also works significantly faster and better.
- Errors should almost never happen, instead of being common like in pre-V3.
- Add more keyboard shortcuts.
- Items can now display the short path of where they'll end up.
- You can now control how the items are sorted.
- Date Added is now displayed in errors/warnings.
- The displays for DT (and DA) are now much easier on the eyes.
- They also visually show if you've picked metadata or filename for an Import Item.
- Import now also contains
FullscreenViewer
, allowing you to view both Import Items and Library Items in full screen, thanks to the magic of polymorphism. - Import now loads in more gracefully.
- Thumbnails are initialized last, meaning items are displayed in the list before their thumbnails are ready.
- While this technically doesn't make Import load in faster, this at least gives you something to look at instead of a blank loading screen, and allows you to start looking through the list of items.
- Items now display file sizes of items.
- Fix very annoying bug from pre-V3 Import where it would often miss a few items when loading in.
Big Improvements
- Renamed project.
- Enabled
nullable
flag in project. CollectionCreator
got some UI and backend improvements.CollectionSelector
:- Reduced duplication
- Removed all static class members
- Now saves and restores collection groups in a less cursed way.
- Save/restore buttons now display the collection name(s) on hover.
- MemoryMosaic now supports having a second instance of it for debugging and testing purposes.
- This is controlled via the #DEBUG flag and the
Program.Debug
field. The latter is used in.razor
files because conditional compilation in them is weird. - Default settings now change depending on if in debug or release mode.
- This is controlled via the #DEBUG flag and the
- Rewrote
Initialization
to work better and be easier to use.- Can create normal and debug instances of MM.
- Replace internals of Memories page with updated LCV.
ShortcutsReference
is now better than ever and more consistently used.Collections
page now uses a grid layout. Collections resize themselves very nicely.- Rename
Connection
toDatabase
, and updateglobal using
s.
Small Improvements
- Restructured where the
.sln
and.csproj
files are. - Organized
using
statements across the project. Added moreglobal using
s inProgram
. - Organize a lot of other stuff.
- Updated icon for the project.
- Rename
Index.razor
toHome.razor
. - Improve default settings.
- Change
ProgressPopUp
's default width and height to 200px. - Rename
media
database table →library
. - Renamed
MediaRow
andImportFile
→LibraryItem
andImportItem
, and they inherit from newMedia
class. - Reduced my usage of
null!
when possible. - PostgreSQL:
- Fix
collections.cover
not havingON UPDATE CASCADE
. collections.name
is now a primary key in addition to id. Mark both as UNIQUE.- Rename
uuid
→id
. - Rename
collection_entries.id
→item_id
. - Reorder columns in
library
,collections
, andcollection_entries
.
- Fix
- Create
NpgsqlDataReaderExtensions
class. - Rearrange items in the NavMenu.
- Change
/collection-view
URL to just/collection
. - Add a
Console.ReadLine()
to end ofInitialization
. - Tweak settings in
launchSettings.json
.
Tiny Improvements
- Remove unnecessary
IConfiguration
stuff fromStartup
. - Remove unnecessary calls to
ExecuteNonQuery
in methods that callExecuteReader
. - Fix inconsistencies with tags, as well as
@code
and@functions
blocks across the project. - Move enums from
/Backend/Enums
to/Enums/
. - Change some
== false
into using!
- Rename
GetCollectionsTable()
→GetCollections()
.
Bug Fixes
Big Bug Fixes
- Fix Untracked Files page crashing if no untracked items found.
- Fix compression of thumbnails for PNGs never having actually worked, thanks to using incorrect
ffmpeg
arguments.
Small Bug Fixes
- Hopefully fix pesky JavaScript error complaining about a random task being cancelled.
V2.3.1: Small Additions, Fixes, and Improvements
New Features
Added a ProgressPopUp
in Import that appears when adding items.
Esc now clears the selection in LCV.
Improvements
CollectionSelector's search is no longer case-sensitive.
Made CM header a few pixels taller.
Made header for LCV pages a few pixels taller.
CM settings are once again static
, so their values persist even after leaving the page.
Swap ASC and DESC in query for CM when sorting by when last modified.
Fixes
Fix left and top margins on CM header.
Fix issue where 2 of the buttons in CM's sort div said 'Album' instead of 'Collection'.
V2.3: Search Page, Image Thumbnails, Readonly Collections, Memories and CollectionSelector Improvements, and More
New Features
- Added Search page.
- Images now have thumbnails just like videos. There lower-quality images help to optimize performance when scrolling through pages like Home, Starred, CollectionView, etc.
- Items in Memories can now be viewed in full screen.
- Items in Memories can now be selected.
- CollectionSelector now has option controlling if items should be deselected when confirm clicked.
- Backup and restore methods now log messages to the console.
- Thumbnails can now be regenerated for all items in Settings.
- Collections can now be marked as readonly. If a Collection has been marked as readonly, it cannot: be renamed, have items added/removed, change if it's a folder or not, appear in CollectionSelector, or be deleted.
- When items are selected in Import, their date taken source can now be updated at the same time instead of individually.
- Add button to Memories for picking a random date.
Fixes and Improvements
- Rename Settings.displayNoDTInAV to displayNoDTInCV.
- Fix CollectionView query issues relating to Null Date Taken.
- Add POSTGRES_VERSION to Settings, and fix 2 errors caused by out of date postgres version.
- Various fixes and improvements to Import page.
- Fix bug with LoadMemories where items with a day < 10 weren't loaded.
- Text inputs in Settings now have a black background and white text.
- Fix issue where very wide panoramas were going outside the left and right sides of the page in full screen.
- Fix issue where videos in full screen had annoying focus outline sometimes.
- Fix issue where clicking a thumbnail's video icon wouldn't make the item fullscreen.
- Fix issue in CollectionView where 'Collection' was used instead of 'Album' in a prompt.
- Fix issue in CollectionsMain where newly created collections sometimes weren't appearing.
- Removed
static
keyword from a lot of things that didn't need it. - Make CollectionView's collection name text input 600 px wide.
- Add checkbox to CollectionsMain to control if readonly collections are selected.
- Backups page now works better. It also no longer compressed backups.
- Fix issue with CollectionsMain and CollectionSelector where album covers were overflowing and not being clipped properly.
- Collections in CollectionsMain no longer use JS to switch page, allowing CollectionView to open much, much faster.
- The oldest/newest date added/taken in Stats in Settings actually work now.
V2.2.0.1: Minor fixes
Fix issue where Starred page wasn't working as one of its queries was missing a column.
Fix issue where Trash icon wasn't getting colored to blue when Trash page active.
V2.2: Import Page, All Items Page, Fixes and Improvements
New Features
Delete UploadApply
and GPOImport
pages, and replaced with new and greatly improved Import
page.
Added basic Logger
class and some calls to it throughout the project.
Added All Items
page, which shows all items regardless of DT or if they're in a folder, as long as they're not in the trash.
Changes and Improvements
Increase LIMIT from 50 to 100 when loading more items.
Backups.razor now uses Fastest
instead of SmallestSize
.
Renamed pss_upload
to pss_import
and updated appropriate variables, constants, and comments.
GenerateThumbnail now ignores error if can't delete its tmp file.
NavMenu buttons now turn blue if that button's page is active.
Address miscellaneous build warnings.
V2.1
New Features
Add ability to add descriptions to any item when viewing it.
Add Ctrl Left and Ctrl Right to KeyboardShortcuts component.
Clean up and improve LCV keyboard shortcuts. Ctrl Left/Right now act as alternatives for Left/Right for changing the item being viewed.
CollectionSelector now has a previous selection button as well as 4 slots for saving selection of albums or a folder. Saved to *.tmp files stores where pss_settings.json is
.
Fixes/Improvements
Fix bug where clicking star button when viewing an item wouldn't update the button's icon.
Adjust spacing of some buttons shown when viewing an item.
V2.0
PSS V2.0 is what V1.0 always should have been. Many essential and breaking changes are present in this version, especially pertaining to the database.
New Features
Pages like Index and Starred all have a single shared component for displaying their content (LibraryContentViewer), drastically reducing unnecessary repetition.
Pages like Index and Starred now have more keyboard shortcuts, for things like deleting selected, etc.
Remove crappy old ViewItem component. Merged it with LCV, so viewing items is wayyy faster and better. Still referred to as ViewItem, though.
Implement a bunch of new hotkeys in ViewItem.
Items are now displayed alongside the day, month, and year they were taken. I.e., when they are displayed, they are displayed in groups underneath the date they were taken. This drastically improves the UX of pages like Index, Starred, etc.
PSS now will actually work for libraries with more than a few hundred items. When pages like Index load, it only loads ~50 items initially. Then, if the user scrolls far enough up or down, more content is loaded.
Add Ctrl G shortcut, which allows you to jump to any date in your library, and go up or down from there. E.g., you could jump to 5/1/2010 and start viewing items there instead of having to start at today's date and scroll all the way down there.
Upload page now has big text saying if there are no items in pss_upload to add to library.
You can now rename files (but not change the extension) in ViewItem.
You can now delete individual items in GPO Import and Upload Apply.
The quality of newly-generated video thumbnails is now controlled via a slider control in Settings. The lower the number, the higher the quality and thus the more storage space they take up.
PSS now has the ability to update the internal date taken metadata of photos and videos, using DateTakenExtractor's UpdateDateTaken() method and ExifTool. This occurs automatically when adding items to your library, as well as when you change/remove an item's Date Taken in ViewItem.
Files can now be renamed during the process of adding them to your library. Extension cannot be changed, though.
Added the 'Memories' page, allowing you to see all the items that were taken on a particular month and day.
The server PC can now be reset from within the Settings page.
Improvements
Downloading should work a bit better.
ShortcutsReference component is now actually used on pages with KeyboardShortcuts.
Albums/folders are now collectively referred to as 'Collections', instead of confusingly calling both 'Albums'. Any reference to the previous name has been changed, except for the change log. I.e., any reference to album_entries
is actually referring to collection_entries
.
Overhauled PSS Database
Removed media_trash
and album_entries_trash
tables. media
and album_entries
now have an extra column for storing the timestamp the item was deleted, instead of moving the rows between tables. This should hopefully be faster.
album_entries
now stores the uuid of each item instead of its short path.
date taken is now nullable and if it's null, the item will not be displayed in the main page, but rather its own page. The default Date Taken value for an item without a DT is now no longer DateTime.Now
, but rather null
. An Unknown
folder is made for these items, alongside the year folders like 2022, 2021, etc.
The format for short paths has been changed from 2022/5 May/filename.ext
to 2022/5/filename.ext
, hopefully reducing wasted storage space in the database.
PSS actually uses foreign keys and references now like God intended, which should hopefully make code and DB work simpler, better, and faster.
In Connection, every NpgsqlCommand
and NpgsqlDataReader
now uses the 'using' keyword.
Replace some repetitive code for getting file paths throughout the project with a faster and better method, GetSupportedFiles()
. Now, it's easier to add support for more file types later on, if desired.
Remove last remaining fragments of scp crap from the early days.
Remove old Metadata.cs
class and replace it with DateTakenExtractor
, my NuGet package for reading/writing Date Taken metadata for photos and videos.
Maintenance and Stats in Settings should be more useful and give more useful information.
The Backups feature has been greatly overhauled and is now actually good. You can create backups/snapshots of the PSS library and restore your library to those points at any time.
UploadApply and GPO Import should have better performance and UI stuff (still not ideal but good enough). These 2 also now have a progress bar and an overlay that appears when loading/adding items. Both have been made a lot more similar.
UploadApply and GPO Import have been overhauled a bit. Renaming files works better.
- Performance should hopefully be better.
- A popup appears to prevent you from clicking away, etc.
- Header and filter are now visible even when scrolling.
- There is a prompt that can appear to ask to confirm before items are added to your library.
Changes
Renamed Connection.UAFile
to UploadFile
, since GPO Import uses it too.
PSS now has its own unique icon.
Change 'Photos' button in NavMenu to 'Home'. Index's page title is now 'Home' instead of 'Photos'.
Now when a ViewItem item is deleted, it picks the item to the right of the deleted item to display next
Fixes
The status in GPO and UA should work better/actually work now.
In Upload, fix button text saying Go to Upload Apply
instead of Go to Apply Upload
.
Fix annoying issue where GPO Import and Upload Apply header width was too big and causing the page to have a horizontal scroll.
Lot of misc. little styling improvements.
Finally fixed a bug where AlbumSelector (now CollectionSelector) would crash if there were >= 1 folders and no albums
V1.2: Add support for MOV files
MOV files are now supported.
PSS also should now be able to support files with extensions in all caps (or any kind of case really) instead of just lowercase like .MOV, .mOv, etc.
Improved GetDateTaken function in Metadata. Now no longer returns a tuple but instead has 2 out paramaters, which makes way more sense. Also made all ref paramaters in Metadata into out's which just makes more sense.
V1.1: Added Ability to Import a Folder Sorted with Graphical Photo Organizer
Title. In Upload, you can enter the root path of a folder sorted with Graphical Photo Organizer and PSS will be able to add it to your PSS library no problem.
v1.0.3: More minor things
Gifs are now supported everywhere (I think)
(Temporarily?) added button to go to GPO Import page. Idk if I want to add this but I might maybe in the future idk.
Removed SCP stuff from Upload because it was stupid. SCP stuff in Settings and PSS-Init is staying for right now though.