Repository: playwora/wora Branch: main Commit: 4b8621ac3b44 Files: 97 Total size: 452.8 KB Directory structure: gitextract_a5817xvy/ ├── .github/ │ ├── FUNDING.yml │ ├── ISSUE_TEMPLATE/ │ │ ├── report_issue.yml │ │ └── request_feature.yml │ └── workflows/ │ └── release.yml ├── .gitignore ├── .prettierignore ├── .prettierrc ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── bun.lockb ├── components.json ├── electron-builder.yml ├── main/ │ ├── background.ts │ ├── helpers/ │ │ ├── create-window.ts │ │ ├── db/ │ │ │ ├── connectDB.ts │ │ │ ├── createDB.ts │ │ │ └── schema.ts │ │ ├── index.ts │ │ └── lastfm-service.ts │ └── preload.ts ├── package.json ├── renderer/ │ ├── components/ │ │ ├── ErrorBoundary.tsx │ │ ├── LoadingSkeletons.tsx │ │ ├── PageTransition.tsx │ │ ├── PageTransitionMinimal.tsx │ │ ├── main/ │ │ │ ├── lyrics.tsx │ │ │ ├── navbar.tsx │ │ │ └── player.tsx │ │ ├── themeProvider.tsx │ │ └── ui/ │ │ ├── actions.tsx │ │ ├── album.tsx │ │ ├── avatar.tsx │ │ ├── badge.tsx │ │ ├── button.tsx │ │ ├── carousel.tsx │ │ ├── command.tsx │ │ ├── context-menu.tsx │ │ ├── dialog.tsx │ │ ├── form.tsx │ │ ├── input.tsx │ │ ├── label.tsx │ │ ├── scroll-area.tsx │ │ ├── select.tsx │ │ ├── skeleton.tsx │ │ ├── slider.tsx │ │ ├── songs.tsx │ │ ├── sonner.tsx │ │ ├── spinner.tsx │ │ ├── switch.tsx │ │ ├── tabs.tsx │ │ └── tooltip.tsx │ ├── context/ │ │ └── playerContext.tsx │ ├── hooks/ │ │ ├── useDebounce.ts │ │ └── useScrollAreaRestoration.ts │ ├── lib/ │ │ ├── albumCache.ts │ │ ├── apiConfig.ts │ │ ├── helpers.ts │ │ ├── lastfm-client.ts │ │ ├── lastfm.ts │ │ ├── songCache.ts │ │ └── utils.ts │ ├── next-env.d.ts │ ├── next.config.js │ ├── pages/ │ │ ├── _app.tsx │ │ ├── albums/ │ │ │ └── [slug].tsx │ │ ├── albums.tsx │ │ ├── artists/ │ │ │ ├── [name].tsx │ │ │ └── index.tsx │ │ ├── home.tsx │ │ ├── playlists/ │ │ │ └── [slug].tsx │ │ ├── playlists.tsx │ │ ├── settings.tsx │ │ ├── setup.tsx │ │ └── songs.tsx │ ├── postcss.config.js │ ├── preload.d.ts │ ├── styles/ │ │ └── globals.css │ └── tsconfig.json ├── resources/ │ └── icon.icns ├── tsconfig.json └── vercel/ ├── next-env.d.ts ├── next.config.js ├── package.json ├── pages/ │ ├── _app.tsx │ ├── api/ │ │ ├── config.ts │ │ ├── index.ts │ │ ├── lastfm/ │ │ │ ├── auth.ts │ │ │ ├── now-playing.ts │ │ │ ├── scrobble.ts │ │ │ ├── track-info.ts │ │ │ └── user-info.ts │ │ └── utils/ │ │ └── lastfm.ts │ └── index.tsx ├── tsconfig.json └── vercel.json ================================================ FILE CONTENTS ================================================ ================================================ FILE: .github/FUNDING.yml ================================================ # These are supported funding model platforms github: hiaaryan patreon: # Replace with a single Patreon username open_collective: # Replace with a single Open Collective username ko_fi: # Replace with a single Ko-fi username tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry liberapay: # Replace with a single Liberapay username issuehunt: # Replace with a single IssueHunt username lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry polar: # Replace with a single Polar username buy_me_a_coffee: # Replace with a single Buy Me a Coffee username custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] ================================================ FILE: .github/ISSUE_TEMPLATE/report_issue.yml ================================================ name: Bug Report 👾 description: File a bug report. title: "[Bug]: " labels: ["bug"] body: - type: markdown attributes: value: | Thanks for taking the time to fill out this bug report! - type: textarea id: what-happened attributes: label: What Happened? description: Also tell us, what did you expect to happen? placeholder: Ex. I expected the page to load, but instead I got a 404 error. validations: required: true - type: input id: version attributes: label: Wora Version description: Which version of Wora did this bug happen on? placeholder: Ex. 0.3.2 validations: required: true - type: input id: os attributes: label: Operating System description: What operating system are you using? placeholder: Ex. Windows 10, macOS 11.2 validations: required: true - type: textarea id: steps-to-reproduce attributes: label: Steps to Reproduce description: Please provide step-by-step instructions to reproduce the issue. placeholder: Ex. 1. Go to '...' 2. Click on '...' 3. Scroll down to '...' validations: required: true - type: textarea id: environment-details attributes: label: Environment Details description: Provide any additional details about your environment that might be relevant (e.g., hardware, network conditions). placeholder: Ex. Running on a high-latency network, using an external sound card. validations: required: false - type: dropdown id: severity attributes: label: Severity description: How severe is this issue? (e.g., Minor, Major, Critical) options: - Minor - Major - Critical default: 0 validations: required: true - type: textarea id: logs attributes: label: Screenshots/Logs description: Attach any screenshots or logs that might help in diagnosing the problem. placeholder: Ex. Drag and drop your screenshots or logs here. validations: required: false - type: input id: contact attributes: label: Discord Username description: How can we get in touch with you if we need more info? placeholder: Ex. charlie3x, bluespin2e validations: required: false - type: checkboxes id: terms attributes: label: Code of Conduct description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/playwora/wora/blob/main/CODE_OF_CONDUCT.md). options: - label: I agree to follow this project's Code of Conduct required: true ================================================ FILE: .github/ISSUE_TEMPLATE/request_feature.yml ================================================ name: Feature Request 🌟 description: Suggest a new feature or enhancement. title: "[Feature]: " labels: ["enhancement"] body: - type: markdown attributes: value: | Thanks for taking the time to suggest a feature! - type: textarea id: feature-description attributes: label: Feature Description description: Describe the feature you would like to see. placeholder: Ex. I would like to have a dark mode option in the settings. validations: required: true - type: textarea id: problem-solution attributes: label: Problem and Solution description: Describe the problem this feature will solve and how you envision the solution. placeholder: Ex. The app is too bright at night, a dark mode would make it easier on the eyes. validations: required: true - type: textarea id: additional-context attributes: label: Additional Context description: Provide any other context or screenshots about the feature request. placeholder: Ex. Similar to how dark mode works in other apps. validations: required: false - type: textarea id: potential-issues attributes: label: Potential Issues description: Are there any potential issues or challenges with this feature? placeholder: Ex. It might be challenging to ensure all UI elements are visible in dark mode. validations: required: false - type: input id: version attributes: label: Wora Version description: Which version of Wora are you using? placeholder: Ex. 0.3.2 validations: required: true - type: input id: contact attributes: label: Discord Username description: How can we get in touch with you if we need more info? placeholder: Ex. charlie3x, bluespin2e validations: required: false - type: checkboxes id: terms attributes: label: Code of Conduct description: By submitting this request, you agree to follow our [Code of Conduct](https://github.com/playwora/wora/blob/main/CODE_OF_CONDUCT.md). options: - label: I agree to follow this project's Code of Conduct required: true ================================================ FILE: .github/workflows/release.yml ================================================ name: Release and Build on: push: branches: - main jobs: check-version-change: runs-on: ubuntu-latest outputs: version_changed: ${{ steps.check.outputs.version_changed }} new_version: ${{ steps.check.outputs.new_version }} steps: - uses: actions/checkout@v4 with: fetch-depth: 2 - name: Check Version Change id: check run: | git diff HEAD^ HEAD --name-only | grep -q '^package.json$' || exit 0 old_version=$(git show HEAD^:package.json | jq -r '.version') new_version=$(jq -r '.version' package.json) if [ "$old_version" != "$new_version" ] && [ $(git diff HEAD^ HEAD --name-only | wc -l) -eq 1 ]; then echo "version_changed=true" >> $GITHUB_OUTPUT echo "new_version=$new_version" >> $GITHUB_OUTPUT else echo "version_changed=false" >> $GITHUB_OUTPUT fi build: needs: check-version-change if: needs.check-version-change.outputs.version_changed == 'true' strategy: matrix: os: [macos-latest, ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: "20" - uses: oven-sh/setup-bun@v2 with: bun-version: latest - name: Install Dependencies run: bun install - name: Build for ${{ matrix.os }} run: | if [ "${{ matrix.os }}" == "macos-latest" ]; then bun run build:mac elif [ "${{ matrix.os }}" == "ubuntu-latest" ]; then bun run build:linux elif [ "${{ matrix.os }}" == "windows-latest" ]; then bun run build:win64 fi shell: bash - name: Get Asset Details id: get_asset run: | if [ "${{ matrix.os }}" == "macos-latest" ]; then echo "asset_path=./dist/*.dmg" >> $GITHUB_OUTPUT elif [ "${{ matrix.os }}" == "ubuntu-latest" ]; then echo "asset_path=./dist/*.AppImage" >> $GITHUB_OUTPUT elif [ "${{ matrix.os }}" == "windows-latest" ]; then echo "asset_path=./dist/*.exe" >> $GITHUB_OUTPUT fi shell: bash - name: Release uses: softprops/action-gh-release@v2 if: success() with: tag_name: v${{ needs.check-version-change.outputs.new_version }} name: v${{ needs.check-version-change.outputs.new_version }} draft: false prerelease: false files: ${{ steps.get_asset.outputs.asset_path }} env: GITHUB_TOKEN: ${{ secrets.TOKEN }} ================================================ FILE: .gitignore ================================================ node_modules *.log .next app dist .DS_Store .db # Environment variables .env .env.local .env.development .env.production .vercel ================================================ FILE: .prettierignore ================================================ build coverage app dist .yarn ================================================ FILE: .prettierrc ================================================ { "plugins": ["prettier-plugin-tailwindcss"], "tailwindConfig": "./renderer/tailwind.config.js" } ================================================ FILE: CODE_OF_CONDUCT.md ================================================
An unexpected error occurred. The application may not work correctly.
{process.env.NODE_ENV !== 'production' && this.state.error && (
{this.state.error.toString()}
{this.state.error.stack}
onLyricClick(line.time)} > {line.text}
))}{settings && settings.name ? settings.name : "Wora User"}
Back
{link.label}
Search
Theme: {mounted ? theme : 'system'}
{item.name} ({item.type})
{item.type === "Playlist" ? item.description : item.type === "Artist" ? "Artist" : item.artist}
{song.name}
{song.artist}
{playlist.name}
{song ? song.name : "Echoes of Emptiness"}
{song ? song.artist : "The Void Ensemble"}
Error: {lastFmStatus.error}
) : lastFmStatus.isScrobbled ? (Scrobbled to Last.fm
) : lastFmStatus.isNowPlaying ? (
Now playing on Last.fm
Will scrobble at{" "}
{lastFmSettings.scrobbleThreshold}%
Will scrobble at{" "} {lastFmSettings.scrobbleThreshold}%
)}{!isFavourite ? "Add to Favorites" : "Remove from Favorites"}
{convertTime(seekPosition)}
{convertTime(soundRef.current?.duration() || 0)}
{album.name}
{album.artist}
{body}
); }); FormMessage.displayName = "FormMessage"; export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, }; ================================================ FILE: renderer/components/ui/input.tsx ================================================ import * as React from "react"; import { cn } from "@/lib/utils"; export interface InputProps extends React.InputHTMLAttributes{song.name}
{ e.preventDefault(); e.stopPropagation(); // Use router to navigate without stopping song playback const router = require("next/router").default; router.push(`/artists/${encodeURIComponent(song.artist)}`); }} >{song.artist}
{playlist.name}
{album && album.artist}
{sortOrder === "asc" ? "Ascending" : "Descending"}
Large Grid
Small Grid
List View
{album.name}
{album.artist} · {album.year || "Unknown year"}
{artist?.albums?.length || 0} Albums
{formatNumber(artistInfo.stats.listeners)} listeners
> )}{artist.stats.totalAlbums}
Albums
{artist.stats.totalSongs}
Songs
{formatDuration(artist.stats.totalDuration)}
Total Duration
{artist.stats.yearRange.start === artist.stats.yearRange.end ? artist.stats.yearRange.start : `${artist.stats.yearRange.start}-${artist.stats.yearRange.end}`}
Active Years
{cleanBio(artistInfo.bio.summary)}
Audio Formats
Songs in Library
{artist.stats.topSongs.map((song, idx) => ({song.name}
{song.album}
{track.name} {localTrack && ( • In Library )}
{formatNumber(track.playcount)} plays
Artist data will appear here as you play their music
{simArtist.name} {isInLibrary && ( • In Library )}
{album.name}
{album.year || "Unknown"}
Sort by name
Sort by album count
Sort by song count
{sortOrder === "asc" ? "Ascending" : "Descending"}
Large Grid
Small Grid
List View
{error}
No artists found
{artist.name}
{artist.albumCount} {artist.albumCount === 1 ? "album" : "albums"} · {artist.songCount} {artist.songCount === 1 ? "song" : "songs"}
{artist.name}
{artist.songCount} songs
{artist.name}
{artist.albumCount} {artist.albumCount === 1 ? "album" : "albums"} · {artist.songCount} {artist.songCount === 1 ? "song" : "songs"}
{playlist.description}
{pl.name}
{pl.description}
{stats && stats.songs}
{stats && stats.albums}
{stats && stats.playlists}
This is a serverless API for Last.fm integration. The following endpoints are available: