• Max{Height,Width}OfElement() should now produce saner values
• Video can now resize upon orientation change on mobile
• Search grid now sizes to the correct area
• CSS rule setting only tries to touch local stylesheets
• Video size may be based on the height if the width-based is too tall
• Auto-scrolling improvements:
• It now cannot oscillate
• It doesn't happen at all if scrolled to the very top / bottom
Thanks to @Freak_ on freenode for the report
Better text fitting
Account for the scrollbar width in our max width considerations
Don't bother to compute the grid size merely when toggling the view
Both pages:
Derive reliable window dimensions ourselves
Set the orientation from the window dimensions
Use "box-sizing: content-box" on the help keys, to fix sizing
Search page:
Support irregular (i.e. non-square) grids
General sizing fixes
Fix text fitting when toggling back from List to Grid view
Fix text fitting when textNode would overflow container
Correctly compute optimal grid size after orientation change
Rename .text to .cineraText to avoid CSS selector clash
Only add click events for the main set of buttons (not its clone)
Player page:
Size the video and timestamps bar more sensibly
Search page:
Manually size the grid buttons, and head / tail items
Player page:
Confine long menus to the player height
Confine the help documentation to the window size
Major features:
Search page: Subdivision grid layout
Player page: Device orientation-specific layout
Fixes:
Strip slashes of the URLs: base_url, etc.
Fix SnipeChecksumAndCloseFile() to not null-terminate the checksum string
Fix hover background colouration of medium icons of current timestamp
Fix DeriveLineageWithoutOriginOfProject() to call InitBookOfPointers()
Fix SortAndAbbreviateSpeakers() to use the person's ID if Name is blank
More directly display the "unit", if set, in the search results
Fix VideoIsPrivate() to find the apparently relocated privacyStatus
Make VideoIsPrivate() default to TRUE for non-youtube
Output as keywords all topics that do not match "nullTopic"
Deleted asset:
cinera_search.js
New assets:
cinera_search_pre.js
cinera_search_post.js
Fixes / Improvements:
• Switch all growable arrays to use memory_book, rather than realloc()
• Lift a bunch of hardcoded string lengths and item counts
• malloc() the MemoryArena rather than calloc(), thus saving 3 MiB
• Reorganise HMMLToBuffers() to return from one place, the end
• Print indexing errors in the same style as config errors / warnings
Diagnoses:
• Identified sources of "non-freed" memory usage and marked them +MEM.
This may aid future work on further reducing memory / cycle usage.
New config settings:
• suppress_prompts boolean
• Segfault was due to a read access violation on an unset entry pointer,
which in turn was due to stale neighbourhood data. To fix it we simply
reset the neighbourhood when starting to delete an entry. Additionally
we now check that those entry pointers are set before accessing them.
• Event handling of the trio of events triggered when vim saves a file.
We now read in a second set of events while processing the first if we
were on the verge of processing a deletion. If we get any more events,
we continue to squash those ones if possible, to always end up having
seen the entire trio of events associated with a file save, and then
process it as an insertion / reinsertion, not a deletion.
• Sort the asset landmarks by their offset.
• Change GenerateTopicColours() to initially open cinera_topics.css as
"r" to search it for the incoming topic, and only if that topic is
absent reopen it as "a+", thus triggering an IN_CLOSE_WRITE event.
It was just a typo. HMMLToBuffers() passed the global config pointer,
rather than the passed in one, to GenerateNavigation().
Also switch the entire config over to use memory_book style allocation.
This saves us from having to offset pointers when memory gets realloc'd.
Config parsing now errors-out when it detects clashes between:
base_dir and search_location, and global_search_dir
base_dir and player_location
This prevents us from generating search / project pages of multiple
projects (incl. global_search_dir) at the same location, which would
screw up the asset landmarks.
This change makes GenerateGlobalSearchPage() pass the Config to
BuffersToHTML(), which in turn passes it on to GenerateNavigation(),
thus preventing a null-pointer deference when setting the Theme.
It also fixes the filter by using all three of baseURL, searchLocation
and playerLocation to associate the filter and index elements.
On the search pages use the search_location and player_location, in
addition to the base_url, to associate filter and index entries, such
that the filter actually works.
Fix the .index file location for projects with a search_location. As
this is now consistent, we happen to fix a crash that happened when
changing the search_location.
New config option:
deny_bespoke_templates
Indexers may use the "template" attribute in the video node of
an .hmml file to set a bespoke template for that entry,
superseding any configured player_template. Setting
"deny_bespoke_templates" to true prevents this.
• Pack all templates before sync'ing the projects
• Delay generation of navigation bars until BuffersToHTML(), and free them
when switching projects
• Change many variably-lengthed items to use memory_book
• Do not push on multiple support scopes with the same ID
• Prevent crash when trying to snipe an asset checksum into an HTML file
we were never permitted to create
• Reorganise ReadFileIntoBuffer() and related functions into cinera.c
New Template Tags:
__CINERA_GLOBAL_NAV__
Passing an empty string to StripSlashes() would crash.
Also add a conditional around the ctime calls in the Won Build System,
to only run it if it exists.
Previously we only printed deletion in DeletePlayerPageFromFilesystem().
If, however, the output parameter is set in a .hmml file, we needn't
delete that page from filesystem. What would happen is, we move the
file from one location (delete) to another (insert / append), and only
printed out the insertion / append. This gave the impression that the
old database entry remained, when it had correctly been deleted.
Database version 5
Major features:
Config file parsing
Multiple projects per instance
Searching across multiple projects
Art sprites, usable by project, medium and support
Minor features:
The search results are now sortable
Optimised the search page sorting
Fixes:
More reliable file system monitoring
Well-formed templates are now valid, even with the absence of assets
Correctly resove ~ in paths
Gracefully handle the lack of an internet connection
Renamed "annotator" to "indexer"
Removed PlayerURLPrefix, in favour of .hmml "output" parameter
Replaced the flags collection with:
-0 Dry-run mode
-c Set the config file path
-e Examine the database
-v Print version
-h Print help
New template tags:
__CINERA_NAV__ dropdown
__CINERA_NAV__ horizontal
__CINERA_NAV__ plain
__CINERA_PROJECT_PLAIN__
Deleted template tags:
__CINERA_MENUS__
__CINERA_SCRIPT__
It seems that rsync triggers these events, so we must handle these in
addition to the IN_CLOSE_WRITE ones triggered by re-saves.
Also fix MakeDir() to correctly make parent directories (i.e. mkdir -p).
Previously we had a template tag limit of 16. This commit lifts that
limit to support "unlimited" tags per template.
Skip already offset landmarks most efficiently when adding a new asset.
New template tags:
__CINERA_SEARCH_URL__
__CINERA_VOD_PLATFORM__
Database version 4
Revving resources involves hashing asset files and appending a query
string to their URLs. Additionally we monitor asset files for changes
and edit their new checksum hash into all HTML files citing them.
This commit also introduces new template tags for assets (listed below)
with which you may instruct Cinera to rev assets of your choice. There
is further information about this in the help (-h) and the README.md
Amongst other minor changes, we now support unset $XDG_CACHE_HOME and
$HOME
- Thanks to insofaras for wordexp()
New flags:
-Q Set query string
New template tags:
__CINERA_ASSET__
__CINERA_CSS__
__CINERA_IMAGE__
__CINERA_JS__
Renamed template tag:
__CINERA_SEARCH__ (was __CINERA_INDEX__)
Previously it could fail to generate an index if the processing of the
final file set "Inserted" or "Deleted" to FALSE, even if a prior file
had set it to TRUE
We no longer prevent enforcement of strict server security policies (to
be documented)
Add bounds-checking to the Copy string functions, fixing buffer sizes
Fix the marker skipping (e.g. :afk)
Different ISBN database, and slightly more flexible BuildReference()
Permit line-breaking on '/' in the references menu
cinera.css and cinera_player*.js:
More subtle "click here to regain focus" - for @insofaras
Persist theatre mode - for @insofaras
Resume in-progress video at previous timecode - for @AsafGartner
It treats co-hosts and guests differently from chat commenters, styling
and categorising annotations for them such that their contributions
don't come under the "Chat comment" medium
Also do some essentially cosmetic code compression of the marker cases
and other things
cinera_player_pre.js: Make the credits menu initially focus the host's
person if they have no support, rather than the first credited person
who has support
It merely checks the video's privacy status and, if not public, records
its corresponding HMML base filename privately in the .metadata without
generating a player page or a search / table of contents entry for it.
Every four hours it will loop over the .metadata to recheck the privacy
status of any privately recorded entries, and process newly public ones.
Fix template validation to check that the script comes after both the
player and menus (previously it only specified the player).
Fix relocation code to try and remove only the child directories of the
BaseDir, and no shallower (previously it would try and "recursively"
remove directories all the way back to /, obviously not actually getting
there because it would encounter a non-empty directory along the way).
Add "Modes" to the startup printout.
Flags:
-g Ignore privacy status
Also optimise out superfluous searches, and relieve IndexToBuffer() of
the need to string-search the .index
Rewrite the table of contents page after deleting an entry
This commit also retains profiling, as a reminder to me how I used it,
and the old linear search code. The timing blocks and the old code may
be deleted in a future commit
Essentially, the previous change prevented the marker progress code from
firing if the user only interacts with the YouTube player directly.
cinera.c: Try to curl the quotes in, rather than straight up deleting
them, if(ShouldFetchQuotes)
cinera_player_pre.js: Episode keyboard navigation. Also swap out A for
K, and D for J
cinera_player_pre.js: Handle the case in onRefChanged() in which the
filter_container or filterState is not present
cinera.c: Refetch quotes when processing a set of annotations >60 mins
after the last fetch
Flags:
-w Force quote cache rebuild
Also compress the template code
cinera_player_pre.js: Fix bug in which onRefChanged() tried to call
player.jumpToNextMarker(); before the player was ready. This could
happen if its first marker's timecode is 0:00 and medium is :afk
Enable Theatre mode to work in containers styled with max-width or
max-height
Also fix the inotify loop, augment the index (the .metadata files) to
contain data useful for insobot, and futureproof UpgradeDB()
Flags:
* -e Examine Index
Just pop an -e on the end of your usual list of flags
* -u Update Interval (was -U)
This also changes the hardcoded, unintegrated output to wrap cineraMenus
and cineraPlayerContainer in a <div>, as newly reflected in the example
template_player.html