-
Notifications
You must be signed in to change notification settings - Fork 3
Initial UI fixes - Display artist name, album name, durations, various other stuff #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Zorlin
wants to merge
17
commits into
main
Choose a base branch
from
zorlin/ui-fixes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
827867a
Content category fixes, frontpage and card view rendering fixes
Zorlin d96636e
Automatically discover mismatched tag/track names
Zorlin f84f827
Match categories by UUID on frontpage
Zorlin b5dcd1d
Docker improvements
Zorlin 7bdfaf1
Docker fixes
Zorlin ae72fce
Rebase UI fixes
Zorlin fe938ec
Improved releases view - CSS grid
Zorlin 277c1be
Full UI redesign
Zorlin 558e295
Update for Firefox - temporary hacks
Zorlin 0780628
Partial gamepad support
Zorlin 4ff243c
Draggable video player
Zorlin 99c80a9
Update Dockerfile for new builds, improve maintenance import/export
Zorlin beba02a
Check in new UI work
Zorlin a371540
Update structures panel
Zorlin 49c950e
Full defederated filtering, half working TV shows implementation
Zorlin 7a758da
Improve TV shows structures
Zorlin 34e8cea
Displayname stuff
Zorlin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| Chrome 132 | ||
| Chrome 124 |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,3 +47,10 @@ playwright-report/ | |
| .electron-vendors.cache.json | ||
|
|
||
| *.txt | ||
|
|
||
| # lens-sdk | ||
| lens-sdk | ||
| .claude | ||
|
|
||
| # env | ||
| .env.production | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| server { | ||
| listen 80; | ||
| server_name localhost; | ||
| root /usr/share/nginx/html; | ||
| index index.html; | ||
|
|
||
| # Static assets - serve directly or 404 | ||
| location ~* \.(js|css|wasm|png|jpg|jpeg|gif|ico|svg|webp|json|txt|xml|webmanifest)$ { | ||
| try_files $uri =404; | ||
| } | ||
|
|
||
| # SPA fallback - only for routes, not assets | ||
| location / { | ||
| try_files $uri $uri/ /index.html; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,170 @@ | ||
| # Structures Documentation | ||
|
|
||
| This document details the structure system in Riff.CC - a generic hierarchical organization system for ANY type of content. | ||
|
|
||
| ## Overview | ||
|
|
||
| Structures are completely generic containers that can represent ANY organizational entity and form arbitrary hierarchies. They are designed to enable efficient PeerBit queries across complex relationships. | ||
|
|
||
| A structure can be: | ||
| - **Artist** (containing albums, songs, collaborations) | ||
| - **Author** (containing book series, individual books) | ||
| - **Director** (containing filmographies, TV shows) | ||
| - **Actor** (containing performances across different media) | ||
| - **TV Show** (containing seasons) | ||
| - **Season** (containing episodes) | ||
| - **Album** (containing tracks) | ||
| - **Book Series** (containing volumes) | ||
| - **Course** (containing lessons) | ||
| - **Any other organizational concept** | ||
|
|
||
| ## Data Model | ||
|
|
||
| ### Structure Schema | ||
|
|
||
| ```typescript | ||
| interface Structure { | ||
| id: string; // Unique identifier | ||
| type: string; // Completely arbitrary - 'artist', 'album', 'tv-show', 'season', 'course', etc. | ||
| title: string; // Display name | ||
| description?: string; // Optional description | ||
| thumbnail?: string; // CID for thumbnail image | ||
| parentId?: string; // References parent structure (completely optional) | ||
| categoryId?: string; // Optional reference to content category | ||
| categorySlug?: string; // Optional category slug | ||
| createdAt: Date; | ||
| updatedAt: Date; | ||
| } | ||
| ``` | ||
|
|
||
| ### Content Relationship | ||
|
|
||
| Content (releases) can reference structures through metadata: | ||
|
|
||
| ```typescript | ||
| interface Release { | ||
| // ... standard release fields | ||
| metadata: { | ||
| structureId?: string; // References ANY structure | ||
| parentStructureId?: string; // References parent structure | ||
| // ... other metadata | ||
| }; | ||
| } | ||
| ``` | ||
|
|
||
| ## Hierarchy Examples | ||
|
|
||
| ### Music Organization | ||
| ``` | ||
| Artist: "Radiohead" (type: 'artist') | ||
| ├── Album: "OK Computer" (type: 'album', parentId: radiohead-id) | ||
| │ ├── Track: "Paranoid Android" (metadata.structureId: ok-computer-id) | ||
| │ └── Track: "Karma Police" (metadata.structureId: ok-computer-id) | ||
| └── Album: "In Rainbows" (type: 'album', parentId: radiohead-id) | ||
| ├── Track: "15 Step" (metadata.structureId: in-rainbows-id) | ||
| └── Track: "Bodysnatchers" (metadata.structureId: in-rainbows-id) | ||
| ``` | ||
|
|
||
| ### TV Organization | ||
| ``` | ||
| TV Show: "Breaking Bad" (type: 'tv-show') | ||
| ├── Season: "Season 1" (type: 'season', parentId: breaking-bad-id) | ||
| │ ├── Episode: "Pilot" (metadata.structureId: season-1-id) | ||
| │ └── Episode: "Cat's in the Bag..." (metadata.structureId: season-1-id) | ||
| └── Season: "Season 2" (type: 'season', parentId: breaking-bad-id) | ||
| ``` | ||
|
|
||
| ### Book Series Organization | ||
| ``` | ||
| Author: "J.K. Rowling" (type: 'author') | ||
| └── Series: "Harry Potter" (type: 'book-series', parentId: jk-rowling-id) | ||
| ├── Book: "Philosopher's Stone" (metadata.structureId: harry-potter-id) | ||
| └── Book: "Chamber of Secrets" (metadata.structureId: harry-potter-id) | ||
| ``` | ||
|
|
||
| ## Query Patterns | ||
|
|
||
| The power of structures lies in efficient PeerBit queries across hierarchical relationships: | ||
|
|
||
| ### Find all content under a structure | ||
| ```typescript | ||
| // Find all tracks in an album | ||
| const tracks = await site.releases.query({ | ||
| 'metadata.structureId': albumId | ||
| }); | ||
|
|
||
| // Find all episodes in a season | ||
| const episodes = await site.releases.query({ | ||
| 'metadata.structureId': seasonId | ||
| }); | ||
| ``` | ||
|
|
||
| ### Find all child structures | ||
| ```typescript | ||
| // Find all albums by an artist | ||
| const albums = await site.structures.query({ | ||
| parentId: artistId | ||
| }); | ||
|
|
||
| // Find all seasons of a TV show | ||
| const seasons = await site.structures.query({ | ||
| parentId: tvShowId | ||
| }); | ||
| ``` | ||
|
|
||
| ### Multi-level queries | ||
| ```typescript | ||
| // Find everything by an artist (albums + standalone tracks) | ||
| const artistAlbums = await site.structures.query({ parentId: artistId }); | ||
| const directTracks = await site.releases.query({ 'metadata.structureId': artistId }); | ||
|
|
||
| // Get all tracks from all albums | ||
| const allAlbumTracks = []; | ||
| for (const album of artistAlbums) { | ||
| const tracks = await site.releases.query({ 'metadata.structureId': album.id }); | ||
| allAlbumTracks.push(...tracks); | ||
| } | ||
| ``` | ||
|
|
||
| ## Key Design Principles | ||
|
|
||
| 1. **Completely Generic**: No hardcoded content types or relationships | ||
| 2. **Arbitrary Hierarchies**: Any structure can be parent/child of any other | ||
| 3. **Efficient P2P Queries**: Designed for optimal PeerBit query performance | ||
| 4. **Optional Relationships**: All relationships are optional - structures can be standalone | ||
| 5. **Flexible Metadata**: Content can reference structures however makes sense | ||
|
|
||
| ## Common Patterns | ||
|
|
||
| ### Standalone Content | ||
| Content doesn't need to belong to any structure: | ||
| ```typescript | ||
| // A standalone documentary | ||
| { | ||
| title: "Free Culture Documentary", | ||
| // no metadata.structureId - completely independent | ||
| } | ||
| ``` | ||
|
|
||
| ### Multiple Structure References | ||
| Content can reference multiple structures: | ||
| ```typescript | ||
| // A song that's part of an album AND a compilation | ||
| { | ||
| title: "Bohemian Rhapsody", | ||
| metadata: { | ||
| structureId: albumId, // Part of "A Night at the Opera" | ||
| compilationIds: [comp1, comp2] // Also in various compilations | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ### Cross-Category Structures | ||
| Structures can span different content categories: | ||
| ```typescript | ||
| // A director structure containing both movies and TV shows | ||
| Director: "Christopher Nolan" (type: 'director') | ||
| ├── Movie: "Inception" (categorySlug: 'movies', metadata.structureId: nolan-id) | ||
| ├── Movie: "Interstellar" (categorySlug: 'movies', metadata.structureId: nolan-id) | ||
| └── TV Show: "Westworld" (categorySlug: 'tv-shows', metadata.structureId: nolan-id) | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -32,6 +32,9 @@ app | |||||
| ipcMain.handle('peerbit:add-release', async (_event, releaseData: ReleaseData) => | ||||||
| lensService?.addRelease(releaseData), | ||||||
| ); | ||||||
| ipcMain.handle('peerbit:edit-release', async (_event, releaseData: ReleaseData) => | ||||||
|
||||||
| ipcMain.handle('peerbit:edit-release', async (_event, releaseData: ReleaseData) => | |
| ipcMain.handle('peerbit:edit-release', async (_event, releaseData: EditInput<ReleaseData>) => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a local file path dependency instead of a published version. This should be changed back to a proper version number before production deployment to ensure reproducible builds.